DeepLAndroid
DeepLAndroid copied to clipboard
[bug] reproducible crash
Steps to reproduce
- open the app and click on the hamburger menu in the upper right corner
- click on
Android app - click on the
GET IT ON Google PlayButton
- the google play site should load for ~2 seconds, but then the site (not yet the app) crashes
- the screen should now contain the message
Oops, failed to connect to DeepL serverwith a reload button below and a Toast message showsnet::ERR_UNKNOWN_URL_SCHEME
- Leave the app, e.g. by clicking your home or overview button
- the app should now crash
stack trace
Scoop catches the following stack trace:
FATAL EXCEPTION: main
Process: com.example.deeplviewer, PID: 25527
java.lang.NullPointerException: findViewById(R.id.webview) must not be null
at com.example.deeplviewer.MainActivity.onSaveInstanceState(Unknown Source:17)
at android.app.Activity.performSaveInstanceState(Activity.java:1496)
at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1386)
at android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:4762)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4066)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4125)
at android.app.ActivityThread.-wrap25(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6548)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
possible cause
the toast message suggests, that the google play site tries to open a URL with an unknown protocol, probably something that tries to open the play store app.
The webview doesn't know how to handle the URL and crashes, deepl crashes because the webview is now null.
Thus the crash may only occur on devices without the Google Play Store (like mine).
Device Info
Model: SHIFT6m Android: 8.1 without any google services (ShiftOS-L)