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
url_launcher java.lang.RuntimeException: Unable to destroy activity, java.lang.IllegalArgumentException: Receiver not registered #127014
Comments
Thanks for the report. I also can reproduce this issue on the latest plugin version.
Crash logD/AndroidRuntime(14071): Shutting down VM
E/AndroidRuntime(14071): FATAL EXCEPTION: main
E/AndroidRuntime(14071): Process: com.example.reproduce_issues, PID: 14071
E/AndroidRuntime(14071): java.lang.RuntimeException: Unable to destroy activity {com.example.reproduce_issues/io.flutter.plugins.urllauncher.WebViewActivity}: java.lang.IllegalArgumentException: Receiver not registered: io.flutter.plugins.urllauncher.WebViewActivity$1@faac413
E/AndroidRuntime(14071): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5478)
E/AndroidRuntime(14071): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5507)
E/AndroidRuntime(14071): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
E/AndroidRuntime(14071): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
E/AndroidRuntime(14071): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
E/AndroidRuntime(14071): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2328)
E/AndroidRuntime(14071): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(14071): at android.os.Looper.loop(Looper.java:255)
E/AndroidRuntime(14071): at android.app.ActivityThread.main(ActivityThread.java:8212)
E/AndroidRuntime(14071): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(14071): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
E/AndroidRuntime(14071): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
E/AndroidRuntime(14071): Caused by: java.lang.IllegalArgumentException: Receiver not registered: io.flutter.plugins.urllauncher.WebViewActivity$1@faac413
E/AndroidRuntime(14071): at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1533)
E/AndroidRuntime(14071): at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1674)
E/AndroidRuntime(14071): at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:725)
E/AndroidRuntime(14071): at io.flutter.plugins.urllauncher.WebViewActivity.onDestroy(WebViewActivity.java:170)
E/AndroidRuntime(14071): at android.app.Activity.performDestroy(Activity.java:8404)
E/AndroidRuntime(14071): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1344)
E/AndroidRuntime(14071): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5463)
E/AndroidRuntime(14071): ... 11 more
W/eproduce_issue(14071): Attempt to remove non-JNI local reference, dumping thread
I/Process (14071): Sending signal. PID: 14071 SIG: 9
Lost connection to device. flutter doctor -v (stable and master)[✓] Flutter (Channel stable, 3.10.0, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
• Flutter version 3.10.0 on channel stable at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 84a1e904f4 (35 hours ago), 2023-05-09 07:41:44 -0700
• Engine revision d44b5a94c9
• Dart version 3.0.0
• DevTools version 2.23.1
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-33, build-tools 32.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.78.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.62.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 13.0.1 22A400 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.92
[✓] Network resources
• All expected network resources are available.
• No issues found! [!] Flutter (Channel master, 3.11.0-6.0.pre.85, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
• Flutter version 3.11.0-6.0.pre.85 on channel master at /Users/huynq/Documents/GitHub/flutter_master
! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2919572fb3 (71 minutes ago), 2023-05-15 19:01:28 -0700
• Engine revision c4d4b40c65
• Dart version 3.1.0 (build 3.1.0-113.0.dev)
• DevTools version 2.23.1
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-33, build-tools 32.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E222b
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.78.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.64.0
[✓] Connected device (3 available)
• RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-x64 • macOS 13.0.1 22A400 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.92
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category. |
Having same issue |
The revert here: flutter/packages#4027 should have fixed this issue, can you confirm whether on the latest version of url_launcher_android you are still encountering this issue? |
I'm getting crashytlics reports of this crash + I can reproduce by opening a site with url_launcher, then returning to the app. url_launcher version 6.1.11. |
Same issue here, with url_launcher version 6.1.11. |
Sorry, I should have clarified that this is fixed specifically in the latest version of url_launcher_android (6.0.34). There was not an associated version change to url_launcher. I've revised my previous comment to avoid confusion. I've also confirmed locally that the issue is reproducible in the (now retracted) version 6.0.33 of url_launcher android, but fixed in 6.0.34. Because of that I'm going to close this as fixed, but please report if you run into this issue while using the latest version of url_launcher_android and we can re-open. |
To upgrade the transitive dependency use this command in the terminal:
|
Works for me |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Is there an existing issue for this?
Steps to reproduce
Expected results
The app should not crash when closing a in app browser.
Actual results
The error mentioned in the title throws and the app crashes.
A more extensive bug report and a (temporary solution) can be found here: https://stackoverflow.com/questions/76244218/flutter-url-launcher-plugin-throws-java-lang-illegalargumentexception-receiver
Code sample
Code sample
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: