ncarlier / readflow

readflow is a news-reading (or read-it-later) solution focused on versatility and simplicity.
https://about.readflow.app
GNU Affero General Public License v3.0
410 stars 33 forks source link

readflow can't be installed on this device. #81

Open retarepo opened 1 month ago

retarepo commented 1 month ago

Hello,

I recently stumbled over readflow and really like the project, but I need to admit, I have some troubles getting started. Most problems I already got over somehow and I plan to post here my compose file, which includes reverse proxy with trusted-proxy sso.

anyway, the following problem I can not get a handle on. I assume the "Installation" Box in the settings tab is for the PWA setup, right? however get on different devices the error: "Oh! readflow can't be installed on this device. Maybe your device is too old or the current readflow configuration does not allow it. Sad.". The devices are up to date and I can not find any configuration entries for this matter.

I tracked down the error message to this file and I need to admin, my typescript/react is a bit shabby: I understand that the switch block on line 59 is checking this, meaning !!deferredPrompt must be false, which is, without clicking anything equal to window, and there I am lost, is this some keyword in react/javascript or just something I fail to find in the code? I am also not sure what the double exclamation mark means.

Best wishes

ncarlier commented 1 month ago

Hello, thanks for the issue. The logic of the installation was a little shaky. Last commit should improve this. Regarding the double exclamation mark (!!) is generally used to ensure that the object is not empty, null or undefined.

retarepo commented 1 month ago

Hello and thank you for the quick response.

I pulled the latest docker image, which should include https://github.com/ncarlier/readflow/commit/7437f454de84be814d2a15e96692d3e4a62addcb

Unfortunately, the behavior hasn't changed and there is still nothing noticeable in the logs. In case it is relevant, I tried it with a Fairphone 4 (Fairphone OS, branded Android 13) using Firefox 130.0 and a Murena Teracube 2e (ElementOS, Android version 12) using /e/OS Browser 123.0. Any other information I could provide to help?

ncarlier commented 1 month ago

This feature is based on beforeInstallPromptEvent that is limited to some browser: https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent#browser_compatibility If your Browser is not (yet) compatible you can try to install the PWA using browser built-in menu. I will update the screen to improve the message.

retarepo commented 1 week ago

I double checked with another app, and installing pwa works fine on my browser (via built-in menu), but readflow does not install as pwa for me.

I tested it with grocy on the same server, with the same setup (reverse proxy via traefik, and let's encrypt certs).