Open LiohMoeller opened 1 month ago
@Jaifroid Can we still support Ubuntu Touch devices properly?
@LiohMoeller @kelson42 The problem is that I don't have an Ubuntu Touch device to test on. I've no idea why the API has broken. I wonder if it's been restricted recently? We used to have someone willing to test, and we'd send them a package before release, they'd test it and also diagnose any issues. For the last several releases, we've been releasing blind for this platform. I'm not sure what I could do about it unless someone with a device were willing to take a look at the code and debug, or at least point me in the right direction. Possibly the File System Access API appears to be supported but isn't actually, and the fallback to the old File Picker isn't working.
@LiohMoeller Are you able to test on a device and help us a bit with the root cause analysis?
I can just send/donate you a device for development, if that would help.
@LiohMoeller That's very kind, but let me see if there's a reliable simulator I could use first, as I think testing on real hardware would be a bit of a last resort (testing time is already quite onerous). I'll come back to you once I've done some research on this.
So it seems there is this Ubuntu Touch development kit: https://github.com/ubports/ubports-pdk . I'll see if I can get that to run in order to reproduce the issue.
Hi team,
Before proceeding, I wanted to ask if the team has already tested the content picker issue using the Ubports PDK to simulate the environment?
Since I don’t have access to an Ubuntu Touch device, my plan is to start by setting up this PDK to simulate the environment. This should help me:
Once I have the PDK set up, I’ll begin debugging the content picker and share my findings. Let me know if you have any specific areas in the codebase you think I should focus on, or any additional guidance for testing.
Thanks, no we haven't tried replicating the issue yet, so it would be great if you could confirm the bug in the simulator.
The fallback to the standard HTML5 file picker happens if no support for the File System Access API or the webkitdirectory
property is found. If either of those are found, then the HTML5 file picker gets hidden. My suspicion is that the APIs appear to be supported, but actually aren't on Ubuntu Touch.
Also, the fact that there is a "Select folder" button strongly suggests my hypothesis is true. One of these APIs is being detected, but something is breaking. If neither of those APIs were detected, then the system would show the HTMl5 file picker only, and no "Select folder".
Thanks for the details! Could you point me to the specific file or section of the codebase where the content picker’s behavior and fallback mechanisms are handled? This will help me focus on the right part while testing the bug on the Ubuntu Touch emulator. Let me know, and I’ll dive in!
Yes of course, just search for openLocalFiles
in your code editor, and you should find the picker in index.html
and app.js
(where the initial logic is handled). There is also abstractFilesystemAccess.js
which deals with the logic for the File System Access API, webkitdirectory
and a few other things.
Before I start debugging the content picker issue, could you let me know which version of Ubuntu (or Ubuntu Touch) I should focus on testing this for? This will help ensure I'm replicating the correct environment.
@AyushSahoo19 The bug report was from @LiohMoeller , but I'm assuming this is the latest Ubuntu Touch, because we never had this issue on previous versions of the app (at least until a couple of years ago -- no reports of anything till now). I'm assuming something broke recently (but it could be our end of course).
Ok, I’ll proceed with testing the issue on the recent version of Ubuntu Touch.
On Ubuntu Touch it is not possible to add a zim file, as the content picker does not show up on a click on the 'Load ZIM' or 'Select Folder' Button.