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 express flash does not trigger a session update #66
Comments
Is it possible to provide a full test app I can run to reproduce the issue? That way I can attach a debugger to see what's happening. Otherwise, you're welcome to make a PR :) |
I will whip up a failing test. |
Cool, also would be helpful if you provided the following version in the meantime to help me work in parallel: version of Node.js, version of express flash, version of this module. |
Forked this project and wrote an integration test using connect-flash: https://github.com/zbyte64/cookie-session/blob/flash-message-fail/test/flash_test.js I think I made some mistake because I can see in the view that properly retrieves the prior flash messages but weird stuff happens when I try to send it back to the client (empty response when sending a non-empty string, 500 if I don't stringify). The package.json of the project experiencing the issue: https://github.com/zbyte64/project-cms-backend/blob/postgres/package.json ; using node v6.4 |
I'm not seeing any issue with this module in your test, unless I'm missing something? |
The test fails:
|
Yea, but |
If you can please put together a pull request with a potential fix to this module, that would probably be ideal, because I'm not sure I see any issue based on that test, but again, I may be missing something :( |
You're right, this is an issue outside of cookie-session (connect?). |
So to add, I had to heavily modify your test just to get it to run for me. Just cloning it,
|
On https://github.com/jaredhanson/connect-flash I only see mentions about using it on Express 3.x. Are you sure it even works on Connect? |
Hmm, title does mention connect at the top, but given it hasn't been updated in 4 years.... |
@zbyte64 does it sound like you are experiencing this bug? jaredhanson/connect-flash#22 |
Possibly, but not even |
Hi @zbyte64 your test you have above passes without issue if you add |
Thank you. I ended up using |
The following happens in express 4:
But even doing that doesn't persist the data, both
foo
andflash
get serialized as empty arrays. But if I setfoo
manually to an array or object then that does work.The text was updated successfully, but these errors were encountered: