Next.js Discord

Discord Forum

login page error! on vercel

Unanswered
Japanese flying squid posted this in #help-forum
Open in Discord
Japanese flying squidOP
but when i was running the site locally it was running fine


 console

Partitioned cookie or storage access was provided to “https://vercel.live/_next-live/feedback/feedback.html” because it is loaded in the third-party context and dynamic state partitioning is enabled.

Cookie “__vercel_live_token” has been rejected because it is in a cross-site context and its “SameSite” is “Lax” or “Strict”. 2 validate
Cookie warnings 2
Cookie “token” will soon be rejected because it is foreign and does not have the “Partitioned“ attribute. login
Cookie “token” will soon be rejected because it is foreign and does not have the “Partitioned“ attribute. login
Login successful: 
Object { message: "Login successful" }
page-d7b27ec662ab453d.js:1:6538
MouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead. 4362.f365d2ac647358968229.js:8:1025908

29 Replies

Japanese flying squidOP
@Miniature Pinscher Your server domain has to be the same as your frontend domain (sub domain).
Japanese flying squidOP
you mean in server.js file ???
Miniature Pinscher
Ah. Well try logging in on Chrome instead, I'm sure it'll work.
Japanese flying squidOP
i deployed the backend on render
and its not working in ichrome as well
Rhinelander
Grab the error message and consult the ChatGPT. I'm sure he will help you out
Japanese flying squidOP
tried it and it didnt help thats why as a last resort asked here
Barbary Lion
@Japanese flying squid What is your process.env.FRONTEND_URL containing?
Japanese flying squidOP
link to the frontend ie https://www.elshadaiug.com
Barbary Lion
Okay and where do you make the request from? Because to me, it looks like CORS is blocking your site that makes the request
So you need to allow the site that's making the requests in CORS
Japanese flying squidOP
and how can i do that??
Barbary Lion
// CORS Configuration
const allowedOrigins = [process.env.FRONTEND_URL]; 

This specifies the allowedOrigins. Add the site here
so instead of only having https://www.elshadaiug.com/, if your request is coming from https://server.elshadaiug.com/ you need to add that too
Japanese flying squidOP
ohk thank you ill try this
Barbary Lion
Also, I just noticed this, it is complaining about https://vercel.live/_next-live/feedback/feedback.html this site trying to fetch cookies. So you might need to take a look for that on google. I am not sure on the exact solution to this, but I might look into it when I find time
But this looks to me to be some NextJS thing, so I don't think this should be a problem
You might as well ignore it if your site works
Japanese flying squidOP
but its keeping me from using the /admin
as i want to keep /login
and then redirect to /admin
other than than the site is working
only isssue is with login and it was running as expected locally i tested it
Barbary Lion
Okay so, what you can look into is;

https://vercel.live/_next-live/feedback/feedback.html is trying to fetch a cookie named “__vercel_live_token”. This is no coming from your website (since it's from vercel) and it is marked as SameSite. So you could try and research on how to fix this
it works locally because locally you don't use vercel
Japanese flying squidOP
hmmm,ill look into this. thank you so much for your time
Barbary Lion
I hope I could pin point you in a direction 😅 Currently on the run so I can't help more. But when I get home I will try and look into it further if the question is left unanswered
Japanese flying squidOP
sure that work! if you need the code base i can send you the github link as well. i appreciate the help