question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JavaScript runtime error: 'LocalNotificationProxy' is not defined on Windows

See original GitHub issue

After 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

localnotificationproxy-is-not-defined-2

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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
katzercommented, Feb 13, 2018

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.

0reactions
rwillettcommented, Feb 8, 2018

Closed as no update in 27 days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[UWP][HTML] JavaScript runtime error: 'Windows' is not defined
Hi,. I'm developing a game in visual studio and winjs project to display microsoft ads on app. When run i got error below,....
Read more >
0x800a1391 - JavaScript runtime error: 'module' is not defined
Run the code through a module bundler (webpack), which will generate a browser compatible "bundle" (a big JS) concatenating all your files.
Read more >
How to fix error - JavaScript runtime error is undefined
More info:http://howtodomssqlcsharpexcelaccess.blogspot.ca/2015/06/how-to-fix- error - javascript - runtime.html.
Read more >
Sys Is Undefined Microsoft JScript Runtime Error Occurs
When working with Telerik UI for ASP.NET AJAX, I get a Microsoft JScript runtime error that Sys is undefined. Find other useful information...
Read more >
How to solve Next.js window is not defined - Benevolent Bytes
Solve a the common ReferenceError: next.js window is not defined error that you may see when doing SSR & pre-rendering.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found