ReallySmallSoftware / cordova-plugin-firestore

A Google Firebase Firestore plugin to enable realtime synchronisation between app and cloud and automatically handle limited connectivity.
Other
22 stars 10 forks source link

bug: example error with empty config key #28

Open bazuka5801 opened 3 years ago

bazuka5801 commented 3 years ago

Expected Behavior

image

Actual Behavior and Steps to Reproduce the Problem

P.s. with adding config key image

Error from browser console (android device)

Uncaught (in promise) Attempt to invoke virtual method 'com.google.firebase.firestore.CollectionReference com.google.firebase.firestore.FirebaseFirestore.collection(java.lang.String)' on a null object reference

Error from android studio

E/FirestorePlugin: Error processing collection get in thread
    java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.firebase.firestore.CollectionReference com.google.firebase.firestore.FirebaseFirestore.collection(java.lang.String)' on a null object reference
        at uk.co.reallysmall.cordova.plugin.firestore.CollectionGetHandler.handle(CollectionGetHandler.java:38)
        at uk.co.reallysmall.cordova.plugin.firestore.FirestorePlugin.execute(FirestorePlugin.java:73)
        at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
        at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
        at com.getcapacitor.MessageHandler.callCordovaPluginMethod(MessageHandler.java:107)
        at com.getcapacitor.MessageHandler.postMessage(MessageHandler.java:51)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:363)
        at android.os.Looper.loop(Looper.java:173)
        at android.os.HandlerThread.run(HandlerThread.java:67)

Specifications