-
Notifications
You must be signed in to change notification settings - Fork 137
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
Server Error Uncaught ConvexError: you do not have access to this org. hasAccessToOrg and getUser are both declared but never read. #5
Comments
same error |
It's because we need to set CLERK_HOSTNAME in Convex Environment Variables, not in env.local file. Otherwise, tokenIdentifier created will be https://underfined| $=***. But there is another problem, if we upload txt file ,will show the same toast, but the file will still be created. |
Second problems fixed. The reason why the incorrect file type is still uploaded is because we already have a post reqeust to post that file to url, the createFile is just to create an entry in files table. So before post, we must check the fileType first and toast the message, return.
|
this code is solved ok or not |
hasAccessToOrg and getUser are both declared but never read in files.ts and users.ts. It seems there's some logic missing to make this work correctly.


The YT video about orgId authorization is a bit messy/unclear and the code shown in the video doesn't match the repo:
https://www.youtube.com/watch?v=27hMNWcsa-Y&t=3765s
I can upload files to the convex db and see those files under "files" in the Convex DB, but the data table is empty: No files and no users.

Although the files can be uploaded, the toast is shown every time: ConvexError: you do not have access to this org.

The console error is:
[CONVEX M(files:createFile)] [Request ID: 15ff8b3cefe2071a] Server Error
Uncaught ConvexError: you do not have access to this org
at handler (../convex/files.ts:66:4)
I've tried with a "normal" user and an organization user, but this makes no difference. The error persists with both a user with or without and organization.
Everything else is working nicely, but I can't figure out the logic to make this work or fix it. Please fix this issue and update the main or add a branch with this fix @webdevcody
The text was updated successfully, but these errors were encountered: