Slion / Fulguris

⚡Web Browser
http://fulguris.slions.net
Other
490 stars 48 forks source link

Deep link gives ERR_UNKNOWN_URL_SCHEME by default #598

Open The-First-King opened 8 months ago

The-First-King commented 8 months ago

Description

It's not possible to add new account in DAVx5 when using Fulguris web-browser due to the following error shown below.

Web page not available

The web page at at.bitfire.davdroid:/oauth2/redirect?state=abc&code=abc&scope=https://www.googleapis.com/auth/calendar%20https://www.googleapis.com/auth/carddav could not be loaded because:

net::ERR_UNKNOWN_URL_SCHEME

NOTE: Last time it might be working fine with Fulguris v1.9.13 (not sure). But the Android System WebView version was different. It has been tested in the middle of October 2023.

Environment

To reproduce

Steps to reproduce the behaviour:

  1. Open DAVx5 and click on the “+” button.
  2. Select the radio bar with Google Contacts / Calendar and click the “LOGIN” button.
  3. In the Google account text field type the e-mail address and click enter button on the keyboard to proceed with redirection. Fulguris web-browser will be opened.
  4. After confirming Google account’s credential the error message will appear.

Expected behaviour

Redirection back to the DAVx5 application should work after Google authentication completes in Fulguris.

Workaround

The problem is not present when changing the default web-browser in Android OS from Fulguris to Jelly (default web-browser in LineageOS).

Slion commented 8 months ago

I don't think anything has been changed in Fulguris in this regard lately. Also I believe the error you are getting comes from the WebView itself. Though I'm confident this could be worked around in Fulguris somehow. Unlikely to look at it any time soon however.

The-First-King commented 8 months ago

Yea, it may be related to the WebView version. Currently, I'm using the latest version 120.0.6099.210. The default version is disabled, but it is 112.0.5615.48.

When I used a workaround, I disabled both Fulguris and WebView v120.0.6099.210. It works with Jelly and WebView v112.0.5615.48 i.e. how it would be if I wouldn't install Fulguris and the latest WebView version.

The-First-King commented 6 months ago

It appears that the Dropbox plugin for Ghost Commander is also impacted by the same problem. Good news - it doesn't related to the WebView implementation. Fulguris v1.9.8 is working fine. It looks to be related to some regression in the web-browser with permission level requests.

The-First-King commented 6 months ago

I have found an exact release when the problem appears. It is Fulguris v1.9.17. The last working version is 1.9.16.

Fulguris doesn’t ask for permission to open a third party application, and this behavior is causing the “net::ERR_UNKNOWN_URL_SCHEME” error message.

Slion commented 6 months ago

Nice investigation. Try change the Launch app option in default domain settings to Ask or Yes and see if that helps.

The-First-King commented 6 months ago

Indeed, it works well now! Just tested with the latest Fulguris v1.9.24.

Slion commented 6 months ago

Ho dear, I should have thought of that earlier really. I've had such deep links issues myself lately too. I just did not connect the dots. Launch app option should be set to Yes by default as that's what most people need and expect.

Did you try with both Yes and Ask? Did it work as expected in both cases?

Again, good job on that investigation and thanks for supporting Fulguris.

The-First-King commented 6 months ago

I have tested both options with Ask and Yes. They are both working.

Slion commented 6 months ago

Related to #548, #542.

The-First-King commented 6 months ago

Redirection to 3rd party apps are no longer working after the fix. Now it doesn't matter what is set Yes or Ask in default domain settings.

Slion commented 5 months ago

That's not cool. What do you get then?

The-First-King commented 5 months ago

API request authorization is appearing:

01

When tapping Allow button, nothing happens. No errors, no redirection, or anything,

02

Unfortunately, the latest version of Fulguris is not usable in this scenario. Just downgraded it back to 1.9.24 release.