Errors that happen when you first start the app aren't handled gracefully
- Inside of an async function for loading assets
- if you have an error in your asset loading, using the current template you'll get an error about space-mono (or if you don't use that, whatever other font you use) not being found or an unhandled promise rejection. this fix adds a method to AppLoading called startAsync so we can handle errors for people. you don't have to use it, old method works still.
Red screen first | If they dismiss, they see this instead of loading screen |
---|---|
- On initial render
- if you initial render throws an error, you will get a screen screen and then when you dismiss it you just see the loading screen. this fix hides the loading screen and shows you a message to indicate what happened
Red screen first | If they dismiss, they see this instead of loading screen |
---|---|
Errors that go through our logging via expo-sdk / xdl don't include stacktraces
- Unhandled promise rejections
- Any error that is logged
Also, if you do console.warn
or console.error
and one of the arguments is an error object, we just pretty print the error object and don't show the trace. The trace that is shown instead shows where the warning / error comes from.
- Any
console.warn
orconsole.error
includes context via stacktrace
- Collapsable stacks in XDE
- Need to figure out how I can know whether app has "loaded" or not -- if there is AppLoading has it been dismissed? If not, how can we know that it is not being used?
- Update AppLoading docs, recommend to use
startAsync
- Clean up paths (should be relative to project root)
- Format stack for XDE
- XDE: linkify files in stack frame to open in
EXPO_EDITOR
on click