You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to Version 3.0.0 of the capacitor plugin, I always get the following error:
Serious error executing plugin
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:99)
at com.getcapacitor.Bridge$1.run(Bridge.java:526)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
at io.branch.referral.BranchUrlBuilder.<init>(BranchUrlBuilder.java:56)
at io.branch.referral.BranchShortLinkBuilder.<init>(BranchShortLinkBuilder.java:15)
It could probably happen when calling one or more of the following methods: showShareSheet, generateShortUrl and sendBranchEvent. These methods do not necessarily make sure to instantiate the activity variable.
You can see this.activity = getActivity(); has been deleted. So adding that will indeed fix the issue. Feel free to make a pull request for this. Branch will probably merge it sometime in the future.
After updating to Version 3.0.0 of the capacitor plugin, I always get the following error:
I adjusted my app like mentioned in the Android setup: https://github.com/BranchMetrics/capacitor-branch-deep-links#android-setup
After adding
activity = getActivity();
to BranchDeepLinks.java it works again
The text was updated successfully, but these errors were encountered: