-
Notifications
You must be signed in to change notification settings - Fork 135
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
File upload crushes in debug mode #391
Comments
Package 4.0.5 include try / catch in the OnChange method of GridCreateComponent and GridUpdateComponent |
Thank you! But actually it does not help to catch the error. If I put breakpoint at the first line within try-catch block of OnChange() method, it stops there for a second or less and then application silently crushes without catching anything and hence nothing is written in console output (except that the process finished with code -1). |
Just in case... have you tried it for yourself to upload file in debug mode? If it works smoothly, then could the reason of our app's crushing be some bug that you have fixed earlier this year? As a matter of fact we use GridBlazor source codes in our project (not package) and we have never updated them since March. |
I've just test it using one of my projects and it works fine in debug mode. The used version is 4.0.4. I've also upgraded to the last version (4.0.5) with no issues. By the way, this app uploads a file to the server, and the server stores it in Azure Store. |
Hello! Eventually I decided to try out your example app and it failed in debug mode similarly just after I have chosen a file to upload. It stopped for about a second on the breakpoint on first line of the GridCreateComponent.OnChange() method and then crushed. I tried it on the EmployeeComponent.razor which shows up after clicking Employee's Grid label on Embedded page. |
"By the way, this app uploads a file to the server, and the server stores it in Azure Store." - didn't really catch the point, how can the way we store file be related with the current problem of debugging the app? |
As far as I understand your sample app (the one available after clicking on the "Employees" button of this sample https://gridblazor.azurewebsites.net/embedded) uploads file to cloud service. On the contrary, our app stores uploaded files in database. Still, both crush in debug mode just after the file has been chosen. |
For some reason it is not possible to debug my Blazor Server (NET 7.0) implementation of ICrudFileService because in debug mode file upload simply crushes without logging any messages to the console. Perhaps it is somehow related to the "File chooser dialog can only be shown with a user activation." problem which I encounter while debugging step-by-step ButtonFileClicked method. I was also able to hit breakpoint in OnChange() method of GridCreateComponent, but then it immediately crushes without any exceptions (adding try-catch inside OnChange and ErrorBoundary in my main layout didn't help to catch something). Seems that the process is simply killed.
Upd: Eventually I have managed to debug my error since it occured to be earlier in ICrudDataService which does not depend on file upload component. Still, it is quite complex to debug file processing code (if one needs to) without debug mode with just writing "breakpoints" to console.
The text was updated successfully, but these errors were encountered: