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

Share plugin doesn't load and the app doesn't open #2202

Closed
Carbocode opened this issue Oct 3, 2024 · 5 comments
Closed

Share plugin doesn't load and the app doesn't open #2202

Carbocode opened this issue Oct 3, 2024 · 5 comments

Comments

@Carbocode
Copy link

Carbocode commented Oct 3, 2024

Bug Report

Plugin(s)

@capacitor/share 5.0.6

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 6.1.2
  @capacitor/core: 6.1.2
  @capacitor/android: 6.1.2
  @capacitor/ios: 6.1.2

Installed Dependencies:

  @capacitor/cli: 5.1.0
  @capacitor/core: 5.1.0
  @capacitor/android: 5.1.0
  @capacitor/ios: 5.1.0

Platform(s)

Android

Current Behavior

When opening the app, while it's loading capacitor plugins, it suddenly crashes while loading Share plugin

Exception java.lang.RuntimeException:
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4043)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4203)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:149)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:99)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2616)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:222)
  at android.os.Looper.loop (Looper.java:314)
  at android.app.ActivityThread.main (ActivityThread.java:8716)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:565)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1081)
Caused by java.lang.SecurityException:
  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:6205)
  at android.app.ContextImpl.registerReceiverInternal (ContextImpl.java:1863)
  at android.app.ContextImpl.registerReceiver (ContextImpl.java:1803)
  at android.app.ContextImpl.registerReceiver (ContextImpl.java:1791)
  at android.content.ContextWrapper.registerReceiver (ContextWrapper.java:766)
  at android.content.ContextWrapper.registerReceiver (ContextWrapper.java:766)
  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.<init> (PluginHandle.java:65)
  at com.getcapacitor.Bridge.registerPlugin (Bridge.java:638)
  at com.getcapacitor.Bridge.registerAllPlugins (Bridge.java:594)
  at com.getcapacitor.Bridge.<init> (Bridge.java:213)
  at com.getcapacitor.Bridge.<init>
  at com.getcapacitor.Bridge$Builder.create (Bridge.java:1513)
  at com.getcapacitor.BridgeActivity.load (BridgeActivity.java:42)
  at com.getcapacitor.BridgeActivity.onCreate (BridgeActivity.java:36)
  at it.myvet.MainActivity.onCreate (MainActivity.java:11)
  at android.app.Activity.performCreate (Activity.java:8886)
  at android.app.Activity.performCreate (Activity.java:8851)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1470)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4025)
Caused by android.os.RemoteException: Remote stack trace:
  at com.android.server.am.ActivityManagerService.registerReceiverWithFeature (ActivityManagerService.java:14691)
  at android.app.IActivityManager$Stub.onTransact$registerReceiverWithFeature$ (IActivityManager.java:12225)
  at android.app.IActivityManager$Stub.onTransact (IActivityManager.java:3194)
  at com.android.server.am.ActivityManagerService.onTransact (ActivityManagerService.java:2884)
  at android.os.Binder.execTransactInternal (Binder.java:1346)

Expected Behavior

App opens

@Carbocode
Copy link
Author

We switched to version 5.0.8 and removed the feature from the app, but just the fact that the plugin is installed causes the crash.
Also we have the same capacitor and @capacitor/share versions in other apps but the problem doesn't happen

@CostantinoSpano
Copy link

CostantinoSpano commented Oct 7, 2024

I didn't understand. Switching to 5.0.8 solved the problem or removing it solved the problem?
The problem appear only on Android 14 (SDK 34)

@Carbocode
Copy link
Author

Removing everything solved the problem, just the fact the plugin is installed causes it

@jcesarmobile
Copy link
Member

You have to update to Capacitor 6 and the Share plugin to latest 6.x

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
Copy link

ionitron-bot bot commented Oct 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 Oct 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