Replies: 3 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
I think one of the issues is that we run the app via Citrix on a local shared drive, so technically we run a local server instance and not a web server; consequently, the storage becomes more confusing. We tried running the native mode, but I suspect it didn’t work because the default port was taken if a second user opens the app. To handle this, maybe we could implement a port scanner, then run native mode and have fewer storage headaches? I don’t know—I’m just dropping my current thoughts in a non‑ordered fashion. |
Beta Was this translation helpful? Give feedback.
-
|
Hello @phifuh Braindump is fine but someone has to gather it together. I think that someone is best be LLM. Here I asked Claude to do it. If you have access, maybe you can have LLM help you as well, to ease your frustration also. Braindump organized, but accuracy unknownConcerns from Discussion #5717OverviewUser experiencing significant confusion with NiceGUI's storage feature documentation and implementation guidance. Primary Concerns1. Documentation Clarity Issues
2. Technical Confusion Points
3. Non-Standard Deployment Scenario
4. Suggested Improvement
Root IssueDocumentation assumes standard web deployment. Non-traditional deployments (Citrix, shared drives, multi-user native mode) lack clear guidance and examples. Documentation fix is under wayAs I always say, it is our fault if our users do not understand any line of our documentation. I have took action and began to modify the documentation with more content which should hopefully help to make this happen never again, and I shall address my changes in that PR. Feel free to have a read once it's ready, we always welcome a third pair of eyes 👀 With that, I want to cut to the chase. While information is sparse, based on your description of running via Citrix on a local shared drive, I think I have a guess of what is happening with why NiceGUI isn't working in your setup. TL-DR: Storage conflict. Dodge the storage conflict and it should work. If it doesn't please report back and let's debug together! Non-issue: Port ConflictNative mode already has automatic port scanning built in. When you run Line 238 in fce74fc nicegui/nicegui/native/native_mode.py Line 127 in fce74fc As it scans ports 8000-8999 to find an available one, likely multiple users can run the app simultaneously without port conflicts. Suspected issue: StorageUnder your case, it seems like the same file ( When that happens, all of such instances attempt to write to the same storage path (defaults to This causes conflicts and possibly data corruption, and is likely what is going wrong. SolutionsOption 1: Separate Storage PathsEach user needs their own storage directory. You can set this via environment variable before running the app: This way each user gets their own isolated storage, preventing conflicts. Option 2: Redis StorageIf you actually want users to share data, you can use Redis storage instead: This requires setting up a Redis server but allows proper multi-instance data sharing with synchronization. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am very curious whether other people have trouble understanding the docs at https://nicegui.io/documentation/storage. It’s my fifth time reading them and I still have absolutely no clue what they mean or how to use the feature. I’m so frustrated right now that this might sound like a rant. Asking my friend “Claude” yields wildly different explanations, and I don’t understand how it works. What does “needs client connection” mean? How does the storage work in native mode? Is data only synchronized when the app explicitly performs the heavy lifting, like implementing it, or implementing it on startup? What happens if I run my app on localhost? How can I kill the connection to prevent multiple tabs from staying open in localhost mode? I have so many unanswered questions and I’m just angry.
Beta Was this translation helpful? Give feedback.
All reactions