-
Notifications
You must be signed in to change notification settings - Fork 13
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
Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error. #14
Comments
Also please confirm, I want all my stores or most of them to be stored in local storage and DO NOT want Fluxor to use in memory for the stores that I want to utilize for local storage any more, that is the intent of this library correct? |
I haven’t tested with Fluxor 5.9.1 since I can’t find any information on what changed in that release. Is Fluxor working in your project if you do not use Fluxor.Persist? Does the sample blazer server project in this repo work for you with Fluxor 5.9.0? This library lets you persist a copy of the state (typically in local storage but could also be elsewhere). You can persist all state or just the states you flag. There is still a copy in memory. If you have a large amount of data you don’t want in memory you should be looking at indexedDb. |
Hi @Tailslide , thanks for the quick response. Yes when I comment out the line for UsePersist the app works with no issues. I haven't tried 5.9.0 with the sample application. I did download and run the sample app with no issues. I also change my version to 5.9.0 as I taught it might be an issue as the your docs indicate support at 5.9.0 level but it was still giving me the same issue. I would like however to get rid of the in copy memory from Fluxor as its quite large, that was the main reason at looking at this package. I've never used indexedDb would that be a addon to Fluxor or a replacement all together.... |
Fluxor Persist will not solve your memory problems even if we get it working on your project. IndexedDb is a completely different system than Fluxor. It is a database built into the browser you can inspect it with F12 from the browser. Here is a library for it: https://github.com/amuste/DnetIndexedDb The author disappeared so here is a fork and .NET 7 nuget I made of it: If you have just certain states that are huge you might want to move those states from Fluxor to IndexedDb but then they will of course not be Fluxor states anymore. |
Hi @Tailslide , thanks for the clarification and information, much appreciated. |
Did you ever get this working? If you're still stuck since the sample is working for you just gradually copy your project into the sample project and keep testing after each page/state to make sure it doesn't break. |
Feel free to re-open this issue or open another issue if you need more help. |
Same problem. FLuxor version 5.9.1. Sample code is not working |
Ok I will take a look when I get a chance |
I am using Blazor Server and followed the instructions on setting this up e.g. this was added to main, where I essentially copy the sample LocalStateStorage class
When I start my app, I see the error at the top of the page "Attempting to reconnect to the server: 1 of 8" the console has the following error "[2023-09-10T17:05:49.166Z] Error: Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error.'.
log @ blazor.server.js:1
"
The page eventually loads and I can see my view, data has loaded, store is created in localstorage. I now click on a detail page for an item or navigate to another page etc. same error etc.
Am I missing something for the setup? Does this work with Blazor Server vs Blazor WASM? I am using "Fluxor Version="5.9.1" and Blazored.LocalStorage" Version="4.4.0"
The text was updated successfully, but these errors were encountered: