Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal server error #97

Open
anime-kun32 opened this issue Jan 27, 2025 · 13 comments
Open

internal server error #97

anime-kun32 opened this issue Jan 27, 2025 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@anime-kun32
Copy link

Describe the bug

all routes ARE NOT WORKING

Expected behavior

I just updated my env ANIWATCH_API_HOSTNAME=https://aniwatch-api-net.vercel.app vuase i wanted to include rate limiting and so the expected behaviour should be something like this { success: true, data: { genres: ["Action", "Cars", "Adventure", ...], latestEpisodeAnimes: [ { id: string, name: string, poster: string, type: string, episodes: { sub: number, dub: number, } }, {...}, ], spotlightAnimes: [ { id: string, name: string, jname: string, poster: string, description: string, rank: number, otherInfo: string[], episodes: { sub: number, dub: number, }, }, {...}, ], top10Animes: { today: [ { episodes: { sub: number, dub: number, }, id: string, name: string, poster: string, rank: number }, {...}, ], month: [...], week: [...] }, topAiringAnimes: [ { id: string, name: string, jname: string, poster: string, }, {...}, ], topUpcomingAnimes: [ { id: string, name: string, poster: string, duration: string, type: string, rating: string, episodes: { sub: number, dub: number, } }, {...}, ], trendingAnimes: [ { id: string, name: string, poster: string, rank: number, }, {...}, ], mostPopularAnimes: [ { id: string, name: string, poster: string, type: string, episodes: { sub: number, dub: number, } }, {...}, ], mostFavoriteAnimes: [ { id: string, name: string, poster: string, type: string, episodes: { sub: number, dub: number, } }, {...}, ], latestCompletedAnimes: [ { id: string, name: string, poster: string, type: string, episodes: { sub: number, dub: number, } }, {...}, ], } }

Actual behavior

but instead i get this error { "status": 500, "message": "Internal Server Error" }

Additional context

i went on vercel to check the logs and i also found this as well TypeError: Cannot read properties of undefined (reading 'server') at getConnInfo (file:///var/task/node_modules/@hono/node-server/dist/conninfo.mjs:3:26) at keyGenerator (/vercel/path0/src/config/ratelimit.ts:12:24) at r (/var/task/node_modules/hono-rate-limiter/index.cjs.js:1:1409) at /var/task/node_modules/hono-rate-limiter/index.cjs.js:1:2375 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async dispatch (file:///var/task/node_modules/hono/dist/compose.js:30:17) at async cacheControlMiddleware (/vercel/path0/src/middleware/cache.ts:18:3) at async dispatch (file:///var/task/node_modules/hono/dist/compose.js:30:17) at async cors2 (file:///var/task/node_modules/hono/dist/middleware/cors/index.js:74:5) at async dispatch (file:///var/task/node_modules/hono/dist/compose.js:30:17) please help

@anime-kun32 anime-kun32 added the bug Something isn't working label Jan 27, 2025
@ghoshRitesh12
Copy link
Owner

@anime-kun32 I check like 5 routes and they are working

@anime-kun32
Copy link
Author

Image

Image

@ghoshRitesh12
Copy link
Owner

give me the logs for further inspection?

@anime-kun32
Copy link
Author

logs_result.json

@ghoshRitesh12
Copy link
Owner

@anime-kun32, what's the version of the api?

@anime-kun32
Copy link
Author

2.11.1

@ghoshRitesh12
Copy link
Owner

2.11.1

@anime-kun32 Could you try to redeploy the API and see if the issue persists?

@anime-kun32
Copy link
Author

Ok

@anime-kun32
Copy link
Author

Just redeployed it now , still error

@ghoshRitesh12
Copy link
Owner

@anime-kun32 I can't reproduce your issue, I just redeployed on vercel and checked a couple of routes and it all seems to be working fine.

@anime-kun32
Copy link
Author

Let me try deleting the repo and then forking it again

@ghoshRitesh12
Copy link
Owner

Ok, try that and lemme know

@anime-kun32
Copy link
Author

so here's the summary the api works if you do not set the ANIWATCH_API_HOSTNAME , but if that env is set then you get internal server error . so maybe try fixing that issue for now thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants