Turning off WiFi causes crash/unresponsiveness
Question
Application Type
Mobile

I tried to emulate on my actual Android phone to see whether the app detects Wifi and No Wifi connectivity.

First Scenario:

  1. Wifi is On
  2. Turn on App
  3. Everything is Okay

Second Scenario:

  1. WIfi is Off
  2. Turn on App
  3. Shows a message: "There was an error processing your request. Reload"

Third Scenario:

  1. Wifi is On
  2. Turn on App
  3. Okay, but turned off Wifi, showed my "Offline" message but it goes to the same error as Second Scenario after a second.

I got an OnInitialize Event and a button (manual) where it checks a GetNetworkStatus(), with WiFi, it works fine.

On the Second Scenario, the app probably doesn't even reach the "OnInitialize" Event.

For the Third Scenario, I got it to check my network status and popped up a message "Offline" before showing the error message.

I'm not sure if this is related to having an Offline Sync, but my app is just barely checking wifi connectivity and no databases yet. I highly doubt it's related to sync. I've searched throughout the community for similar questions but I only found emulation of mobile app on a browser and not an actual phone.

I also tried to look for any offline configuration for the app to launch offline, I haven't tried launching other apps offline (without wifi).

mvp_badge
MVP
Solution

That if confirms that the test is ok.

Now, you have to review your sync properties to follow best practices suited to your scenario:
https://www.outsystems.com/training/lesson/2156/data-synchronization-overview



mvp_badge
MVP

Hello.

It looks like a key part of the process jams because of no network. I'm suspicious of your synchronization process. Is it running asynchronously? 


I think this is Asynchronous. This is the only logic code I have for both OnInitialize and a Button click.

I retried it and it did load an OnInitialize, it showede a bried "Offline" Message, when WiFi was off (2nd Scenario)

mvp_badge
MVP
Solution

That if confirms that the test is ok.

Now, you have to review your sync properties to follow best practices suited to your scenario:
https://www.outsystems.com/training/lesson/2156/data-synchronization-overview



Thanks for this.

I've reviewed the sync properties and it now works.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.