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
Blazor failed to load large fils #15777
Comments
Since this seems to be due to the underlying Mono WebAssembly platform rather than anything in Blazor, would you be able to report it to https://github.com/mono/mono? Please mention that this is WebAssembly-specific. |
@SteveSandersonMS Seems to be this is indeed could handled on the Blazor side. @kumpera suggest that this is due to way how Blazor configure memory in Mono/WASM. Seems to be there no explicit memory limits in the Blazor and Mono think that memory unlimited, and as such it does not report OOM. If you think it would be worth investigation closes, I could take a look, since I don't like my current workaround for an issue. |
@kant2002 I believe this will be addressed by https://github.com/aspnet/Blazor/issues/1606 |
@danroth27 thanks! From my understanding that's really the cause |
Hi, I experience something similar today, with Blazor 0.7.
Everything works with files smaller then around 3 MB. My first try, was to get the file content from JS in one big BASE64 string. That failed on +3 MB files. My second try, was to get data from JS in smaller chuncks, and then build the Byte[] in C#. That failed on +3 MB files. My last try, was to stop getting the data into a Byte[], and insted into a MemoryStream. Now I am stuck at:
Where I now get the CG_MAJOR error. |
@rpc-scandinavia |
Thank you @Suchiman, I copy that. I am still working on my problem, and can see that the server receives and responds correctly to the request. In the browsers "Network" I can see that the response to the POST is correct. But I get a exceptiion, which didn't show before I used the MemoryStream (unless I didn't wait long ernough :-) Error: System.InvalidOperationException at System.Threading.Tasks.TaskCompletionSource`1[TResult].SetResult (TResult result) <0x41c6f08 + 0x0001c> in <4b5441f51da44e28b14fa0baa2935bda>:0 at Microsoft.AspNetCore.Blazor.Browser.Http.BrowserHttpMessageHandler.ReceiveResponse (System.String id, System.String responseDescriptorJson, System.Byte[] responseBodyData, System.String errorText) <0x41b92b8 + 0x000e0> in <6e8b4c57aeeb4593b71c0de6d0ce9454>:0 |
@rpc-scandinavia this is more interesting |
It is likely not Blazor issue per se, but I would be good if it fail more gracefully, if some inherent limitations from the Browser.
Basically I have following error in Chrome:
My scenario following. I have form with input file.
User select text file.
Then application load file, split by lines and process file.
When I load file with only 914KB it works. When I load larger file 7876KB it fails to load with aforementioned error. Not sure who is to blame.
The text was updated successfully, but these errors were encountered: