Well this one caught me by surprise. I have been using CBL for years and did the unthinkable, went out of range of the Wi-Fi without a sim in the device, so truly offline. Suddenly my app wouldn’t start, and crashed everywhere!!
So I went back to basics.
- New simple app: https://github.com/GarthConnell/XamarinCouchbaseTest
- Wifi and mobile data disabled
- Use physical test device, the emulator just cannot emulate “no data” and still be debuggable!
It starts, starts connecting, and boom. Dies.
Log is here: Log
Reconnect WiFi, and its all good again.
Then to test, i changed the target endpoint to something non-existent, and it also crashed, even if the Wifi was on…
So I worked my way back, and found 2.84 works, and 2.86 and 3.00 crash like this.
The reason I switched is because IDatabase.CreateQuery is a Godsend.
I have tried the “if (Connectivity.NetworkAccess == NetworkAccess.Internet)
_replicator.Start();”
type stuff, but there are situations where Android thinks it has connectivity, but there is no route, or the router is faulty etc. etc, and the app crashes out.
Anyone have any ideas? I cant be the first to experience this.
My Stack is: Android 6, VS2019, Xamarin 5
Regards
Garth
1 post - 1 participant