#Convex Auth URL undefined

25 messages · Page 1 of 1 (latest)

woeful rock
#

Any Idea what would cause this when using convex auth and Next app router? The error appears when the user trys to sign in. We get a 500 error code at the /api/auth route. We also have the NEXT_PUBLIC_SITE_URL set and this worked prior.

Error: url property passed to convex/nextjs function but is undefined. Is an environment variable not set? If this is intended remove 'url' from the preloadQuery options.

Error [ERR_HTTP_HEADERS_SENT]: Cannot append headers after they are sent to the client

dry skyBOT
#

Thanks for posting in #1088161997662724167.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.

    - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
    - Use [search.convex.dev](https://search.convex.dev) to search Docs, Stack, and Discord all at once.
    - Additionally, you can post your questions in the Convex Community's #1228095053885476985 channel to receive a response from AI.
    - Avoid tagging staff unless specifically instructed.

    Thank you!
azure agate
#

i believe this was a bug introduced in convex 1.18.0 and fixed in 1.18.1. can you try upgrading?

woeful rock
#

Okay, so I upgraded, I am just going back through to see if I missed anything. Just getting this issue now:
Hit error while running auth:signIn:
Error: url property passed to convex/nextjs function but is undefined. Is an environment variable not set? If this is intended remove 'url' from the preloadQuery options.

azure agate
#

to confirm, you're seeing the same error on version 1.18.1?

woeful rock
#

Correct, I was only seeing the error in production prior to upgrading, now I see it local as well.

azure agate
#

hmm that's unexpected. can you share output of npm ls

woeful rock
#

I am trying to back track and make sure I have all of my files in order auth.ts/auth.config.ts/middleware. I am not sure if anything else requires an upgrade. We are using convex auth password flow for context,

azure agate
#

i think we found the bug on our side. in the meantime you could downgrade to 1.17.4. sorry about this

woeful rock
#

Okay, thanks for looking into it. I was going nuts this morning trying to find the issue. Interestingly enough, all of our users on the EST timezone can not log in, but we have one user on PST time west coast who can still. lol

still lance
#

Sorry for the inconvenience here @woeful rock, 1.18.2 is now out and should resolve the issue

woeful rock
#

Thanks team, much appreciated!

civic acorn
#

Thanks a lot, I just started learning convex in a youtube video and was getting this error, upgraded the version.

woeful rock
#

Okay, it appears to still have the same error. What is the exact variable this is looking for? Error: url property passed to convex/nextjs function but is undefined.

woeful rock
#

"convex": "^1.18.2",

still lance
#

what about npm ls convex

#

that will tell us what's actually installed

#

instead of what appears in your package.json

#

How did you upgrade? By editing the package.json file or running a command?

woeful rock
#

Ah I see it didn't install correctly. Needed --force

still lance
#

Ah interesting, probably not related to this issue but would be interested to see the error that stopped it

#

there's a lot of --force being required with React 19 not having full library support yet, but if it is related to convex it's something we want to fix

woeful rock
#

Yeah, that isn't you something with Next 15/React 19