chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 559 forks source link

WP8 Failed to locate callback #116

Closed don closed 8 years ago

don commented 10 years ago

Failed to locate callback for id : NfcPlugin1644173565

Test code

    var write = function(nfcEvent){

        console.log("Found NDEF tag. Ignoring content and overwritting message.");
        app.counter++;

        nfc.write(
            [ndef.textRecord("Message " + app.counter)],
            function() { 
                console.log("Wrote message to NFC tag");
            },
            function(e){
                console.log("Error writing message to NFC tag",e);
            }
        );
    };

    nfc.addNdefListener(
        write,
        function() {
            console.log("Listening for NFC tags with NDEF messages");
        },
        function() {
            console.log("Failed to add NFC listener");
        }
    );

Console Output

Registering for NDEF
The thread 0x784 has exited with code 259 (0x103).
The thread 0x708 has exited with code 259 (0x103).
Listening for NFC tags with NDEF messages
The thread 0x4f8 has exited with code 259 (0x103).
The thread 0x928 has exited with code 259 (0x103).
The thread 0x550 has exited with code 259 (0x103).
The thread 0x848 has exited with code 259 (0x103).
The thread 0x894 has exited with code 259 (0x103).
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Runtime.WindowsRuntime.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
[object Object]
Found NDEF tag. Ignoring content and overwritting message.
[object Object]
Found NDEF tag. Ignoring content and overwritting message.
Write Tag
Write Tag
The thread 0xdc0 has exited with code 259 (0x103).
The thread 0xfd8 has exited with code 259 (0x103).
Successfully wrote message to the NFC tag.
Successfully wrote message to the NFC tag.
Failed to locate callback for id : NfcPlugin1644173565
Wrote message to NFC tag
The thread 0xd70 has exited with code 259 (0x103).
Successfully wrote message to the NFC tag.
Failed to locate callback for id : NfcPlugin1644173565
Successfully wrote message to the NFC tag.
Failed to locate callback for id : NfcPlugin1644173565
The thread 0x918 has exited with code 259 (0x103).
The thread 0x94c has exited with code 259 (0x103).
The thread 0xe40 has exited with code 259 (0x103).

WP8 8.0.10211.205 Cordova 3.3.0-0.1.0 on Windows 8.1

This is probably the issue behind #115

JohnMcLear commented 10 years ago

Sorry that I keep finding bugs mate, I don't mean to be such a pain..

Silverlight.. Brace yourself...

don commented 8 years ago

This works on windows platform. Tested with Lumia 640 running Windows Phone 8.1 Update 2.

Not planning on fixing Windows Phone 8 / SilverLight version.