JavaScript runtime error: 'LocalNotificationProxy' is not defined on Windows
See original GitHub issueAfter installing the cordova-plugin-local-notifications on a Windows platform Cordova project the following error message starts to be displayed by Visual Studio when trying to running the app:
Unhandled exception at line 23, column 1 in ms-appx-web://com.example.hello/www/plugins/cordova-plugin-local-notification/src/windows/LocalNotificationProxy.js 0x800a1391 - JavaScript runtime error: ‘LocalNotificationProxy’ is not defined
The Exception causes the app to crash on the splash screen and terminates prematurely 😦
Steps to Reproduce
At the Command Prompt, create a new Cordova project and add the cordova-plugin-local-notifications plug-in:
cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add windows
cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications
In Visual Studio 2015 Update 3, open the \hello\platforms\windows\CordovaApp.sln solution and run the Windows Universal app. The application will throw the following exception:
Unhandled exception at line 23, column 1 in ms-appx-web://com.example.hello/www/plugins/cordova-plugin-local-notification/src/windows/LocalNotificationProxy.js 0x800a1391 - JavaScript runtime error: ‘LocalNotificationProxy’ is not defined
Environment
- Plugin version: v0.9.0-beta.2
- Platform: Windows 10
- OS version: build 1709
- Visual Studio Version: Microsoft Visual Studio Community 2015 Update 3
- Cordova version: 8.0.0
- Cordova platform version: windows 5.0.0
Any ideas why it happens? Thanks so much!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top GitHub Comments
I think the docs aren’t maybe not clear enough about windows - The error indicates that you are trying to build for “AnyCPU”, however by using the plugin you have to compile your app for “ARM”, “x64” and “x86” separately. If you choose the right architecture, then the binary will be loaded and available at runtime.
Closed as no update in 27 days.