10
Views
3
Comments
Solved
[SocialSharing Plugin] Android Crashed when copied a link in deeplink
socialsharing-plugin
Mobile icon
Forge asset by José Dantas
Application Type
Mobile
Service Studio Version
11.55.64 (Build 64713)

I am using the SocialSharing Mobile plugin to share a link on Android. When I copy a link from the menu, the app suddenly crashes, and an error message appears. This issue only occurs on Android.
Error Message: 


java.lang.RuntimeException: Unable to start receiver nl.xservices.plugins.ShareChooserPendingIntent: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference

    at android.app.ActivityThread.handleReceiver(ActivityThread.java:5212)

    at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)

    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2708)

    at android.os.Handler.dispatchMessage(Handler.java:107)

    at android.os.Looper.loopOnce(Looper.java:249)

    at android.os.Looper.loop(Looper.java:337)

    at android.app.ActivityThread.main(ActivityThread.java:9631)

    at java.lang.reflect.Method.invoke(Native Method)

    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:615)

    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference

    at nl.xservices.plugins.ShareChooserPendingIntent.onReceive(ShareChooserPendingIntent.java:13)

    at android.app.ActivityThread.handleReceiver(ActivityThread.java:5203)


App Crash.png
2026-03-20 01-28-51
Saugat Biswas
Solution

Hi @Tamilarasan Senthilkumar ,

Root Cause:

This is a known Android‑only issue in the SocialSharing Mobile plugin, and not an OutSystems logic problem.

The crash actually occurs inside the native Android broadcast receiver nl.xservices.plugins.ShareChooserPendingIntent.

When the user selects “Copy” from the Android share menu, the system does not populate Intent.EXTRA_CHOSEN_COMPONENT.

The plugin assumes this value is always present and calls .toString() on it, which results in a NullPointerException and crashes the app.

The crash happens after the share action returns, inside the native Cordova plugin, so: 

  • Validating the URL or message in OutSystems or 
  • Wrapping the action in error handling

will not prevent the crash.

Solution:

The issue has been fixed upstream in the Cordova SocialSharing plugin by adding proper null checks in the receiver. You need to upgrade the SocialSharing plugin.

Once you upgrade: 

  • Generate a new Android build 
  • Reinstall the app on the device 
  • Retest the share copy flow

If upgrade is not possible, use workaround:

Avoid the system “Copy” option: 

  • Use a clipboard plugin to copy the link manually 
  • Use SocialSharing only for explicit targets (WhatsApp, Email, etc.)

This bypasses the faulty Android broadcast receiver.


Hope this helps.

Cheers,

Saugat

UserImage.jpg
Tamilarasan Senthilkumar
Solution

Yes, this issue only exists on Android devices. In iOS, the web works fine. Therefore, I used the "NavigatorShare" plugin for Android.

UserImage.jpg
Tamilarasan Senthilkumar
Solution

Yes, this issue only exists on Android devices. In iOS, the web works fine. Therefore, I used the "NavigatorShare" plugin for Android.

2024-12-02 12-15-17
Aravind EONE

Hi Tamil,

Can you try verifying behavior on different Android versions/devices to make sure you are getting the similar issue ?

2026-03-20 01-28-51
Saugat Biswas
Solution

Hi @Tamilarasan Senthilkumar ,

Root Cause:

This is a known Android‑only issue in the SocialSharing Mobile plugin, and not an OutSystems logic problem.

The crash actually occurs inside the native Android broadcast receiver nl.xservices.plugins.ShareChooserPendingIntent.

When the user selects “Copy” from the Android share menu, the system does not populate Intent.EXTRA_CHOSEN_COMPONENT.

The plugin assumes this value is always present and calls .toString() on it, which results in a NullPointerException and crashes the app.

The crash happens after the share action returns, inside the native Cordova plugin, so: 

  • Validating the URL or message in OutSystems or 
  • Wrapping the action in error handling

will not prevent the crash.

Solution:

The issue has been fixed upstream in the Cordova SocialSharing plugin by adding proper null checks in the receiver. You need to upgrade the SocialSharing plugin.

Once you upgrade: 

  • Generate a new Android build 
  • Reinstall the app on the device 
  • Retest the share copy flow

If upgrade is not possible, use workaround:

Avoid the system “Copy” option: 

  • Use a clipboard plugin to copy the link manually 
  • Use SocialSharing only for explicit targets (WhatsApp, Email, etc.)

This bypasses the faulty Android broadcast receiver.


Hope this helps.

Cheers,

Saugat

UserImage.jpg
Tamilarasan Senthilkumar
Solution

Yes, this issue only exists on Android devices. In iOS, the web works fine. Therefore, I used the "NavigatorShare" plugin for Android.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.