OneSignal-Android-SDK icon indicating copy to clipboard operation
OneSignal-Android-SDK copied to clipboard

[Bug]: No Activity found to handle Intent for invalid url

Open osmanowadim opened this issue 1 year ago • 3 comments

What happened?

After sending push notifications with invalid link - "ttps://google.com" app started crashing. Maybe need handle invalid url?

Steps to reproduce?

1. Send push with invalid url
2. In application click on Push Notification
3. Receive crash of application.

What did you expect to happen?

Handle invalid url like in iOS SDK. Just open app in case of invalid url

OneSignal Android SDK version

Release 4.8.6

Android version

13, 12, 11, 10, 9, 8, 7.1, 7.0

Specific Android models

No response

Relevant log output

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.***/com.onesignal.NotificationOpenedReceiver}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=ttps://google.com flg=0x10000000 }
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3606)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3778)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:236)
       at android.app.ActivityThread.main(ActivityThread.java:8097)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

osmanowadim avatar Aug 31 '23 10:08 osmanowadim

You should exclude the class inside the proguard rules.

michael-winkler avatar Aug 31 '23 13:08 michael-winkler

Thanks for bringing this to our attention, @osmanowadim! We'll work on handling invalid urls to prevent a crash.

jennantilla avatar Sep 19 '23 18:09 jennantilla

Hello, do we have any ETA on the fix for this issue?

ilkancelikMA avatar Jul 04 '24 09:07 ilkancelikMA