lichess-org / mobile

Lichess mobile app v2
GNU General Public License v3.0
1.36k stars 197 forks source link

App crashes when started in offline mode #906

Closed tom-anders closed 3 months ago

tom-anders commented 3 months ago

What is the problem?

Expected: App starts in offline mode What happens instead: The "something went wrong :'(" screen is shown.

Steps to reproduce the bug

  1. Start the App and make sure user is logged in
  2. Force-close the app
  3. Activate airplane mode
  4. Start the app

App version

0.9.6

Device Info

Moto G52, Android 13

Additional information

adb logcat contains the following output:

08-08 10:51:43.932 18239 18295 I flutter : SEVERE: [App] could not initialize app; ClientException: Cronet exception: org.chromium.net.impl.NetworkExceptionImpl: Exception in CronetUrlRequest: net::ERR_INTERNET_DISCONNECTED, ErrorCode=2, InternalErrorCode=-106, Retryable=false, uri=https://lichess.org/api/account

To me this seems to be triggered by https://github.com/lichess-org/mobile/commit/a63427c16dc1d4f43977c9c747691a2a68c39f8f which removed the try/catch/finally - was this intended?