AlexGarrixen / vimox-api

MIT License
11 stars 10 forks source link

Internal Server Error #65

Open ImExiled opened 2 years ago

ImExiled commented 2 years ago

Hello,

I apologize if this is an improper question to ask, but I am unable to create a new user in the Database via the Register page or API locally, as it returns "Internal Server Error". This error is only visible when attempting to create a user via CURL.

If you need any information I am happy to provide.

AlexGarrixen commented 2 years ago

It is successfully connecting to the database once you run it ?, you should see something like this in console: Success connection db

ImExiled commented 2 years ago

It is successfully connecting to the database once you run it ?, you should see something like this in console: Success connection db

Yes, it connects to the Database successfully. I've now found that attempting to add a new account will always result in HTTP500 (Internal Server Error), and I cannot find any way to fix this issue. Attached is a screenshot of the only logging I could find which contains errors, that being of my browser Developer Console. vmware_m2ilz09rSL

ImExiled commented 2 years ago

Update: Attaching screenshot of Node consoles for reference. image

AlexGarrixen commented 2 years ago

did you set the environment variables ?

ImExiled commented 2 years ago

did you set the environment variables ?

I did, yes. Would it help to see them?

AlexGarrixen commented 2 years ago

yes

ImExiled commented 2 years ago

yes

Sure. Two screenshots attached, filenames at top. vmware_DeYFJMgWr6

vmware_0vJqcz29s1

192.168.209.129 is the internal IP of the machine, and is accessable on my network. Treated as the "publically" accessable domain.

AlexGarrixen commented 2 years ago

ok, in development mode you need to set ORIGIN CLIENTS with the url where nextjs serves the app.

ORIGIN_CLIENTS=http://localhost:3000

ImExiled commented 2 years ago

I've set that, new error has arisen. firefox_hL08nkOiWV

EDIT: I'm able to sign in now with accounts that didn't previously work!

AlexGarrixen commented 2 years ago

send me a screenshot of the network tab

ImExiled commented 2 years ago

firefox_z26dBW8od4 Screenshot attached. Error does still exist in console.

AlexGarrixen commented 2 years ago

what is the response from the endpoint POST /auth/signup

ImExiled commented 2 years ago

404 if on browser, Internal Server Error via Curl POST request

ImExiled commented 2 years ago

Update: Confirmed that even though we receive Internal Server Error, accounts are created. Said accounts do not require email verification, for some reason.

AlexGarrixen commented 2 years ago

Yes, this happens because the user is not required to check the mail.

It seems that the error could be the mail with which sendgrid sends mail.

Update this part and put your sengrid email Annotation 2022-04-13 195933

source file: /src/controllers/auth/signup.ts

ImExiled commented 2 years ago

You were correct, no more errors appear in the Developer Console. I appreciate your help.

The last request I have is to know how to add Genre, Series, and Episodes via API or otherwise. I have direct DB access via Mongo CLI if that works.

AlexGarrixen commented 2 years ago

For that I had to make a frontend admin, you could do the same 👍