android-branch-deep-linking-attribution icon indicating copy to clipboard operation
android-branch-deep-linking-attribution copied to clipboard

Receiving IllegalArgumentException while using share via buo.showShareSheet

Open rinav opened this issue 5 years ago • 6 comments

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)

rinav avatar Jul 03 '19 14:07 rinav

Can I get a hint on what is causing the issue?

rinav avatar Jul 05 '19 10:07 rinav

Is there any update on this?

rinav avatar Jul 10 '19 07:07 rinav

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.

apeterson-branch avatar Jul 10 '19 15:07 apeterson-branch

@rinav - did the answer above help solve your issue, or are you still getting the exception?

csalmi-branch avatar Aug 21 '19 16:08 csalmi-branch

I am still getting random nulls. Sometimes it works, sometimes it does not

rinav avatar Aug 24 '19 06:08 rinav

@rinav have you tried to change this calss to the .java version?

Kwazir avatar Aug 27 '19 23:08 Kwazir