Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
osmanowadim opened this issue Aug 31, 2023 · 5 comments
Closed
1 task done

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

osmanowadim opened this issue Aug 31, 2023 · 5 comments
Labels

Comments

@osmanowadim
Copy link

osmanowadim commented Aug 31, 2023

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

  • I agree to follow this project's Code of Conduct
@michael-winkler
Copy link

You should exclude the class inside the proguard rules.

@jennantilla
Copy link
Contributor

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

@ilkancelikMA
Copy link

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

@jinliu9508
Copy link
Contributor

This issue has been addressed in our User Model 5.x.x version. Please upgrade to the latest version, and let us know if you encounter any further issues.

@Daphne-CoffeeIT
Copy link

Daphne-CoffeeIT commented Nov 19, 2024

For me the issue is still happening. The app is on com.onesignal:OneSignal:5.1.25. The company was only created within OneSignal about two weeks ago, so I don't think we're using an older user model.

When I enter "ttps://google.com" like in the original post, the app gets opened in a weird transparant way (so the app below it or the home screen are still visible, but every interaction is blocked, since my app forms some kind of overlay) and this is the stack trace:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=acc://memories.innerr.com/... flg=0x10000000 }
    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2252)
    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1878)
    at android.app.Activity.startActivityForResult(Activity.java:5760)
    at android.app.Activity.startActivityForResult(Activity.java:5718)
    at android.app.Activity.startActivity(Activity.java:6216)
    at android.app.Activity.startActivity(Activity.java:6183)
    at com.onesignal.notifications.internal.NotificationsManager.openDestinationActivity(NotificationsManager.kt:176)
    at com.onesignal.notifications.internal.listeners.NotificationListener.onNotificationOpened(NotificationListener.kt:115)
    at com.onesignal.notifications.internal.listeners.NotificationListener$onNotificationOpened$1.invokeSuspend(Unknown Source:15)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:28)
    at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:99)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
    at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$1.invoke(ThreadUtils.kt:69)
    at com.onesignal.common.threading.ThreadUtilsKt$suspendifyOnThread$1.invoke(ThreadUtils.kt:67)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants