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

@capacitor/share not work in android 14, capacitor 6 #2068

Closed
josuelmm opened this issue Mar 30, 2024 · 4 comments
Closed

@capacitor/share not work in android 14, capacitor 6 #2068

josuelmm opened this issue Mar 30, 2024 · 4 comments

Comments

@josuelmm
Copy link

Bug Report

Plugin(s)

Share @capacitor/share

Capacitor Version

6

Platform(s)

Android 14

Current Behavior

The plugin capacitor/share show error when play app with andorid 14
Error general
Caused by: java.lang.SecurityException: site.seelight.gps_pro: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts

Additional Context

Process: site.seelight.gps_pro, PID: 14521
java.lang.RuntimeException: Unable to start activity ComponentInfo{site.seelight.gps_pro/site.seelight.gps_pro.MainActivity}: java.lang.SecurityException: site.seelight.gps_pro: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3782)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)

Caused by: java.lang.SecurityException: site.seelight.gps_pro: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.os.Parcel.readException(Parcel.java:2966)
at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684)
at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1852)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792)
at android.app.ContextImpl.registerReceiver(ContextImpl.java:1780)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755)
at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755)
at com.capacitorjs.plugins.share.SharePlugin.load(SharePlugin.java:44)
at com.getcapacitor.PluginHandle.loadInstance(PluginHandle.java:115)
at com.getcapacitor.PluginHandle.load(PluginHandle.java:105)
at com.getcapacitor.PluginHandle.(PluginHandle.java:65)
at com.getcapacitor.Bridge.registerPlugin(Bridge.java:664)
at com.getcapacitor.Bridge.registerAllPlugins(Bridge.java:620)
at com.getcapacitor.Bridge.(Bridge.java:218)
at com.getcapacitor.Bridge.(Unknown Source:0)
at com.getcapacitor.Bridge$Builder.create(Bridge.java:1539)
at com.getcapacitor.BridgeActivity.load(BridgeActivity.java:42)
at com.getcapacitor.BridgeActivity.onCreate(BridgeActivity.java:36)
at site.seelight.gps_pro.MainActivity.onCreate(MainActivity.java:13)
at android.app.Activity.performCreate(Activity.java:8595)
at android.app.Activity.performCreate(Activity.java:8573)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3764)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)

Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:13927)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2570)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2720)
at android.os.Binder.execTransactInternal(Binder.java:1339)
at android.os.Binder.execTransact(Binder.java:1275)

@fernandomensor
Copy link

Any solutions?

@IT-MikeS
Copy link
Contributor

IT-MikeS commented Apr 10, 2024

This should be fixed with the release of the Capacitor 6 versions of these plugins in the coming week(s).

I see you are using v6 already, are you using the next version in your package json?

@josuelmm
Copy link
Author

I'm using the nightly ones, that fixed it.

Copy link

ionitron-bot bot commented Apr 25, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants