Error When App Starts from NFC Tag Scan Event
See original GitHub issueWhen 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)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
NFC Tags won't read after iOS 15.4 update - Apple Developer
After updating to iOS 15.4 I can no longer read any NFC tags. I believe Apple Pay is working fine. 3rd Party Tools:...
Read more >NFC tag scanned event doesn't provide a valid device_id on ...
I just started playing with NFC tags and use a input_text helper to verify things. I want to set the mobile phone's device...
Read more >React native: requestTechnology called only if the app is ...
May be related to github.com/revtel/react-native-nfc-manager/issues/423 ?? there seems to be a scenario where this package does not ...
Read more >NFC basics - Android Developers
This intent is also directly started (without starting ACTION_NDEF_DISCOVERED first) if the tag that is scanned contains NDEF data that cannot ...
Read more >Perspective Session Event Scripts - Ignition User Manual 8.1
When designing a startup or shutdown event script, custom Session ... when the NFC Action is used and the mobile device scans an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Watching this as I’m having similar issues when using PhoneGap/Cordova plugin in Capacitor 3 and Ionic 5.
For anyone that looks for a bundled solution with Android 12 compat. This fork groups both fixes:
You can directly reference the branch in
package.json
Edit: proposed the PR as !470 as a reference even though commits are not really clean…