Skip to content
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: lost asyncLocalStorage in server actions #7633

Open
juliusmarminge opened this issue May 23, 2023 · 4 comments
Open

bug: lost asyncLocalStorage in server actions #7633

juliusmarminge opened this issue May 23, 2023 · 4 comments
Labels
triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@juliusmarminge
Copy link
Contributor

Environment

System:
OS: macOS 13.3.1
CPU: (8) arm64 Apple M1 Pro
Memory: 926.67 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.0 - ~/Library/Caches/fnm_multishells/3962_1684784742591/bin/node
Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/3962_1684784742591/bin/yarn
npm: 9.5.1 - ~/Library/Caches/fnm_multishells/3962_1684784742591/bin/npm
Browsers:
Safari: 16.4

Reproduction URL

coming soon

Describe the issue

CleanShot 2023-05-23 at 13 41 32@2x

How to reproduce

Call getServerSession inside a server action

Expected behavior

session retrieval to be successful

@juliusmarminge juliusmarminge added the triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. label May 23, 2023
@juliusmarminge
Copy link
Contributor Author

hmm cannot repro in another app. will investigate further

@juliusmarminge
Copy link
Contributor Author

I'll leave this here if anyone got any ideas why it's not working: https://github.com/juliusmarminge/t3-app/blob/main/src/app/actions.ts

Couldn't repro on a new repo though - strange...

@SvemirskiHod
Copy link

@juliusmarminge I can repro this by calling getServerSession anywhere inside of a server action that is defined in a separate file that declares user server at the top.

@rexfordessilfie
Copy link
Contributor

@juliusmarminge could this help you? I think a temporary solution was found somewhere in here: #7523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

3 participants