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

Sessions are linked together #265

Closed
narawat opened this issue Mar 9, 2024 · 7 comments · Fixed by #266
Closed

Sessions are linked together #265

narawat opened this issue Mar 9, 2024 · 7 comments · Fixed by #266

Comments

@narawat
Copy link

narawat commented Mar 9, 2024

Hello,
I'm trying to build web app with multiple app modules similar to this Genie tutorial:
https://learn.genieframework.com/docs/guides/adding-reactive-pages#multiple-app-modules

However, sessions seem to be linked together if multiple user open the same route. To confirm, I tried the above Genie example without any modification.
https://github.com/narawat/Ai_playground/blob/master/Screenshot%20from%202024-03-09%2017-12-47.png

The result is the same. I test with Firefox and Edge in private windows.
https://github.com/narawat/Ai_playground/blob/master/Peek%202024-03-09%2015-28.gif

Package versions:
Julia v1.10.2
GenieFramework v2.1.0

Is this normal behavior?

@essenciary
Copy link
Member

I think I've seen this issue before - passing the model explicitly I think is problematic at this point. Maybe @PGimenez or @hhaensel can chime in.

My recommendation is: move the @page macros into each of their respective modules and remove the model= part. Does that fix it?

@narawat
Copy link
Author

narawat commented Mar 10, 2024

Thanks essenciary. Happy to report that your suggest works!. I also make the docs PR.

@narawat narawat closed this as completed Mar 10, 2024
@hhaensel hhaensel reopened this Mar 10, 2024
@hhaensel
Copy link
Member

I think we shouldn't close this, but rather fix it. I'll have a look where the issue comes from.

@hhaensel
Copy link
Member

Just added a potential fix for the issue.
@narawat could you try your original version with the hh-multipage-fix branch?

You can switch to that branch by entering

pkg> add Stipple#hh-multipage-fix

in the package manager.

@narawat
Copy link
Author

narawat commented Mar 12, 2024

The example works as it should now. Thanks.
Btw, Is it possible to use async MQTT client (MQTTClient.jl) inside a module? I'm would like to connect a reactive control dashboard to MQTT-based services to monitor/manage/control IoT devices. I think Genie have great potential in this area too.

@hhaensel
Copy link
Member

Thanks a lot for checking!
I'll add tests for this issue and will merge soon.

Concerning MQTT I remember that we had an issue in the past. I propose that you build a MWE and open a new issue with that. Let's see whether we can help you.

@hhaensel
Copy link
Member

Here's a Genie issue containing a MWE. Didn't read through it yet, though.
GenieFramework/Genie.jl#702

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

Successfully merging a pull request may close this issue.

3 participants