You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vishal Mishra (JIRA)" <ji...@apache.org> on 2017/11/27 20:56:00 UTC

[jira] [Closed] (CB-12788) Crash on android when saving contact

     [ https://issues.apache.org/jira/browse/CB-12788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vishal Mishra closed CB-12788.
------------------------------
    Resolution: Won't Fix

This plugin is being deprecated. No more work will be done on this plugin by the Cordova development community. You can continue to use this plugin and it should work as-is in the future but any more arising issues will not be fixed by the Cordova community.

> Crash on android when saving contact
> ------------------------------------
>
>                 Key: CB-12788
>                 URL: https://issues.apache.org/jira/browse/CB-12788
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-contacts (DEPRECATED)
>    Affects Versions: 2.3.1-dev
>         Environment: Cordova : 6.1.1 via meteor
> Android : 5.0.1 on Samsung S4 GT-I9506
>            Reporter: Cyrille Colin
>
> Hi,
> first i'm not sure about version, i use the one in npm and github : 2.3.1 but it doesn't reflect version in issue tracker.
> Step to reproduce :
> var contact = navigator.contacts.create({
>               id: "12345",
>               displayName: "John Doe",
>               emails: [new ContactField('work', "john@doe.com", true)]
>             });
> contact.save(); crash with this stack trace :
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: rawId is string called 'null'
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: Could not get name
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: Could not get phone numbers
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: id is string called 'null'
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: Could not get addresses
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: Could not get organizations
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: Could not get emails
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: note is string called 'null'
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: nickname is string called 'null'
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: Could not get websites
> 05-11 15:18:58.643 24995-4607/fr.univlorraine.mobile.multi E/ContactsAccessor: Could not get birthday from JSON object
>                                                                                org.json.JSONException: Value null at birthday of type org.json.JSONObject$1 cannot be converted to long
>                                                                                    at org.json.JSON.typeMismatch(JSON.java:100)
>                                                                                    at org.json.JSONObject.getLong(JSONObject.java:517)
>                                                                                    at org.apache.cordova.contacts.ContactAccessorSdk5.getBirthday(ContactAccessorSdk5.java:1959)
>                                                                                    at org.apache.cordova.contacts.ContactAccessorSdk5.modifyContact(ContactAccessorSdk5.java:1471)
>                                                                                    at org.apache.cordova.contacts.ContactAccessorSdk5.save(ContactAccessorSdk5.java:1071)
>                                                                                    at org.apache.cordova.contacts.ContactManager$2.run(ContactManager.java:186)
>                                                                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
>                                                                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
>                                                                                    at java.lang.Thread.run(Thread.java:818)
> 05-11 15:18:58.653 24995-4607/fr.univlorraine.mobile.multi D/ContactsAccessor: Could not get photos
> 05-11 15:18:58.713 24995-4607/fr.univlorraine.mobile.multi E/AndroidRuntime: FATAL EXCEPTION: pool-1-thread-3
>                                                                              Process: fr.univlorraine.mobile.multi, PID: 24995
>                                                                              java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
>                                                                                  at android.os.Parcel.readException(Parcel.java:1546)
>                                                                                  at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
>                                                                                  at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(DatabaseUtils.java:160)
>                                                                                  at android.content.ContentProviderProxy.applyBatch(ContentProviderNative.java:519)
>                                                                                  at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:377)
>                                                                                  at android.content.ContentResolver.applyBatch(ContentResolver.java:1254)
>                                                                                  at org.apache.cordova.contacts.ContactAccessorSdk5.modifyContact(ContactAccessorSdk5.java:1534)
>                                                                                  at org.apache.cordova.contacts.ContactAccessorSdk5.save(ContactAccessorSdk5.java:1071)
>                                                                                  at org.apache.cordova.contacts.ContactManager$2.run(ContactManager.java:186)
>                                                                                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
>                                                                                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
>                                                                                  at java.lang.Thread.run(Thread.java:818)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org