You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/04/08 13:24:55 UTC

[GitHub] [cordova-plugin-network-information] jringbox commented on issue #106: net::ERR_INTERNET_DISCONNECTED with cordova-plugin-network-information

jringbox commented on issue #106: net::ERR_INTERNET_DISCONNECTED with cordova-plugin-network-information
URL: https://github.com/apache/cordova-plugin-network-information/issues/106#issuecomment-610957727
 
 
   That's basically what it is.  VueJS is used to generate web content and we're using cordova to wrap it and avoid straight javascript for webpage and using VueJS to generate our pages.  When building, all VueJS content in the main public directory for VueJS is copied to src-cordova/www.  VueJS places hooks in the cordova www/js directory and updates index.html if necessary.  After that, a normal cordova build from src-cordova is done to produce an APK.
   
   Just now, I created a standard cordova project with the following.  This is essentially the same example above but without VueJS and it runs with no issues.
   
   1. cordova create hello com.example.hello HelloWorld
   2. cordova plugin add cordova-plugin-network-information
   3. edit index.js in hello\www\js and add this to onDeviceReady
   ```
         document.addEventListener("offline", function (e) {
           alert ("offline detected!");
         }, false);
   ```
   4. cd hello
   5. cordova platform add android
   6. cordova build android
   
   This seems to imply cordova has no issues but when I have VueJS work with this plugin then it doesn't work.  I can't figure out where the root problem is.
   
   The question is whether cordova-plugin-network-information is blocking something to VueJS' cordova plugin for offline or is VueJS' cordova plugin doing something different with the presence of cordova-plugin-network-information when offline or is it something else?
   
   I started here but maybe I'm wrong and should post to VueJS cordova plugin.  I felt this was cordova-plugin-network-information plugin issue but I honestly am not sure exactly where the issue is coming from.
   
   As fyi, I did start with a cordova project with VueJS but hot deploy and laying out VueJS structure in cordova failed miserably with newest VueJS version.  So, that's why this is a VueJS project with cordova plugin.  Just in case you're wondering.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org