- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Before the last update all my projects where working as a charme. After the upgrade whenever I try to SIMULATE an App I get in the debug console:
"Uncaught module cordova-plugin-splashscreen.SplashScreen already defined cordova.js:79"
"Uncaught module cordova-plugin-device.device already defined cordova.js:79"
"Uncaught module cordova-plugin-statusbar.statusbar already defined ordova.js: 79"
I'm using a HTML5+Cordova newly created project and I can see there is the cordova.js included in the HTML file and one cordova_plugins.js is automatically added *SOMETIMES* while in the Simulation phase.
My index.html contains this headers :
<script src="cordova.js"></script> <!-- phantom library, needed for Cordova api calls, added during build --> <script src="js/jquery.js"></script> <script src="js/app.js"></script> <!-- recommended location of your JavaScript code relative to other JS files --> <script src="xdk/init-dev.js"></script> <!-- normalizes device and document ready events, see README for details -->
And this is how the Simulation debug console looks (when the situation ins with both cordova_files).
This errors appeare both when the Simulator adds cordova.js and cordova_plugins.js, and also when the simulator is including only cordova.js.
The application is correctly recognizing navigator.splashscreen or window.device, but what this series of errors?
Can someone please explain me how to solve this "issue"? Thanks in advance.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe you can safely ignore those errors. I'll ask our simulator expert to take a look at your post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dario!
These errors appeared also in the previous emulator that was integrated in the Intel XDK, based on Ripple. The only difference was that the console was cleared when you open it, by default. You can safely ignore those errors.
Is your application working correctly under simulation? Or you just were concerned about these errors?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The application works flawlessy (until I put some very personal bugs in it), my concerns where about the unconsistency of the errors and that sporadic "double cordova include" while debugging.
Thanks to both of you for the answers (I really want to let you know I appreciate the work you do on this forum).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the explanations.
I'm really don't knew this.
But, how can I change cordova_plugins.js?
This file don't show in DEVELOP tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that file is generated by KDX, you just need to manage plugins from the Project tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
humm, ok.
Thanks Dario.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dario is correct. The files cordova.js and cordova_plugins.js are special files that are created by Cordova CLI. They are not meant to be modified by hand nor should they be removed from the Simulate tab's project, they are necessary to make the Simulate tab work as a Cordova application. Your index.html file should have a reference to the cordova.js file, it should not, however, have a direct reference to the cordova_plugins.js file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess cordova plugin has multiple entries for plugin as i can see on my system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I capture window.onerror event so I can log any unexpected bugs.
This error do bother me.
I need to add filter, so not to log this particular bug.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page