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
[Bug]GetItemAsync and SetItemAsync throw System.Threading.Tasks.TaskCanceledException: 'A task was canceled.' #33
Comments
Hi @tripleacoder, the quick answer to your question is I don't know. When large amounts of data are stored in browser stroage (local or session) people seem to be finding issues like the one you've raised. I'm not sure yet if this is an issue with browser storage or something to do with Blazor/this library. Could you try and produce a minimal repro of the issue so I can debug it? So far we haven't been able to do that/had someone willing to do it. |
I can repro it in my project right now, 100% of the time by calling SetItemAsync with a null argument. |
Ok, but I need a working repro project. What you've just described is also different to your initial issue. |
No, it seems related... If I call SetItemAsync first with a complex object with 100 child objects it works. Could the problem be caused by the code that is erasing the previous entry? |
This bug appears to be related to shared nodes in an object tree. I'm working on a repro project now. |
I have made a repro project: |
Can you repro it..? |
Was this resolved? What if you use JSON or serialization? |
Hi Chris, |
Hi @tripleacoder. Apologies this one slipped off my radar. I'll take a look at this at the weekend. |
The bug is still there after upgrading to v. 2.1.0. |
The bug is also present when using the Newtonsoft JSON serializer instead of the default one. |
@chrissainty |
In my new app, I'm trying to use SessionStorage to store larger graphs of objects (a few hundreds).
However, I often get 'A task was canceled' from GetItemAsync and SetItemAsync. Also, Blazor shows the message "Attempting to reconnect to server" both when doing local debugging and when deployed to an IIS server.
What is the performance of SessionStorage when storing and retrieving 100s of objects? Is it advisable to do so?
Hosting Model:
The text was updated successfully, but these errors were encountered: