chemerisuk / cordova-plugin-web-share

Web Share API polyfill for Cordova
MIT License
13 stars 9 forks source link

NullPointerException with latest version #18

Open roby65 opened 1 month ago

roby65 commented 1 month ago

With the latest SDK, sharing throws this exception after choosing the app in the share dialog:

AndroidRuntime: java.lang.RuntimeException: Unable to start receiver by.chemerisuk.cordova.WebShareReceiver: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.os.Bundle.get(java.lang.String)' on a null object reference
AndroidRuntime:     at android.app.ActivityThread.handleReceiver(ActivityThread.java:4517)
AndroidRuntime:     at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2240)
AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:106)
AndroidRuntime:     at android.os.Looper.loopOnce(Looper.java:211)
AndroidRuntime:     at android.os.Looper.loop(Looper.java:300)
AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:8289)
AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
AndroidRuntime:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.os.Bundle.get(java.lang.String)' on a null object reference
AndroidRuntime:     at by.chemerisuk.cordova.WebShareReceiver.onReceive(WebShareReceiver.java:13)
AndroidRuntime:     at android.app.ActivityThread.handleReceiver(ActivityThread.java:4505)
AndroidRuntime:     ... 9 more
roby65 commented 4 weeks ago

16 fixes the problem