Helllo, I tested my app locally and it works fine,...
# support-questions-legacy
p
Helllo, I tested my app locally and it works fine, but when testing in staging trying to signup/login I'm getting an error in the console saying: "SyntaxError: Unexpected end of JSON input". I checked the request and I get a 200 and I also checked the dashboard and the user was created.
r
hey @pierrebiv can i see the full error stack?
p
it's not super clear, but I managed to replicate it locally by stopping my docker that was running the core part.
r
does the API return a 500?
p
I can see a 200 from mine but the payload is empty when I guess it expect the user to be returned
r
which API is this from?
p
this is what I meant, in the browser I can see I get a 200
r
have you overriden the API on the backend for this?
p
no no, I have a simple setup on the backend
r
do you have any sort of reverse proxy?
or anything that might be stripping away the response body?
what are the headers you see in the response?
p
I don't think so, I'm using google app engine to host my API
r
and what are the request headers?
p
also just checked my API logs and seems that everything is fine too
r
might be that google is stripping away the response headers and body. Weird.
Cause it works on dev
p
ugh ok
wait, that means that the dashboard would not work no ? because I can access and see data on the dashboard.
ok I just checked my log and got this error: "level=error msg="Since your API and website domain are different, for sessions to work, please use https on your apiDomain and dont set cookieSecure to false"
is this coming from supertoken or google ?
r
this is coming from supertokens
right. So that's why the API is failing. It should have given you a 500 error (unless you implemented your global error handler to give 200)
p
so how can I fix it without having the same domain for my frontend and backend ? I tried to setup the same domain name for both but ran into issue with my DNS server
r
switch to using header based auth
and not using cookie based auth
p
👍
12 Views