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

Using Phoenix Live Session in tests causes a key not found error: __sid__ #12

Open
krainboltgreene opened this issue Apr 17, 2022 · 5 comments · May be fixed by #13
Open

Using Phoenix Live Session in tests causes a key not found error: __sid__ #12

krainboltgreene opened this issue Apr 17, 2022 · 5 comments · May be fixed by #13

Comments

@krainboltgreene
Copy link

I'm not sure how to alleviate this issue, when I use live() in my tests eventually down the chain the maybe_subscribe fails due to a missing key.

@KayEss
Copy link

KayEss commented Feb 19, 2024

I'm seeing the same error in tests:

(KeyError) key :__sid__ not found in: %{"_csrf_token" => "wMZjqE7ygfa66sYBnJyyfPQP"}

There is no __sid__ in there at all so I don't know that the outstanding PR will solve this one

@krainboltgreene
Copy link
Author

Frankly @KayEss I solved the issue by not using the library.

@KayEss
Copy link

KayEss commented Feb 19, 2024

:-) What did you use instead?

@krainboltgreene
Copy link
Author

I make a POST request from a phoenix hook to a controller that writes to the cookie.

@KayEss
Copy link

KayEss commented Feb 19, 2024

Thanks. I'll investigate that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants