Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] App won't start after changing OS time to earlier date #11128

Open
ColeXm opened this issue Jun 19, 2020 · 3 comments
Open

[Bug] App won't start after changing OS time to earlier date #11128

ColeXm opened this issue Jun 19, 2020 · 3 comments
Labels
p/Android s/unverified New report that has yet to be verified t/bug 🐛
Projects

Comments

@ColeXm
Copy link

ColeXm commented Jun 19, 2020

Description

I encounter a problem where my Xamarin Forms Android app won't start (white screen) after I change the Android OS date to an earlier date. It only happens when it's not connected through the debugger.

Steps to Reproduce

  • Create the sample Xamarin Forms app using the "Blank Page" template.
  • Run it through the debugger first (The app works and displays the welcome message).
  • Close the app.
  • Set the OS date/time to manual and go back one day.
  • From the phone itself (without using the debugger), run the app.

After the last step, the app won't start but will instead display a blank screen. No crash. Resetting the time to automatic date when the app is closed, the app will run correctly again. If I do the same procedure but always start the app using the debugger, everything works fine.

Expected Behavior

Run as expected.

Actual Behavior

Always show white screen and stuck .

Basic Information

Visual Studio 2019 - 16.6.2 (Also happens in 16.5.3)
Xamarin Forms 4.7.0.968 (Also happens in previous 4.X versions)
Phone: Samsung Galaxy S8, Android 9.

@jfversluis
Copy link
Member

I've tried to reproduce this but unfortunately failed. I didn't have a Samsung handy at the time though. Did you try it on an emulator? Or any other device by any chance @ColeXm? I've attached the File > New App "repro" here that I've been looking at.

Inspecting #11176 I think this is another important piece though:

Additional info: It also happens in Release mode. Moreover, since it doesn't happen when the debugger is attached, I added logs that I retrieve with logcat. Using this method, I realized that when it freezes, it doesn't even seem to reach the "OnCreate" method of my "MainActivity".

Although that has no effect on the Pixel emulator I used.

TimemachineTest11128.zip

@conicgames
Copy link

@jfversluis I could also reproduce using using a "Pixel 2" emulator with "Lollipop 5.1 API 22" installed. I didn't try with other Android versions using emulators. On this device, restarting the the app after changing time and without debugger attached made the app crash instead of freezing.

@samhouts samhouts moved this from New to Resource Blocked in Triage Jun 26, 2020
@samhouts
Copy link
Member

See also #2194

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p/Android s/unverified New report that has yet to be verified t/bug 🐛
Projects
Triage
  
Resource Blocked
Development

No branches or pull requests

5 participants