-
Notifications
You must be signed in to change notification settings - Fork 994
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
[Bug?]: Upgrading to 7.1.3 - "You don't have permission to do that." #10223
Comments
Other person with the same issue: https://community.redwoodjs.com/t/redwood-v7-0-0-upgrade-guide/5713/54 |
Thanks for opening the issue @johndevor. I'll try to at least get started on reproducing this over the weekend as I imagine this is a blocker for you upgrading. |
I am the other person in the thread having the issue, it is still happening on 7.1. I have created a work around that allows me to access the context but I don't know why accessing it directly returns undefined:
|
Thank you so much for the additional information! I haven't had a chance to properly look into this yet as I've been traveling. I will aim to get something substantially done on this by the end of the week. |
I tried that on netlify without success:
|
It took me far to long to get back to this so sorry about that! I just tried deploying our dbAuth based test project to netlify and it seems to work just fine with auth and graphql. That was on redwood I'll try switching the auth to clerk tomorrow to see if that's a factor but context usually lives at a level below each provider so I would have naturally expected if it was broken for all auth providers to fail. I could easily be wrong though. I'll follow up with what happens when I switch it to clerk. |
Hi everyone. There have been multiple reports over a period of time that there is an unresolved issue with context. However, I'm having difficulty reproducing this error and so can't move forward with debugging and fixing. What would help move this along is if someone can please provide a complete but small reproduction repository that I could clone down and reproduce the error. It appears this might only happen on deployed applications - especially serverless deployments. Given that information, it would also be helpful if this reproduction repo could be deployed to netlify/vercel. I will keep trying to return to this when I can but until a reproduction is available I cannot move this forward. Hopefully this is a reasonable next step here? I appreciate that it could be blocking upgrading to v7 so apologies again that this issue has been so long running. |
My build is a bare metal instance running in Azure cloud. I have other bare metal instances of Redwoodjs, the only difference between them is the use of azure-active-directory authentication in the one that is not working. I am not sure how I could set up a reproduce-able instance that involves azure-active-directory unless there is some free testing service Microsoft or someone provides? |
I've made a completely new redwood project using 7.7.3. I've only made the following changes:
The repo is here. I am using Node 20.11.1 (using nvm in both Windows and Ubuntu environments). The problem happens when running The issue on both Windows and Ubuntu are the same, console.log(context) prints out the context as expected with expected attributes (e.g. context.currentUser) but when trying to access directly (return context.currentUser) they return undefined. I've pushed the full repo to here: https://github.com/chris-morris-h2o/ad-test Unfortunately I do not have an Active Directory environment I can publicly expose to troubleshoot this. I can provide anymore information or help in any other way. I have included a redacted logging output from auth.js. Everything was populated except the roles[] array, which I noted was blank in the unredacted log.
|
@Josh-Walker-GM - If we were able to get a second Azure AD tenant set up for testing, would there be a way for us to share the private information with you in a relatively secure way outside of this Github issue? I'm negotiating with our IT department right now about getting a second Azure AD environment set up that we could expose a little more publicly for this issue. |
Are you on our community forums? If so I think you can privately message me there: https://community.redwoodjs.com/u/josh-walker-gm. If not I'm also happy to just share my email address with you. I (and the rest of the team) really appreciate the effort here! I have some work I must get done over the next two days. However, I will make sure I set aside time this weekend to go back through this issue and reattempt a reproduction, setting up my own azure resources as needed too. Hopefully I can make progress and I will report back on Monday. |
I've reproduced the issue in a new repo and a new netlify. https://redwood-auth-test.netlify.app/ Using clerk auth. |
Ok! I fixed it here. I disabled netlify's esbuild bundler in netlify.toml and that fixed it for me.
|
@chris-morris-h2o Closing for now... lmk if you want me to reopen |
I've not been able to get internal resources to set up a private tenant yet. But we're using baremetal deployments and don't have any bundler specified, we're using redwood defaults for bundler, which I believe is Vite for the version I am running. |
What's not working?
Graphql is returning
Error: You don't have permission to do that.
Me and at least one other person are seeing the issue. Works fine locally, but not in serverless (netlify) for me.
Apparently the context is not getting populated properly?
https://community.redwoodjs.com/t/redwood-v7-0-0-upgrade-guide/5713/52?u=john
How do we reproduce the bug?
No response
What's your environment? (If it applies)
No response
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: