streetcomplete / StreetComplete

Easy to use OpenStreetMap editor for Android
https://streetcomplete.app
GNU General Public License v3.0
3.9k stars 355 forks source link

Login page crash #5724

Closed Cj-Malone closed 3 months ago

Cj-Malone commented 3 months ago

How to Reproduce

  1. Be logged out
  2. Answer quests
  3. Click upload icon
  4. Click OK on login popup
  5. Login page loads (white page, blue login button), but crashes instantly

SC 58

java.lang.IllegalStateException: Fragment LoginFragment{1bc0d7a} (997390a5-dfea-44e1-b0f0-b2b2aa191550) did not return a View from onCreateView() or this was called before onCreateView().
    at androidx.fragment.app.Fragment.requireView(Unknown Source:31)
    at de.westnordost.streetcomplete.util.FragmentViewBindingPropertyDelegate.getValue(SourceFile:0)
    at de.westnordost.streetcomplete.screens.user.login.LoginFragment.getBinding(Unknown Source:7)
    at de.westnordost.streetcomplete.screens.user.login.LoginFragment.access$getBinding(Unknown Source:0)
    at de.westnordost.streetcomplete.screens.user.login.LoginFragment$OAuthWebViewClient.onPageStarted(Unknown Source:7)
    at WV.iK.c(chromium-TrichromeWebView6432.apk-stable-647812433:16)
    at WV.R5.handleMessage(chromium-TrichromeWebView6432.apk-stable-647812433:505)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7940)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ExecInit.main(ExecInit.java:49)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)

Log:
2024-07-07T09:56:37.962: I [Preloader] Loaded country boundaries in 0.1s
2024-07-07T09:56:38.274: I [Preloader] Loaded features dictionary in 0.4s
2024-07-07T09:56:38.275: I [Preloader] Preloading data took 0.4s

SCEE 58

java.lang.IllegalStateException: Fragment LoginFragment{3eabb36} (dc29815f-3312-433f-b946-5fb625fb007a) did not return a View from onCreateView() or this was called before onCreateView().
at androidx.fragment.app.Fragment.requireView(Fragment.java:2063)
at de.westnordost.streetcomplete.util.FragmentViewBindingPropertyDelegate.getValue(ViewBinder.kt:80)
at de.westnordost.streetcomplete.screens.user.login.LoginFragment.getBinding(LoginFragment.kt:32)
at de.westnordost.streetcomplete.screens.user.login.LoginFragment.access$getBinding(LoginFragment.kt:27)
at de.westnordost.streetcomplete.screens.user.login.LoginFragment$OAuthWebViewClient.onPageStarted(LoginFragment.kt:124)
at WV.iK.c(chromium-TrichromeWebView6432.apk-stable-647812433:16)
at WV.R5.handleMessage(chromium-TrichromeWebView6432.apk-stable-647812433:505)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7940)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ExecInit.main(ExecInit.java:49)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)

Log:
2024-07-04T22:19:34.628: I [MainFragment] onStart (add listeners)
2024-07-04T22:19:34.635: I [MainFragment] onResume
2024-07-04T22:19:38.996: I [MainFragment] onPause
2024-07-04T22:19:40.162: I [MainFragment] onStop (remove listeners)
2024-07-04T22:19:40.162: I [MainFragment] onSaveInstanceState
2024-07-04T22:19:41.350: I [MainFragment] onAttach
2024-07-04T22:19:41.357: I [MainFragment] onCreate
2024-07-04T22:19:41.441: I [MainFragment] onCreateView
2024-07-04T22:19:41.464: I [MainFragment] onViewCreated
2024-07-04T22:19:41.517: I [MainFragment] onViewStateRestored
2024-07-04T22:19:41.522: I [MainFragment] onStart (add listeners)
2024-07-04T22:19:41.535: I [MainFragment] onResume
2024-07-04T22:19:41.652: I [Preloader] Loaded country boundaries in 0.1s
2024-07-04T22:19:41.999: I [Preloader] Preloading data took 0.5s
2024-07-04T22:19:41.999: I [Preloader] Loaded features dictionary in 0.5s
2024-07-04T22:19:48.681: I [MainFragment] onPause
2024-07-04T22:20:12.372: I [MainFragment] onCreate
2024-07-04T22:20:12.372: I [MainFragment] onAttach
2024-07-04T22:20:12.401: I [MainFragment] onCreateView
2024-07-04T22:20:12.439: I [MainFragment] onViewCreated
2024-07-04T22:20:12.507: I [MainFragment] onViewStateRestored
2024-07-04T22:20:12.516: I [MainFragment] onStart (add listeners)
2024-07-04T22:20:12.534: I [MainFragment] onResume
2024-07-04T22:20:12.647: I [Preloader] Loaded country boundaries in 0.1s
2024-07-04T22:20:13.025: I [Preloader] Loaded features dictionary in 0.5s
2024-07-04T22:20:13.026: I [Preloader] Preloading data took 0.5s
2024-07-04T22:20:17.283: I [MainFragment] onPause
2024-07-04T22:20:18.054: I [MainFragment] onStop (remove listeners)
2024-07-04T22:20:18.055: I [MainFragment] onSaveInstanceState
2024-07-04T22:20:22.604: I [MainFragment] onStart (add listeners)
2024-07-04T22:20:22.645: I [MainFragment] onResume
2024-07-04T22:20:25.349: I [MainFragment] onPause
2024-07-04T22:20:37.088: I [MainFragment] onCreate
2024-07-04T22:20:37.089: I [MainFragment] onAttach
2024-07-04T22:20:37.109: I [MainFragment] onCreateView
2024-07-04T22:20:37.156: I [MainFragment] onViewCreated
2024-07-04T22:20:37.202: I [MainFragment] onViewStateRestored
2024-07-04T22:20:37.205: I [MainFragment] onStart (add listeners)
2024-07-04T22:20:37.220: I [MainFragment] onResume
2024-07-04T22:20:37.400: I [Preloader] Loaded country boundaries in 0.2s
2024-07-04T22:20:37.732: I [Preloader] Preloading data took 0.5s
2024-07-04T22:20:37.732: I [Preloader] Loaded features dictionary in 0.5s
2024-07-04T22:20:40.849: I [MainFragment] onPause
2024-07-04T22:20:40.889: I [MainFragment] onStop (remove listeners)
2024-07-04T22:20:40.895: I [MainFragment] onSaveInstanceState
2024-07-04T22:20:43.332: I [MainFragment] onCreate
2024-07-04T22:20:43.332: I [MainFragment] onAttach
2024-07-04T22:20:43.407: I [MainFragment] onCreateView
2024-07-04T22:20:43.448: I [MainFragment] onViewCreated
2024-07-04T22:20:43.491: I [MainFragment] onViewStateRestored
2024-07-04T22:20:43.492: I [MainFragment] onStart (add listeners)
2024-07-04T22:20:43.498: I [MainFragment] onResume
2024-07-04T22:20:43.709: I [Preloader] Loaded country boundaries in 0.2s
2024-07-04T22:20:44.060: I [Preloader] Loaded features dictionary in 0.5s
2024-07-04T22:20:44.060: I [Preloader] Preloading data took 0.6s
2024-07-04T22:20:47.311: I [MainFragment] onPause
2024-07-04T22:20:54.360: I [MainFragment] onAttach
2024-07-04T22:20:54.361: I [MainFragment] onCreate
2024-07-04T22:20:54.392: I [MainFragment] onCreateView
2024-07-04T22:20:54.429: I [MainFragment] onViewCreated
2024-07-04T22:20:54.483: I [MainFragment] onViewStateRestored
2024-07-04T22:20:54.486: I [MainFragment] onStart (add listeners)
2024-07-04T22:20:54.502: I [MainFragment] onResume
2024-07-04T22:20:54.613: I [Preloader] Loaded country boundaries in 0.1s
2024-07-04T22:20:54.984: I [Preloader] Loaded features dictionary in 0.5s
2024-07-04T22:20:54.984: I [Preloader] Preloading data took 0.5s
2024-07-04T22:20:58.255: I [MainFragment] onPause
2024-07-04T22:20:59.030: I [MainFragment] onStop (remove listeners)
2024-07-04T22:20:59.032: I [MainFragment] onSaveInstanceState
2024-07-04T22:21:01.361: I [MainFragment] onStart (add listeners)
2024-07-04T22:21:01.367: I [MainFragment] onResume
2024-07-04T22:21:06.638: I [MainFragment] onPause

Expected Behavior

The webview should load with the osm.org login page and allow me to authenticate.

Versions affected SC 58.0 SC 58.1 SCEE 58.0 Android 13 (GrapheneOS)

Cj-Malone commented 3 months ago

GrapheneOS has changed the browser a little. However when I access the login page via "My Profile", and then click "login" the web view loads.

westnordost commented 3 months ago

Do you log in through third party? (e.g. Google)

Cj-Malone commented 3 months ago

No.

This crash happens before the webview loads.

westnordost commented 3 months ago

Interesting, that we get a callback from the webview client for page load before the webview loaded. But anyway, I am not it. I am migrating this screen to compose.

Cj-Malone commented 3 months ago

Thank you. I can't reproduce in 58.2.

Chepycou commented 3 months ago

Hey, Just updated to the latest 58.2 version. When logging in (whether there are changes pending upload or not), I can enter my login/password but then get an error : "Cannot connect to authentication server" (translated by me since it's not in English, so it may vary) and it goes back to the "you have x pending uploads" page.

It does not seem to be linked to my network (I tried cellular and home networks) Android version 13, same problem on SC and SCEE

westnordost commented 3 months ago

OpenStreetMap ist currently under a DDOS attack, upload is not usable at the moment.

HolgerJeromin commented 3 months ago

Ref https://community.openstreetmap.org/t/openstreetmap-org-ddos-attack-11-july-2024/115912 https://en.osm.town/@osm_tech/112767179439450647