android-branch-deep-linking-attribution
android-branch-deep-linking-attribution copied to clipboard
Receiving IllegalArgumentException while using share via buo.showShareSheet
The share bottom sheet is displayed properly uptill now. However when selecting particular app to share throws the error.
We have cross checked all the required parameters and can confirm they are not null e.g. activity, shareTitle, shareDesc etc.
The branch sdk version is 3.2.0
Do let me know if more info is required
W/System.err: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter error
W/System.err: at com.xxx.util.ShareUtils$showBranchShareSheet$1.onLinkShareResponse(Unknown Source:12)
W/System.err: at io.branch.indexing.BranchUniversalObject$LinkShareListenerWrapper.onLinkShareResponse(BranchUniversalObject.java:980)
W/System.err: at io.branch.referral.ShareLinkManager.shareWithClient(ShareLinkManager.java:310)
W/System.err: at io.branch.referral.ShareLinkManager.access$700(ShareLinkManager.java:31)
W/System.err: at io.branch.referral.ShareLinkManager$3.onLinkCreate(ShareLinkManager.java:283)
W/System.err: at io.branch.referral.ServerRequestCreateUrl.onRequestSucceeded(ServerRequestCreateUrl.java:126)
W/System.err: at io.branch.referral.Branch$BranchPostTask.onPostExecute(Branch.java:3126)
W/System.err: at io.branch.referral.Branch$BranchPostTask.onPostExecute(Branch.java:2963)
W/System.err: at android.os.AsyncTask.finish(AsyncTask.java:695)
W/System.err: at android.os.AsyncTask.-wrap1(Unknown Source:0)
W/System.err: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
W/System.err: at android.os.Looper.loop(Looper.java:164)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6494)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Can I get a hint on what is causing the issue?
Is there any update on this?
There is no contract in the Branch SDK that says that parameters cannot be null to the callback.
Specifically, error
will be null
when there is no error to report.
The error report (above) is showing from here:
- https://github.com/BranchMetrics/android-branch-deep-linking-attribution/blob/4e36ede86fc329d9b6c94918f0b8d58eb76fc344/Branch-SDK/src/io/branch/indexing/BranchUniversalObject.java#L980
Further, that line is called from here:
- https://github.com/BranchMetrics/android-branch-deep-linking-attribution/blob/4e36ede86fc329d9b6c94918f0b8d58eb76fc344/Branch-SDK/src/io/branch/referral/ShareLinkManager.java#L310
with a null error message.
I suspect that the Kotlin integration is causing the issue.
@rinav - did the answer above help solve your issue, or are you still getting the exception?
I am still getting random nulls. Sometimes it works, sometimes it does not
@rinav have you tried to change this calss to the .java version?