expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
35.08k stars 5.62k forks source link

Android standalone app crashing on Android X #6523

Closed serhanozcan closed 4 years ago

serhanozcan commented 4 years ago

Hi expo team, I did update SDK yesterday. (35 to 36). Android build does not work on android x versions. The application gives error after splash screen. "Application keep stopping". and no error. I'm just getting unsafe lifecycle methods warning from GridList and Hyperlink packages.

I uninstalled and tried these packages, but the problem persists. But there is a detail; The application opens smoothly on first installation. But if you close it through the task manager it won't open again.

Expo CLI 3.11.1 environment info: System: OS: macOS 10.15.1 Shell: 5.7.1 - /bin/zsh Binaries: Node: 10.17.0 - /usr/local/opt/node@10/bin/node Yarn: 1.19.1 - /usr/local/bin/yarn npm: 6.11.3 - /usr/local/opt/node@10/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman IDEs: Android Studio: 3.5 AI-191.8026.42.35.5900203 Xcode: 11.1/11A1027 - /usr/bin/xcodebuild npmPackages: expo: ^36.0.0 => 36.0.0 react: 16.9.0 => 16.9.0 react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4 react-navigation: ^4.0.10 => 4.0.10 npmGlobalPackages: expo-cli: 3.11.1

sinisavukovic commented 4 years ago

I'm having the same issue on Xiaomi Note 7.

Here is what I'm getting at Firebase Crash analytics

Fatal Exception: java.lang.RuntimeException
Expo encountered a fatal error: Error while updating property 'width' in shadow node of type: RCTView

The error changes a bit every time it crashes

Error while updating property <RANDOM_CSS_PROPERY> in shadow node of type: RCTView
serhanozcan commented 4 years ago

Thanx for the fixing to title bug

But please anyone tell me which package may be problem ? Here is the my package.json before the update.

    "@react-native-community/netinfo": "~3.2.1",
    "@valdio/react-native-scrollable-tabview": "^0.8.12",
    "axios": "^0.19.0",
    "babel-preset-react-native": "^4.0.1",
    "crypto-js": "^3.1.9-1",
    "expo": "^35.0.0",
    "expo-asset": "~7.0.0",
    "expo-av": "~7.0.1",
    "expo-blur": "^7.0.0",
    "expo-cli": "^3.7.1",
    "expo-constants": "~7.0.0",
    "expo-facebook": "~7.0.0",
    "expo-font": "~7.0.0",
    "expo-google-app-auth": "^7.0.0",
    "expo-image-picker": "~7.0.0",
    "expo-video-player": "^1.5.1",
    "global": "^4.4.0",
    "i18next": "^19.0.1",
    "laravel-echo": "^1.6.1",
    "mobx": "5.13.0",
    "mobx-react": "^6.1.3",
    "mobx-react-lite": "^1.4.1",
    "moment": "^2.24.0",
    "pusher-js": "^5.0.2",
    "ramda": "^0.26.1",
    "react": "16.9.0",
    "react-content-loader": "^4.3.2",
    "react-hook-form": "^3.28.7",
    "react-i18next": "^11.2.2",
    "react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
    "react-native-animatable": "^1.3.3",
    "react-native-checkbox-form": "^1.1.5",
    "react-native-dotenv": "^0.2.0",
    "react-native-dropdownalert": "^4.2.0",
    "react-native-expo-image-cache": "^4.1.0",
    "react-native-flash-message": "^0.1.15",
    "react-native-gesture-handler": "~1.3.0",
    "react-native-grid-list": "^1.1.0",
    "react-native-hyperlink": "^0.0.16",
    "react-native-image-view": "^2.1.8",
    "react-native-mentions": "^1.1.4",
    "react-native-modal": "^11.5.1",
    "react-native-paper": "^2.16.0",
    "react-native-picker-select": "^6.3.3",
    "react-native-pie": "^0.5.0",
    "react-native-raw-bottom-sheet": "^2.0.5",
    "react-native-reanimated": "~1.2.0",
    "react-native-render-html": "^4.1.2",
    "react-native-select-two": "^1.0.6",
    "react-native-simple-twitter": "^2.4.1",
    "react-native-svg": "9.9.5",
    "react-native-swipeable-row": "^0.8.1",
    "react-native-timeago": "^0.4.0",
    "react-native-vector-icons": "^6.6.0",
    "react-native-web": "^0.11.7",
    "react-navigation": "^4.0.10",
    "react-navigation-hooks": "^1.1.0",
    "react-navigation-stack": "^1.5.1",
    "react-navigation-tabs": "^2.3.0",
    "react-navigation-transitions": "^1.0.12",
    "react-twitter-authentication": "^0.0.14",
    "react-twitter-login": "^0.0.0",
    "socket.io-client": "2.1.1"
cruzach commented 4 years ago

I think the best course of action is to test a blank SDK 36 expo init app, and see if the same crash occurs

ehortle commented 4 years ago

I'm having the same issue on Xiaomi Note 7.

Here is what I'm getting at Firebase Crash analytics

Fatal Exception: java.lang.RuntimeException
Expo encountered a fatal error: Error while updating property 'width' in shadow node of type: RCTView

The error changes a bit every time it crashes

Error while updating property <RANDOM_CSS_PROPERY> in shadow node of type: RCTView

I am getting this on Samsung Galaxy S10+ and S9+ too, completely breaking the app. Have reverted to SDK 35 and no problem.

cruzach commented 4 years ago

A minimal repro would be very helpful here- this is a great guide on how to create one

raczynskil commented 4 years ago

Application starts once every 10 times on Xiaomi (SDK 36).

Xrew commented 4 years ago

I have the same problem on Samsung Galaxy A8. It works time to time...but nearly always crash. After expo upgrade 35 => 36. Only in standalone APK (using expokit). If it is running in debug (expo start), than everything works fine.

Xrew commented 4 years ago

Downgrade to Expo SDK35 helps..it works now correctly.

serhanozcan commented 4 years ago

Downgrade to Expo SDK35 helps..it works now correctly.

This is not solution, it's just a way to make it work. I think a package is incompatible with SDK36. We need to figure out what this is.

EndlezzCoding commented 4 years ago

have same crash here, crash after upgrading from 35 to 36 Here are my dependencies

"dependencies": { "@expo/vector-icons": "^10.0.0", "axios": "^0.18.0", "chinese-conv": "^1.0.1", "ex-react-native-i18n": "0.0.6", "expo": "^36.0.0", "expo-ads-admob": "~8.0.0", "expo-app-auth": "~8.0.0", "expo-apple-authentication": "~2.0.0", "expo-constants": "~8.0.0", "expo-facebook": "~8.0.0", "expo-file-system": "~8.0.0", "expo-font": "~8.0.0", "expo-google-app-auth": "^6.0.0", "expo-image-manipulator": "~8.0.0", "expo-image-picker": "~8.0.0", "expo-localization": "~8.0.0", "expo-permissions": "~8.0.0", "expo-sqlite": "~8.0.0", "lru-cache": "^5.1.1", "lz-string": "^1.4.4", "native-base": "^2.13.4", "parse": "^2.10.0", "prop-types": "^15.7.2", "random-useragent": "^0.3.1", "react": "16.9.0", "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz", "react-native-animatable": "^1.3.0", "react-native-easy-toast": "^1.1.0", "react-native-floating-action": "^1.14.2", "react-native-gesture-handler": "~1.5.0", "react-native-hyperlink": "0.0.16", "react-native-image-zoom-viewer": "^2.2.12", "react-native-maps": "0.26.1", "react-native-material-dialog": "^0.7.4", "react-native-popup-menu": "^0.13.2", "react-native-reanimated": "~1.4.0", "react-native-webview": "7.4.3", "react-navigation": "^3.0.9", "rxjs": "^6.2.1", "rxjs-compat": "^6.2.1", "sentry-expo": "~2.0.0" }

benawad commented 4 years ago

I'm running into this in production too, but I'm not able to reproduce it. Tried dropping the APK into an emulator running api 29 and it worked fine.

serhanozcan commented 4 years ago

I'm running into this in production too, but I'm not able to reproduce it. Tried dropping the APK into an emulator running api 29 and it worked fine.

Are you tried real device ? if your answer 'yes and still work', can you share package.json ?

benawad commented 4 years ago

@serhanozcan I don't have a device that has Android X, but here's my package.json

    "@expo/vector-icons": "^10.0.0",
    "expo": "^36.0.0",
    "expo-constants": "~8.0.0",
    "expo-font": "~8.0.0",
    "expo-image-manipulator": "~8.0.0",
    "expo-image-picker": "~8.0.1",
    "expo-keep-awake": "~8.0.0",
    "expo-network": "~2.0.0",
    "expo-permissions": "~8.0.0",
    "expo-secure-store": "~8.0.0",
    "fast-deep-equal": "^3.1.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
    "react-native-appearance": "^0.3.1",
    "react-native-calendars": "^1.214.0",
    "react-native-dialog": "^5.6.0",
    "react-native-drawer-layout": "^2.0.0",
    "react-native-gesture-handler": "~1.5.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.1",
    "react-native-modal": "^11.5.3",
    "react-native-modal-datetime-picker": "^7.6.0",
    "react-native-popup-menu": "^0.15.6",
    "react-native-reanimated": "~1.4.0",
    "react-native-svg": "9.13.5",
    "react-native-swiper": "^1.6.0-rc.3",
    "react-navigation": "^4.0.10",
    "react-navigation-stack": "^1.10.3",
    "react-navigation-tabs": "^2.6.2",
    "recyclerlistview": "^2.0.12",
    "sentry-expo": "~2.0.1"
serhanozcan commented 4 years ago

Logcat print lot of RCTView fatal error. How can i solve that;

Fatal Exception: java.lang.RuntimeException
Expo encountered a fatal error: Error while updating property 'width' in shadow node of type: RCTView
Fatal Exception: java.lang.RuntimeException
Expo encountered a fatal error: Error while updating property 'height' in shadow node of type: RCTView
Fatal Exception: java.lang.RuntimeException
Expo encountered a fatal error: Error while updating property 'position' in shadow node of type: RCTView
Fatal Exception: java.lang.RuntimeException
Expo encountered a fatal error: Error while updating property 'left' in shadow node of type: RCTView
Fatal Exception: java.lang.RuntimeException
Expo encountered a fatal error: Error while updating property 'padding' in shadow node of type: RCTView
.
.
.
.

I'm checked all project files for syntax but everything is okey. I'm not found like that height:"1"

bob-user commented 4 years ago

@benawad react-native-calendars might be the culprit in your case, I'm facing this issue in production too. Making an expo blank project using this package crashes in production on Android devices with sdk 36.

@serhanozcan you can look for JSX conditional rendering like this for example :

{
    short &&
      <Text>short text</Text>
}

seems to crash when short is undefined or null. Nevertheless, this sometimes works in Expo client when a first crash occurs and you hit the reload button on the blue error screen, but I'm not sure why.

replacing with a ternary condition and/or using truthy syntax might help :

{
    short ?
      <Text>short text</Text>
    : 
      null
}
{
    !!short &&
      <Text>short text</Text>
}
Xrew commented 4 years ago

Hi, I hope it helps.

"dependencies": {
    "@babel/plugin-proposal-decorators": "^7.4.4",
    "@expo/vector-icons": "^10.0.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.25",
    "@fortawesome/free-solid-svg-icons": "^5.11.2",
    "@fortawesome/react-native-fontawesome": "^0.1.0",
    "@react-native-community/datetimepicker": "^2.1.0",
    "expo": "^36.0.0",
    "expo-ads-admob": "~8.0.0",
    "expo-ads-facebook": "~8.0.0",
    "expo-constants": "~8.0.0",
    "expo-file-system": "~8.0.0",
    "expo-google-sign-in": "~8.0.0",
    "expo-linear-gradient": "^8.0.0",
    "expo-localization": "~8.0.0",
    "expo-permissions": "~8.0.0",
    "expo-sqlite": "~8.0.0",
    "expo-web-browser": "~8.0.0",
    "expokit": "36.0.0",
    "i18n-js": "^3.3.0",
    "jsc-android": "245459",
    "mobx": "^5.10.1",
    "mobx-react": "^6.1.1",
    "moment": "^2.23.0",
    "react": "16.9.0",
    "react-dom": "16.9.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
    "react-native-app-intro-slider": "^3.0.0",
    "react-native-color-picker": "^0.4.1",
    "react-native-elements": "^1.1.0",
    "react-native-gesture-handler": "~1.5.1",
    "react-native-paper": "^2.13.0",
    "react-native-reanimated": "~1.4.0",
    "react-native-share": "^1.1.3",
    "react-native-svg": "9.13.3",
    "react-native-timeline-flatlist": "^0.5.0",
    "react-native-unimodules": "^0.7.0",
    "react-native-view-shot": "3.0.2",
    "react-navigation": "^3.11.1",
    "react-navigation-material-bottom-tabs": "^2.1.5",
    "react-navigation-stack": "^1.5.1",
    "react-navigation-tabs": "^2.1.3",
    "victory-native": "^31.0.0"
  },
  "devDependencies": {
    "babel-preset-expo": "^7.0.0",
    "expo-cli": "^3.0.4",
    "jest-expo": "^36.0.0",
    "schedule": "^0.4.0"
  },
benawad commented 4 years ago

@bob-user does just having it in the bundle cause the problem or trying to render it?

The app crashes right when users open it for me and I don't render the calendar until a later screen

bob-user commented 4 years ago

@benawad The rendering causes the crash. Does the render method of your landing page contain JSX conditional rendering ?

benawad commented 4 years ago

@bob-user It did contain 1, but I'm certain it evaluated to true. Going to remove it and try redeploying anyway, but I don't think it will make a difference.

summerkiflain commented 4 years ago

My app is also breaking in standalone android version after upgrading to sdk 36, but the thing is I have already published my updated app-bundle to playstore, but for some reason it is breaking on my galaxy devices (note8 & S8) but not on a testing device which I have (Oppo F11). I have tried by building apk and install locally on my devices without publishing to playstore, still no good, it works first time when I start the app after installation, but starts crashing after clearing from recents app and starting the app again with the internet available through wifi or sim network. but if i turn off the internet availability app starts working again. and when inside the app I can turn on internet again. P.S one more thing, sometimes app sends logs to sentry with assets failed to download with "failed md5 integrity check" when it crashes. not sure if all this info is helpful or not, I hope someone could take a guess out of it for where the issue might be. Thanks.

cruzach commented 4 years ago

As I said above, the best way to help get this problem diagnosed and solved is with a minimal reproducible example. copy/pasting your project's dependencies isn't too helpful, since it doesn't help to narrow the problem down to Expo. If someone can share steps to reproduce this with a blank expo init project, that would really help in debugging

@summerkiflain I've seen that md5 error message before when asset files had spaces in the names, so you might want to give those a check

wen-kai commented 4 years ago

+1 Getting the same behavior as @theraku.

Sorry for no repro atm...

wen-kai commented 4 years ago

Not totally sure, but noticed all the package.json shared here reference @expo/vector-icons@10.0.0 -- I upgraded mine to latest and seems to have resolved the crashes. Hope this helps! possibly related? https://github.com/expo/vector-icons/issues/92

EDIT: nevermind...the above change allowed for the app to run consistently on expo client, but still getting crash in production app post-initial load. Ended up downgrading back to 35 in the meantime. Hopefully we can find a solution!

summerkiflain commented 4 years ago

@cruzach all my app assets contain hyphens (-) instead of spaces, I even tried changing those hyphens to underscores (_), generated apk and tested locally, it still crashed on 2nd app loading sending failed asset download error on updated assets.

@wen-kai

+1 Getting the same behavior as @theraku.

  • Upgraded from 35 -> 36
  • Initial load on expo client via opening release channel works great
  • Subsequent loads results in multiple inconsistent errors Expo encountered a fatal error: Error while updating property 'X' in shadow node of type: RCTView
  • Only breaks on Android, IOS is okay

Sorry for no repro atm...

exactly same happening for me too, except in my case iOS hangs on splash screen.

haikyuu commented 4 years ago

I solved it by looking carefully in the rendered component. There was a property that wasn't supported justifyContent: 'stretch' that found its way to the codebase somehow.

React-native should print a helpful error message that links to the line of code in question

haciSeydaoglu commented 4 years ago

I've updated to SDK 36. According to the Google Play Console, nearly 50% of users crashed. I've been overhauling all the codes for two days. But I couldn't solve the problem. When I downloaded the SDK to 35, the whole problem was fixed. There is definitely a problem with SDK 36. Especially in Android 9 and Android X crashes are increasing.

(I wrote the comment in translation. Sorry for my spelling mistakes.)

t009s commented 4 years ago

I think the best course of action is to test a blank SDK 36 expo init app, and see if the same crash occurs

I have tried with that also but it is crashing some times irrespective of android version. And one more thing after building the app, the splash screen gets blink for a second. Please help... Expo SDK 36 Android 10, Android 6, Android 9

cruzach commented 4 years ago

@haikyuu running your app locally in production mode (use expo start --no-dev --minify) should help with that

As you guys can see, it's hard to diagnose this problem without repros because a lot of times the crash is due to a fatal JS error

rxhivzero commented 4 years ago

same problem java.lang.RuntimeException host.exp.exponent.experience.BaseExperienceActivity$2.run google play 50,000 users have 627 this problem sentry get This presentation change has been interrupted by a newer change request.

but my tried 6 android phones all work fine

EndlezzCoding commented 4 years ago

The main difference between expo 35 and expo 36 is the upgrade from React Native 0.59 to 0.61. So checking the react native release notes might help to find out what is breaking the app.

massivebrains commented 4 years ago

Hello @all, anyone got a definite solution to this?

emersonwdesigner commented 4 years ago

Atenção todos! Nada acima resolve, descobri por acaso que o tema dark do Android ocasiona erros aleatórios, desabilitar essa função resolve o problema mas isso deve ser resolvido urgentemente. Alguns usuários habilitam os temas como automático então receberão erro à noite com o tema dark acionado.

emersonwdesigner commented 4 years ago

@ser

Oi equipe expo, eu atualizei o SDK ontem. (35 a 36). A versão do Android não funciona nas versões do Android x. O aplicativo dá erro após a tela inicial. "Aplicação continua parando". e sem erro. Estou apenas recebendo aviso de métodos de ciclo de vida inseguros nos pacotes GridList e Hyperlink.

Eu desinstalei e tentei esses pacotes, mas o problema persiste. Mas há um detalhe; O aplicativo abre sem problemas na primeira instalação. Mas se você fechá-lo através do gerenciador de tarefas, ele não será aberto novamente.

Informações sobre o ambiente do Expo CLI 3.11.1: Sistema: OS: macOS 10.15.1 Shell: 5.7.1 - / bin / zsh Binários: Nó: 10.17.0 - / usr / local / opt / node @ 10 / bin / node Fio: 1.19.1 - / usr / local / bin / yarn npm: 6.11.3 - / usr / local / opt / node @ 10 / bin / npm Watchman: 4.9.0 - IDs de / usr / local / bin / watchman : Android Studio : 3,5 AI-191.8026.42.35.5900203 Xcode: 11,1 / 11A1027 - / usr / bin / xcodebuild npmPackages: expo: ^ 36.0.0 => 36.0.0 reagir: 16.9.0 => 16.9.0 reagir nativo: https: //github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4 react -navigation: ^ 4.0.10 => 4.0.10 npmGlobalPackages: expo-cli: 3.11.1

https://github.com/expo/expo/issues/6523#issuecomment-571001942

t009s commented 4 years ago

The main difference between expo 35 and expo 36 is the upgrade from React Native 0.59 to 0.61. So checking the react native release notes might help to find out what is breaking the app.

@atominvention I have switched from expo to React Native now and my app is using react native 0.61 and It is working fine as expected. I don't know what's wrong with expo 36....

wen-kai commented 4 years ago

@emersonwdesigner yes! Turning off dark mode allows the expo36 app to load successfully and function normally. When I turn it back on it crashes again with the above intermittent errors. Turn it back off and it loads fine. Will see if enforcing light mode in config resolves.

wen-kai commented 4 years ago

Update: tried enforcing light mode via userInterfaceStyle in app.json, but still getting the crashes when dark mode enabled on the Android device. Can confirm turning off dark mode resolves the crashing, but can't find a way to prevent it for users who have dark mode enabled, regardless of userInterfaceStyle config.

caio-ribeiro-pereira commented 4 years ago

@emersonwdesigner mano, vc não tem noção do alívio que sua descoberta me trouxe, estava quase na terceira semana quebrando cabeça com esse crash que era muito aleatório e com msg de erro não intuitiva, muito obrigado pelo aviso, desativei dark mode e simplesmente parou os problemas do meu app!

brfreek commented 4 years ago

@wen-kai did you install the react-native-appearance package? I had the exact same issues as you described and after setting "userInterfaceStyle": "light" in the app.json and installing the react-native-appearance package the crash did not occur anymore!

wen-kai commented 4 years ago

@brfreek nice! did you test on a standalone version? it seems to work on expo client with "userInterfaceStyle": "light" but when i build and install an apk on my device it still crashes oddly...

Here's a gif of what happens dark vs light mode. Note the strange screen flash when opening app with dark mode. Works as expected on Expo Client. GIF-200106_165409

brfreek commented 4 years ago

@wen-kai Sorry I thought that it acted as expected but after a few tries the app crashes again...

jiejie-dev commented 4 years ago

same problem on device XiaoMi (Android 10) darkmode

atude commented 4 years ago

Same issue on dark mode (Xiaomi MI9T, Android 10)

strohmann commented 4 years ago

a lot of my users are facing the same issue on Android/standalone. Finally got the crash myself (S10e, Android 9). Logcat points to react-native-svg (I am using v9.13.3) - maybe this is helpful for the Expo devs:

01-08 17:40:03.482 27765 27895 E unknown:ViewManager: Error while updating prop width 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: java.lang.reflect.InvocationTargetException 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at java.lang.reflect.Method.invoke(Native Method) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateShadowNodeProp(ViewManagersPropertyCache.java:3) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackShadowNodeSetter.setProperty(ViewManagerPropertyUpdater.java:2) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:14) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.uimanager.ReactShadowNodeImpl.updateProperties(ReactShadowNodeImpl.java:1) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.uimanager.UIImplementation.createView(UIImplementation.java:11) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:5) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at java.lang.reflect.Method.invoke(Native Method) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:18) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:2) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at android.os.Handler.handleCallback(Handler.java:873) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at android.os.Handler.dispatchMessage(Handler.java:99) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at android.os.Looper.loop(Looper.java:214) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at java.lang.Thread.run(Thread.java:764) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'boolean com.facebook.react.bridge.Dynamic.isNull()' on a null object reference 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.uimanager.LayoutShadowNode$MutableYogaValue.setFromDynamic(LayoutShadowNode.java:1) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: at com.facebook.react.uimanager.LayoutShadowNode.setWidth(LayoutShadowNode.java:2) 01-08 17:40:03.482 27765 27895 E unknown:ViewManager: ... 17 more

01-08 17:40:03.507 27765 27765 D AndroidRuntime: Shutting down VM 01-08 17:40:03.508 27765 27765 E AndroidRuntime: FATAL EXCEPTION: main 01-08 17:40:03.508 27765 27765 E AndroidRuntime: Process: at.lszb.app, PID: 27765 01-08 17:40:03.508 27765 27765 E AndroidRuntime: java.lang.RuntimeException: Expo encountered a fatal error: Error while updating property 'width' in shadow node of type: RNSVGSvgView 01-08 17:40:03.508 27765 27765 E AndroidRuntime: at host.exp.exponent.experience.a$b.run(BaseExperienceActivity.java:7) 01-08 17:40:03.508 27765 27765 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873) 01-08 17:40:03.508 27765 27765 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) 01-08 17:40:03.508 27765 27765 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214) 01-08 17:40:03.508 27765 27765 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7037) 01-08 17:40:03.508 27765 27765 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 01-08 17:40:03.508 27765 27765 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) 01-08 17:40:03.508 27765 27765 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

lowiebenoot commented 4 years ago

+1 - Xiaomi mi9T in dark mode.

luizjr commented 4 years ago

Atenção todos! Nada acima resolve, descobri por acaso que o tema dark do Android ocasiona erros aleatórios, desabilitar essa função resolve o problema mas isso deve ser resolvido urgentemente. Alguns usuários habilitam os temas como automático então receberão erro à noite com o tema dark acionado.

Cara, muito obrigado, estava há 3 dias com esse problema sem encontrar nada para resolução do mesmo. Eu estou usando o Xiaomi Redmi 7. Aguardando uma solução...

Man, thank you very much, I was 3 days ago with this problem finding nothing to solve it. I am using Xiaomi Redmi 7. Awaiting a solution ...

lukmccall commented 4 years ago

@strohmann, could you provide more details? For example, what functionality from react-native-svg do you use? It would be best if you could create a repo or a snack.

Unfortunately, I couldn't reproduce the crash. I've tested it on Android 10 and 9.

strohmann commented 4 years ago

it's hard for me to provide a repo as it took me several days to experience the crash at least once on my own device. And I'm not 100% sure that my exception callstack matches the ones of my users (I don't have their callstacks). I'm using only basic components of react-native-svg: Path, Polygon, Line, Circle... nothing special. But maybe a dependency of mine is using more functionality of it (react-native-vector-icons?): "dependencies": { "@mapbox/sphericalmercator": "^1.1.0", "@react-native-community/netinfo": "4.6.0", "base-64": "^0.1.0", "ex-react-native-i18n": "^0.0.6", "expo": "^36.0.2", "expo-av": "~8.0.0", "expo-constants": "~8.0.0", "expo-device": "~2.0.0", "expo-font": "~8.0.0", "expo-intent-launcher": "~8.0.0", "expo-linear-gradient": "~8.0.0", "expo-localization": "~8.0.0", "expo-location": "~8.0.0", "expo-network": "~2.0.0", "expo-permissions": "~8.0.0", "expo-sensors": "~8.0.0", "expo-video-player": "^1.5.1", "expo-web-browser": "~8.0.0", "mobx": "^5.14.2", "mobx-react": "^6.1.4", "moment": "^2.24.0", "react": "16.9.0", "react-dom": "16.9.0", "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz", "react-native-appearance": "~0.3.1", "react-native-gesture-handler": "~1.5.0", "react-native-maps": "0.26.1", "react-native-parse-html": "^2.2.6", "react-native-reanimated": "~1.4.0", "react-native-root-toast": "^3.2.0", "react-native-safe-area-context": "0.6.0", "react-native-svg": "9.13.3", "react-native-tab-view": "^2.10.0", "react-native-vector-icons": "^6.6.0", "react-native-web": "^0.11.7", "react-native-webview": "7.4.3", "react-navigation": "3.13.0", "reanimated-bottom-sheet": "^1.0.0-alpha.18", "rollbar-react-native": "^0.6.1", "sentry-expo": "^2.0.1", "set-cookie-parser": "^2.4.0" }

EndlezzCoding commented 4 years ago

I can confirm the crash is caused by dark mode too. Looks like if I fresh install an app with expo 36 is fine. But if I install an old version of the app with expo 35 first and then update to a new one with expo 36, the app will crash.

strohmann commented 4 years ago

wasn't crashing the whole day, until I published a new version - crashed at the start right at the first run after publishing. This time the callstack is java.lang.RuntimeException: Expo encountered a fatal error: Error while updating property 'fontSize' in shadow node of type: RCTText

I have the feeling the crashes are related to the automatic update process. Maybe the app tries to apply/restart the new version at a "bad time"? Here is my relevant part of app.json: "updates": { "enabled": true, "checkAutomatically": "ON_LOAD", "fallbackToCacheTimeout": 10000 }

wodin commented 4 years ago

@strohmann I have seen crashes because of bad OTA updates, but those caused errors like the following for me:

12-26 21:58:33.473 10444 10444 E AndroidRuntime: FATAL EXCEPTION: main
12-26 21:58:33.473 10444 10444 E AndroidRuntime: java.lang.RuntimeException: Expo encountered a fatal error: Attempting to call JS function on a bad application bundle: RCTDeviceEventEmitter.emit()
12-26 21:58:35.786 10651 10651 E AndroidRuntime: FATAL EXCEPTION: main
12-26 21:58:35.786 10651 10651 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {com.example.myapp/host.exp.exponent.MainActivity}: java.lang.RuntimeException: Expo encountered a fatal error: Attempting to call JS function on a bad application bundle: AppRegistry.runApplication()
12-26 21:58:35.786 10651 10651 E AndroidRuntime: Caused by: java.lang.RuntimeException: Expo encountered a fatal error: Attempting to call JS function on a bad application bundle: AppRegistry.runApplication()

and

12-26 21:58:44.934 10907 10907 E AndroidRuntime: FATAL EXCEPTION: main
12-26 21:58:44.934 10907 10907 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {com.example.myapp/host.exp.exponent.MainActivity}: java.lang.RuntimeException: Expo encountered a fatal error: com.facebook.react.devsupport.JSException: Unexpected end of script
12-26 21:58:44.934 10907 10907 E AndroidRuntime: Caused by: java.lang.RuntimeException: Expo encountered a fatal error: com.facebook.react.devsupport.JSException: Unexpected end of script

rather than:

Error while updating property 'fontSize' in shadow node of type: RCTText