Skip to content

Crash when opening a link that no installed app can handle #148

Description

@jim-daf

In WebviewActivity the shouldOverrideUrlLoading handler sends any link that is not a WhatsApp URL to an external app with startActivity(new Intent(Intent.ACTION_VIEW, url)). There is no guard around that call, so when the device has no app registered for the link the app crashes with ActivityNotFoundException.

This is easy to hit from a chat. A tel: number, or a link with a scheme the phone cannot open, is enough to bring the app down when nothing handles it.

Catching the failure and showing a short message would keep the app running. WhatsApp Web links keep loading in the WebView as before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions