Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
7 Views

Simulate: Network Connection Offline is NOT Offline.

I was trying to debug something in my app so I ran it through the Simulator (which, btw, is much better than the old one) and when I took my device offline (changed the network connection to offline some things happened correctly and one, namely, the device did not actually go offline.

Here's the screen with the device offline:

xdk_offline.png

You'll notice that the NETWORK CONNECTION is set to offline.  This invoked the trigger cordova-plugin-network-information which is handled here:

  document.addEventListener("offline", checkConnection, false);
  document.addEventListener("online", checkConnection, false);

And is what caused the orange popup on the simulator screen.  Just as an FYI once setting the NETWORK CONNECTION to none didn't work, I tried setting the network offline through the emulation as shown in the 2nd red circle. At this point, one would really expect the emulated device to be offline.

However, if I expand the Hazard list and click on the one message I get data that can only happen if there is a network connection as shown in this screen:

xdk_offline_but_working.png

Namely, my own server was hit and the details of the Hazard alert was obtained and only through that data could I have loaded the google maps which also requires a connection that should not exist.

Obviously, the device is not simulating "no connection" in simulator.

 

 

Tags (2)
0 Kudos
2 Replies
Highlighted
7 Views

Thanks for the feedback, Phil. That Simulate tab is based directly on the Microsoft Simulate project, we'll inform them of this discrepancy and I'll add this note to the limitations.

0 Kudos
Highlighted
New Contributor I
7 Views

NP... it's what I do! LOL (although I do sometimes feel bad for posting bug after bug)

Seriously, y'all need a test suite or a bug bounty! LOL.

0 Kudos