nativescript-contacts icon indicating copy to clipboard operation
nativescript-contacts copied to clipboard

Update existing contact throwing an error (Android Only)

Open OPADA-Eng opened this issue 7 years ago • 2 comments

Hi, Thanks for your plugin. I have an issue only on Android devices occurs in this line: contact.save(); throw this error:

Error: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getLastPathSegment()' on a null object reference JS: android.content.ContentUris.parseId(ContentUris.java:85) JS: com.tns.Runtime.callJSMethodNative(Native Method) JS: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1021) JS: com.tns.Runtime.callJSMethodImpl(Runtime.java:903) JS: com.tns.Runtime.callJSMethod(Runtime.java:890) JS: com.tns.Runtime.callJSMethod(Runtime.java:874) JS: com.tns.Runtime.callJSMethod(Runtime.java:866) JS: com.tns.NativeScriptActivity.onActivityResult(NativeScriptActivity.java:69) JS: android.app.Activity.dispatchActivityResult(Activity.java:6428) JS: android.app.ActivityThread.deliverResults(ActivityThread.java:3695) JS: android.app.ActivityThread.handleSendResult(ActivityThread.java:3742) JS: android.app.ActivityThread.-wrap16(ActivityThread.java) JS: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393) JS: android.os.Handler.dispatchMessage(Handler.java:102) JS: android.os.Looper.loop(Looper.java:148) JS: android.app.ActivityThread.main(ActivityThread.java:5417) JS: java.lang.reflect.Method.invoke(Native Method) JS: com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) JS: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

when trying to update an existing contact. I've tested on Android v6.0.0 and 7.0.0 in the attachments bellow test code generate the issue. Thanks in advanced. my-contacts.zip

OPADA-Eng avatar Jul 13 '17 13:07 OPADA-Eng

I'm seeing this now as well. It seems to save the contact ok but I'm only changing the photo.

cfjedimaster avatar Jun 11 '19 17:06 cfjedimaster

I am seeing issue now as well :( Did anyone find a solution for this issue?

Amira-tageldin avatar Sep 02 '21 11:09 Amira-tageldin