Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteCommand.handlers[command][i].apply is not a function #4

Open
pincombe opened this issue Sep 13, 2017 · 1 comment
Open

RemoteCommand.handlers[command][i].apply is not a function #4

pincombe opened this issue Sep 13, 2017 · 1 comment

Comments

@pincombe
Copy link

Hey, I've seen a few errors coming in from my app, I haven't been able to recreate it yet but I was wondering if I could submit a patch which checks if the handler object exists before calling it?

I've included a stack trace below:

\"onCommand@file:///var/containers/Bundle/Application/ID/app/www/plugins/cordova-plugin-remotecommand/www/RemoteCommand.js:75:45\\ncallbackFromNative@file:///var/containers/Bundle/Application/ID/app/www/cordova.js:293:63\\nnc2@file:///var/containers/Bundle/Application/ID/app/www/cordova.js:1046:39\",\"message\":\"RemoteCommand.handlers[command][i].apply is not a function. (In 'RemoteCommand.handlers[command][i].apply(undefined, args)', 'RemoteCommand.handlers[command][i].apply' is undefined)\",\"name\":\"TypeError\",\"logData\":{\"msg\":\"Uncaught Exception\",\"errorMsg\":\"TypeError: RemoteCommand.handlers[command][i].apply is not a function. (In 'RemoteCommand.handlers[command][i].apply(undefined, args)', 'RemoteCommand.handlers[command][i].apply' is undefined)\",\"url\":\"file:///var/containers/Bundle/Application/ID/app/www/cordova.js\",\"line number\":314,\"column\":22}}","n":"onerrorLogger","t":1505280794007}]}"}

@leon
Copy link
Owner

leon commented Sep 14, 2017

Go for it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants