Skip to content

Error When App Starts from NFC Tag Scan Event #457

Open
@PowerOfM

Description

@PowerOfM

When the app starts from an NFC tag scan event, the channelCallback is null, causing an NPE.

E/AndroidRuntime: FATAL EXCEPTION: pool-3-thread-1
    java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.sendPluginResult(org.apache.cordova.PluginResult)' on a null object reference
        at com.chariotsolutions.nfc.plugin.NfcPlugin.sendEvent(NfcPlugin.java:740)
        at com.chariotsolutions.nfc.plugin.NfcPlugin.fireNdefEvent(NfcPlugin.java:749)
        at com.chariotsolutions.nfc.plugin.NfcPlugin.lambda$parseMessage$10$NfcPlugin(NfcPlugin.java:708)
        at com.chariotsolutions.nfc.plugin.-$$Lambda$NfcPlugin$8qvszOgjpGqW46Vg-QVXuocmsg8.run(Unknown Source:2)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions