Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Crashes on Home Screen Launch but Works When Opened from Play Store After New Architecture Update #45890

Closed
bahadiraraz opened this issue Aug 5, 2024 · 6 comments
Labels
Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@bahadiraraz
Copy link

bahadiraraz commented Aug 5, 2024

Description

When using the new architecture (Fabric & TurboModules) in React Native, the application crashes for some users when launched from the Android home screen. Interestingly, the app works fine when launched directly from the Play Store. This issue started occurring after switching to the new architecture, and despite trying various troubleshooting steps such as clearing app and Play Store data, and rebooting the phone, the issue persists. It's unclear whether the problem is related to Expo or React Native.

In an attempt to resolve the issue, we rolled back to the old architecture. However, the users who were experiencing the crashes still face the same issue. They can only launch the app successfully by going through the Play Store, not from the home screen.

Additionally, this crash has been reported by multiple users, indicating it is a widespread issue.

I would also like to note that I have not encountered this issue in simulation or during product builds.

Below, I have attached videos demonstrating the issue:

  • Video 1: A user experiencing the crash when launching the app from the home screen.
  • Video 2: A user who is not experiencing the issue, with the app launching successfully from both the home screen and Play Store.

Device Information

Here are the details of the devices used in the reports:

Device 1

  • Application Name: Learnity
  • Version: 134
  • Build Number: 66
  • Device ID: toco
  • Brand: Xiaomi
  • Model: Mi Note 10 Lite
  • System Name: Android
  • System Version: 12
  • Is Emulator: false
  • API Level: 31
  • Device Type: Smartphone
  • Has Notch: false
  • Device Name: Mi Note 10 Lite
  • Battery Level: 91%
  • Is Battery Charging: false

Device 2

  • Application Name: Learnity
  • Version: 134
  • Build Number: 66
  • Device ID: a34x
  • Brand: Samsung
  • Model: SM-A346E
  • System Name: Android
  • System Version: 14
  • Is Emulator: false
  • API Level: 34
  • Device Type: Smartphone
  • Has Notch: false
  • Battery Level: 47%
  • Is Battery Charging: false

Steps to reproduce

  1. Open the application by searching for its name in the Play Store and tapping "Open". Notice that the app works fine.
  2. Return to the Android home screen.
  3. Tap on the app icon on the home screen to launch it.
  4. Notice the crash.

React Native Version

0.74.3

Affected Platforms

Runtime - Android

Areas

TurboModule - The New Native Module System, Bridgeless - The New Initialization Flow

Output of npx react-native info

:
  OS: macOS 14.3.1
  CPU: (8) arm64 Apple M1
  Memory: 141.77 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.1
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 10.2.4
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.06.17.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.3
    wanted: 0.74.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

.facebook.react.common.JavascriptException: Error: Exception in HostObject::get
for prop 'NativeUnimoduleProxy':
java.lang.IllegalArgumentException: Could not put
'class android.os.UserHandle' to WritableMap, js
engine: hermes, stack:
anonymous@1:991096
loadModuleImplementation@1:108272
guardedLoadModule@1:107820
metroRequire@1:107442
anonymous@1:987750
loadModuleImplementation@1:108272
guardedLoadModule@1:107820
metroRequire@1:107442
anonymous@1:985839
loadModuleImplementation@1:108272
guardedLoadModule@1:107820
metroRequire@1:107442
anonymous@1:114464
loadModuleImplementation@1:108272
guardedLoadModule@1:107820
metroRequire@1:107442
anonymous@1:114347
loadModuleImplementation@1:108272
guardedLoadModule@1:107777
metroRequire@1:107442
global@1:106983

at
com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:65)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:146)
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:233)
at java.lang.Thread.run(Thread.java:1012)

Reproducer

https://play.google.com/store/apps/details?id=com.sorsorui

Screenshots and Videos

WhatsApp.Video.2024-08-05.at.10.30.33.mp4
WhatsApp.Video.2024-08-05.at.10.51.57.mp4
@bahadiraraz bahadiraraz added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Aug 5, 2024
@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.74.4. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot react-native-bot added Newer Patch Available Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Aug 5, 2024
@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

@bahadiraraz
Copy link
Author

expo/expo#30807

@bahadiraraz
Copy link
Author

Issue Resolution: Update expo-notifications to Version 0.28.15

@cortinico cortinico added Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library and removed Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available Needs: Attention Issues where the author has responded to feedback. labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

3 participants