Open razzeee opened 3 days ago
@razzeee Thanks for reporting! This looks so strange. I'm tagging @Josh-Walker-GM and @Tobbe to see if they have any ideas or have seen anything similar?
Nothing that comes to mind right now I'm afraid
Any more details? That code snippet is within dbAuth itself, which you normally don’t have access to within an app. Where are you accessing context
and seeing that it’s equal to {}
?
I figured out how to get it to work again, but I'm not 100% sure, which part the actual fix was
We have had a docker setup since before it was available with redwood
RUN yarn global add @redwoodjs/cli prisma @sentry/cli && \
prisma generate [...]
If I pin it like this, it starts working again:
RUN yarn global add @redwoodjs/cli@7.7.1 prisma@5.18.0 @sentry/cli && \
The prisma pin might actually not be needed, it started to work, after pinning the cli (we can probably pin something newer)
@razzeee, can you provide a small repo with a reproduction of this issue? And I echo @cannikin's question — where are you attempting to access context?
The only time I've seen context be unexpectedly empty is when experiencing cookie issues, though without more information it's tough to know what the issue could be.
I'm not sure, that there is much to repro.
It seems like installing @redwoodjs/cli
global in a major version different from what your targeting can cause this. Pretty specific and IMO expected.
Our problem is just, that we need it in the pipeline right now and can't sync the version from package.json
to Dockerfile
in an automatic way. I guess if data migrate works correctly now, we might not need that anymore, would need to find time to look into that.
What's not working?
Context is
{}
when using it similar to https://github.com/redwoodjs/redwood/blob/2b749313203ff4308e60c6cb546b69301646add6/packages/auth-providers/dbAuth/setup/src/templates/api/lib/auth.ts.template#L49The interesting this is, that we're still on redwood 7 and it seemed to break for no reason. I was guessing a dependency update, but wasn't able to pinpoint it so far.
It also seems to be fine in dev, but breaks for us with docker/deploy (our own docker stuff, pre redwood docker)
How do we reproduce the bug?
I'm lost on this so far, mostly want to reach out and see, if anything comes to mind. Might task a colleague to condense a repro repo, if nothing else happens.
What's your environment? (If it applies)
Are you interested in working on this?