Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

COVID Alert crashed in the background (iOS) #374

Closed
jeffmaher opened this issue Jul 3, 2020 · 15 comments · Fixed by #815
Closed

COVID Alert crashed in the background (iOS) #374

jeffmaher opened this issue Jul 3, 2020 · 15 comments · Fixed by #815
Assignees
Labels
bug Something isn't working high priority v1launch

Comments

@jeffmaher
Copy link
Contributor

COVID Alert crashed while in the background while another app was being used. My partner is blushing about her choice of game, but here's a screen shot 😸 :

Image from iOS

This happened somewhere around 20:00 ET on July 2, 2020 and she tapped Share, so there should be a dump of the issue in the Apple App Store Connect account. Since it crashed in the background, it may or may not be relevant that she has the iOS Setting Background App Refresh set to Off.

Some extra details:

  • Device: iPhone 7
  • OS: iOS 13.5.1
  • App Version: 1.0 (13)
@jeffmaher jeffmaher added the bug Something isn't working label Jul 3, 2020
@timarney
Copy link
Member

timarney commented Jul 4, 2020

@jeffmaher just to confirm this happened once or continues to happen?

@jeffmaher
Copy link
Contributor Author

Continues to happen. Happened twice more since filing, at different times of the day.

@emilykuret
Copy link

Screen Shot 2020-07-05 at 11 30 49 AM

Here's the crash reports from TestFlight

@timarney
Copy link
Member

timarney commented Jul 6, 2020

@Stephen-PM

Given this is very reproducible - please drop a priority tag on this.

@jeffmaher
Copy link
Contributor Author

jeffmaher commented Jul 8, 2020

Happened again at 6:58p ET ish today (July 7). I think debug/Sentry is now on, so perhaps there's more detail available. cc @jeberhardt

@jeberhardt
Copy link
Contributor

Haven't seen any logs in Sentry that point to this crash.

I was able to get the crash logs directly from Jeff's phone, and after some hunting around was able to get the dsym files required to desymbolicate the crash logs. I did spend a bunch of time trying to get the .app or .ipa files, but it turns out that you don't actually need those files to desymbolicate. I've attached the 4 crash logs.

It seems there's an issue with the startup of the app, perhaps when it's trying to execute the backgroundFetch.

Here's the main message of the crashes:
Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d Termination Description: SPRINGBOARD, scene-create watchdog transgression: application<ca.gc.hcsc.canada.stopcovid>:5961 exhausted CPU time allowance of 4.56 seconds | ProcessVisibility: Background | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Background | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 9.220 (user 9.220, system 0.000), 88% CPU", | "Elapsed application CPU time (seconds): 5.035, 48% CPU" | )

CovidShield-2020-07-08-173817.ips.beta.crash.txt
CovidShield-2020-07-08-203504.ips.beta.crash.txt
CovidShield-2020-07-09-172938.ips.beta.crash.txt
CovidShield-2020-07-10-092110.ips.beta.crash.txt

@jeberhardt
Copy link
Contributor

The error code is 0x8badf00d (ie: ate bad food).

Here's a slightly outdated article that may shed some light on the issue: https://geek-is-stupid.github.io/2018-10-15-0x8badf00d-ate-bad-food/

@gavrix
Copy link
Contributor

gavrix commented Jul 13, 2020

From my perspective 2 cents:

  • all crash logs are watchdogs crashes because app took too long to launch. it means that execution from within appDidFinishLaunchingWithOptions did not return within 4.5s
  • crash stacks show that actual block happens inside `[RNSplashScreen show]:
6   Foundation                    	0x000000019a9ecefc -[NSRunLoop+ 32508 (NSRunLoop) runUntilDate:] + 88
7   CovidShield                   	0x0000000102f5d5d8 +[RNSplashScreen show] + 2528728 (RNSplashScreen.m:31)
  • in theory, js code is expected to call SplashScreen.hide(); to unblock launch call and return to appDidFinishLaunching.
const appInit = async () => {
  try {
    const locale = await AsyncStorage.getItem(Key.Locale);
    if (locale && locale !== i18nManager.details.locale) i18nManager.update({locale});
  } catch (error) {
    console.error(error);
  }
  // only hide splash screen after our init is done
  SplashScreen.hide();
};

I suspect [RNSplashScreen show] may be messing with some RN machinery executing js code when in background.
My suggestion is using

+ (void)showSplash:(NSString*)splashScreen inRootView:(UIView*)rootView 

API instead for showing splash screen (it doesn't use nested runloop and doesn't block appDidFinishLaunching)

@henrytao-me
Copy link
Contributor

@jeberhardt Do you think Sergey suggestion would work?

@jeberhardt
Copy link
Contributor

I don't believe that RNSplashScreen is the cause of this crash. The NSRunLoop that is being called only gets called once, which is the expected behaviour. It must be something else causing the app to not complete launching.

This crash has not been reported by this user in over a week, which is many releases ago now. It still remains only being reported by 1 user.

I would recommend not addressing this issue for this release, and to revisit the issue if more crashes are observed.

@timarney
Copy link
Member

timarney commented Jul 15, 2020

@jeffmaher I've walked through the findings with @jeberhardt I have decided to close this and re-open as needed.

There's been a lot of movement since the release where this was originally reported and also since last crash that we know about.

Potentially we can look at removing or using a different SplashScreeen package but we'll park that for now and see if anything comes up again.

We're also making adjustments here:
#700

@timarney timarney reopened this Jul 19, 2020
@jeffmaher
Copy link
Contributor Author

jeffmaher commented Jul 19, 2020

My partner's last crash happened on 7/18/2020 at 2:45p ET

File

@henrytao-me
Copy link
Contributor

Look like this is related https://developer.apple.com/forums/thread/124596

@jeberhardt jeberhardt linked a pull request Jul 21, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working high priority v1launch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants