Skip to content
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

oauth problem, older android. SC 58.1 works #6078

Closed
plzen42 opened this issue Jan 3, 2025 · 10 comments
Closed

oauth problem, older android. SC 58.1 works #6078

plzen42 opened this issue Jan 3, 2025 · 10 comments
Labels
bug upstream result from an upstream issue

Comments

@plzen42
Copy link

plzen42 commented Jan 3, 2025

I have problem with oauth on android 5.1. I know, it is old, but installation is still supported for both SCEE and streetcomplete.

When I sign to my OSM account and authorise SCEE/screetcomplete, probably android system web viewer (the newest version is not available for android 5, I use 95.0.4638.74) shows error:

Web page not available
The web page at streetcomplete://oauth?code=RRMnidVSIqXvAOk5SPoT1nlSbSYp28tGDO46ml-zmOI could not be loaded because:

net::ERR_UNKNOWN_URL_SCHEME

I tried to paste the url to web browser (firefox/fennec) and press "open in app", but nothing happens. Everything is same for both apps (SCEE and Streetcomplete) and when I repeat it. I also tried some (not very old) older versions with the same result.

Versions affected
Streetcomplete 60.0, SCEE 59.1, SCEE 59.0, SC 58.2

Version 58.1 working

@Helium314
Copy link
Collaborator

ERR_UNKNOWN_URL_SCHEME

Shouldn't <data android:scheme="streetcomplete" /> handle that?

@matkoniecz
Copy link
Member

matkoniecz commented Jan 3, 2025

Given that SC is registered to this scheme it sounds like it is sadly bug of other software.

Also, some Android 5 users were able to login so it seems like more localized bug. I guess you can try some older SC version to confirm it is not a regression and that older versions are also affected?

@plzen42
Copy link
Author

plzen42 commented Jan 3, 2025

It's problem since 58.2. 58.1 working well. There was something done with login in 58.2
https://github.com/streetcomplete/StreetComplete/releases/tag/v58.2

@westnordost
Copy link
Member

westnordost commented Jan 3, 2025

Well, regardless, it's very likely an issue with the system's WebView.

You are welcome to have a closer look (i.e. bisect) at what change in v58.2 introduced the issue for you. It will probably lead you to a third-party dependency where you could create an issue report.

Due to some other upcoming constraints, the minimum Android version will likely be increased to Android 6 or Android 7 soon-ish. So, to me, it is not worth it to investigate this. The constraint specifically is maplibre-compose, to which we will migrate soon-ish.

See sargunv/maplibre-compose#9 regarding the constraint by maplibre-compose. Here, it'd also require someone to investigate how to lower the minimum API level to 21 (Android 5.1) and I fear, developers increasingly don't care to support Android 5 anymore, i.e. don't want to put in the time. Me included, as mentioned.

@plzen42
Copy link
Author

plzen42 commented Jan 3, 2025

Thanks for reply. As for me, I will probably perform an investigation on what's different and making problem. However, as you said, it is not valuable to put much time to it because the min. API level will be increased. I can have a short look to maplibre-compose, but I think I will not be able to do anything with it (with my not really big experience). API level 22 (5.1) is used by approx. 1 % of android users, so it has not big meaning to waste time with it.

And if someone (like I) wants to use SC(EE), they could still use older version of it (58.1). After logging it, they could upgrade to 60, as I did. And old versions will still be usable after increasing API level, or wouldn't?

@Helium314
Copy link
Collaborator

And old versions will still be usable after increasing API level, or wouldn't?

Yes, they should remain usable unless there are some issues with authorisation (e.g. #4028), or some hardcoded URL changes (background map, and theoretically OSM).

@matkoniecz matkoniecz changed the title oauth problem, older android oauth problem, older android. SC 58.1 works Jan 3, 2025
@matkoniecz
Copy link
Member

I will close this issue then. Sadly support for Android 5 is going away in general, but if someone figures out a viable fix then info is welcome.

In meantime logging in an old version is a viable workaround

@matkoniecz matkoniecz closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2025
@westnordost
Copy link
Member

Well, to be clear, the min api level will soon have to be increased because of the min supported api level of the mentioned library. If the min supported api level of that library was to be lowered to 21, then also StreetComplete could remain on 21.

@mnalis
Copy link
Member

mnalis commented Jan 11, 2025

FYI, just to note that login doesn't work on Android 6 either anymore (seemingly regardless of webview version).

So SDK 25 (or SDK 24, which I don't have a device for) seems to be required to be able to login in post-SC-58.1 (i.e. when SC switched to using io.github.kevinnzou:compose-webview-multiplatform-android for OAuth?)


Tested:

  • ERROR: Lenovo PHAB2 (Android 6.0.1, webview 55.0.2883.91 as well as upgraded webview 95.0.4638.74)
  • login OK: Samsung Galaxy S23+ (Android 14, SDK 34, webview 131.0.6778.200)
  • login OK: Redmi Note 6 Pro (Android 11, SDK 30 [LineageOS 18.1 api9], webview 106.0.5249.126)
  • login OK: Huawei P30 Pro (Android 10, SDK 29, webview 131.0.6778.200)
  • login OK: Samsung Galaxy S2 (Android 7.1.2, SDK 25 [LineageOS 14.1 api7], webview 69.0.3497.109) (but app doesn't work due to only having GLES 2.0 and not GLES 3.0 that recent MapLibre seems to require: No map is displayed on Android 7.1 in SC 59.0+ #6029)
  • ERROR: Redmi Note 3 Pro (Android 6.0.1, sdk 23, webview 97.0.4692.70)

I've confirmed (on that last device) that old SC version workaround works (i.e. installing StreetComplete 58.1, logging in there, and then upgrading to 60.0, allows the user to upload quests).

@westnordost
Copy link
Member

westnordost commented Jan 11, 2025

Can reproduce in an emulator. The source of the issue is in a dependency, the compose-webview-multiplatform. I investigated it a bit and described in this ticket what it would take to fix it:

KevinnZou/compose-webview-multiplatform#267

It's not much, it just takes someone to get to it and contribute the fix to the linked project.

@westnordost westnordost added the upstream result from an upstream issue label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug upstream result from an upstream issue
Projects
None yet
Development

No branches or pull requests

5 participants