mozilla-lockwise / lockwise-android

Firefox's Lockwise app for Android
https://mozilla-lockwise.github.io/lockwise-android/
Mozilla Public License 2.0
623 stars 104 forks source link

Lockwise crashes when trying to open web address with no http/https/www #1068

Open abodea opened 4 years ago

abodea commented 4 years ago

Steps to reproduce

  1. Launch Lockwise.
  2. Login with valid credentials.
  3. On the entries, list access any account that has a Web address like this: google.com
  4. On the Web address tap on the URL or on the dedicated icon in order to open it in the browser.

    Expected behavior

    "Open links with" menu should be displayed with all the installed browsers. (in case no default browser is set)

    Actual behavior

    Lockwise crashes when tapping on the Web address or dedicated button for web address.

    Device & build information

    • Device: Google Pixel 3a XL(Android 10).
    • Build version: 3.2.0 (Build 5522).

      Notes

      ezgif-1-a41e396ec980 Note that I don't really know how I got a credential only with google.com without an https:// in front. I tried to add a new credential on the Lockwise desktop but it always added the https://. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | No Activity found to handle Intent { act=android.intent.action.VIEW dat=google.com }

abodea commented 4 years ago

--------- beginning of crash
2019-11-18 15:11:02.685 11884-11884/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: mozilla.lockbox, PID: 11884
    n.a.s.b: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | No Activity found to handle Intent { act=android.intent.action.VIEW dat=google.com }
        at n.a.u.b.a$l.a(Functions.java:2)
        at n.a.u.d.g.a(LambdaObserver.java:8)
        at n.a.u.d.g.b(LambdaObserver.java:5)
        at n.a.u.e.b.q$a.run(ObservableObserveOn.java:23)
        at n.a.q.b.b$b.run(HandlerScheduler.java:1)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=google.com }
        at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2058)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1716)
        at android.app.Activity.startActivityForResult(Activity.java:5192)
        at l.l.d.d.startActivityForResult(FragmentActivity.java:6)
        at android.app.Activity.startActivityForResult(Activity.java:5150)
        at l.l.d.d.startActivityForResult(FragmentActivity.java:3)
        at android.app.Activity.startActivity(Activity.java:5521)
        at c.a.b.i$a.a(AppRoutePresenter.kt:42)
        at c.a.b.j.a(Unknown Source:2)
        at n.a.u.d.g.b(LambdaObserver.java:2)
        at n.a.u.e.b.q$a.run(ObservableObserveOn.java:23) 
        at n.a.q.b.b$b.run(HandlerScheduler.java:1) 
        at android.os.Handler.handleCallback(Handler.java:883) 
        at android.os.Handler.dispatchMessage(Handler.java:100) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7356) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
2019-11-18 15:11:02.688 1308-12138/? I/DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
2019-11-18 15:11:02.689 1308-5999/? W/ActivityTaskManager:   Force finishing activity mozilla.lockbox/.view.RootActivity
2019-11-18 15:11:02.697 1308-1405/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
2019-11-18 15:11:02.697 1308-1405/? W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
2019-11-18 15:11:02.708 11884-11884/? I/Process: Sending signal. PID: 11884 SIG: 9
2019-11-18 15:11:02.757 781-12137/? E/ResolverController: No valid NAT64 prefix (109, <unspecified>/0)
2019-11-18 15:11:02.757 781-12137/? W/SocketClient: write error (Broken pipe)
2019-11-18 15:11:02.757 781-12137/? W/DnsProxyListener: GetAddrInfoHandler::run: Error writing DNS result to client
2019-11-18 15:11:02.764 1308-1688/? W/InputDispatcher: channel '732ed49 mozilla.lockbox/mozilla.lockbox.view.RootActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
2019-11-18 15:11:02.764 1308-1688/? E/InputDispatcher: channel '732ed49 mozilla.lockbox/mozilla.lockbox.view.RootActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2019-11-18 15:11:02.765 1308-3063/? I/ActivityManager: Process mozilla.lockbox (pid 11884) has died: vis+99 TOP 
abodea commented 4 years ago

Note that this is an edge case as I have a credential only with google.com without a www. or https://. Also, note that when I tapped on the Web address I had the crash pop-up but when I tapped on the dedicated button for the web address, Lockwise was closed but no crash pop-up.