Meteor-Community-Packages / raix-push

DEPRECATED: Push notifications for cordova (ios, android) browser (Chrome, Safari, Firefox)
https://atmospherejs.com/raix/push
MIT License
513 stars 197 forks source link

Push Plugin register failed + ReferenceError: Can't find variable: error (raix:push@3.0.2) #199

Closed jorisroling closed 8 years ago

jorisroling commented 8 years ago

I get the following logs with raix:push@3.0.2

Push Plugin register called
Push Plugin register failed
Push Plugin register failed
Error in Error callbackId: PushNotification1571974592 : ReferenceError: Can't find variable: error
Uncaught Error: ReferenceError: Can't find variable: error:314:http://localhost:12032/cordova.js
Error in Error callbackId: PushNotification1571974592 : ReferenceError: Can't find variable: error
Uncaught Error: ReferenceError: Can't find variable: error:314:http://localhost:12032/cordova.js

b.t.w. I had to add cordova-plugin-device@1.1.1 to get to this point

jorisroling commented 8 years ago

The ReferenceError was due to an error on the ADVANCED.md page:

 Push.addListener('error', function(err) {
        if (error.type == 'apn.cordova') {
            console.log(err.error);
        }
    });

Here error.type should read err.type

The other issue resolved itself, now that the true error showed: notifications don't work on simulator.

jorisroling commented 8 years ago

The ADVANCED.md page should be fixed.