App crashes if user cancels file picker (opened by Web Viewer through file upload)

Hello,
The title sums it all. The app crashes if a user cancels file picker opened by the Web Viewer (through file upload, <input type="file">). Though, everything works fine if the user picks a file.
Best regards,
Ben.

1 Like

you might want to add a test project for our friends at @KodularCreator, so they could fix that bug more easily…
Taifun

I didn’t have any blocks. Simply drag a Web Viewer and go to any website that requires a file upload with it, for example file.io.

@bodymindpower It would be great, if you could test before replying. The Web Viewer does support file upload and it works. It only crashes if you cancel the file picker.

then give us an example (aia) for testing, as Taifun said

Read this again.

… and how do you know then that there is a bug:question:

Please, please read the entire topic before replying.

I have Identified the bug. Thanks @Ben for reporting this

2 Likes

@pavi2410, thanks! Any ETA on when it will be pushed to the public?

Can’t tell because I don’t know myself!:sweat_smile:

3 Likes

It would be great if soon! I am really tired of writing entire web viewer implementation myself for a web app that I already spent 100+ hours on :smile:

Could I perhaps also learn which bug is mentioned here or when it appears?

The bug is that when the user cancels the file upload dialog, the code that handles the dispatching files to WebView expects files (which when cancelled are not available), and thus, the app crashes. The fix is to handle the “cancel” case.

Aha! I got it now, thank you.

So it was something like this:


I’m probably not the only one who has never used it.