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

Crash with SIGSEGV on Android #48788

Closed
minhkwan opened this issue Jan 20, 2025 · 13 comments
Closed

Crash with SIGSEGV on Android #48788

minhkwan opened this issue Jan 20, 2025 · 13 comments
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications. Resolution: Answered When the issue is resolved with a simple answer Type: Unsupported Version Issues reported to a version of React Native that is no longer supported

Comments

@minhkwan
Copy link

Description

Currently, my Firebase Crashlytics reported an

Crashed: null pointer dereference #1
SIGSEGV 0x0000000000000008

Steps to reproduce

I don't know since it's reported from firebase crashlytics

React Native Version

0.73.1

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 14.3.1
  CPU: (8) arm64 Apple M1
  Memory: 115.33 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.4.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 3.6.4
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.2.4
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/sotatek/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - watchOS 10.2
  Android SDK:
    API Levels:
      - "31"
      - "33"
      - "33"
      - "33"
      - "34"
    Build Tools:
      - 30.0.3
      - 33.0.1
      - 34.0.0
    System Images:
      - android-29 | Google APIs ARM 64 v8a
      - android-29 | Google Play ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-UpsideDownCakePrivacySandbox | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.1/15C65
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 3.3.6
    path: /Users/sotatek/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.1
    wanted: 0.73.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

Crashed: null pointer dereference #1
SIGSEGV 0x0000000000000008
0 libfbjni.so (Missing BuildId 957a087554a7dd659c148d0560674b789d2844d0)  
1 libfbjni.so (Missing BuildId 957a087554a7dd659c148d0560674b789d2844d0)  
2 (Missing)  
3 libart.so (Missing BuildId c35c9ebf7bb06435e4b31977d87bd5d5)  
4 libart.so (Missing BuildId c35c9ebf7bb06435e4b31977d87bd5d5)  
5 libart.so (Missing BuildId c35c9ebf7bb06435e4b31977d87bd5d5)  
6 libart.so (Missing BuildId c35c9ebf7bb06435e4b31977d87bd5d5)  
7 libart.so (Missing BuildId c35c9ebf7bb06435e4b31977d87bd5d5)  
8 libart.so (Missing BuildId c35c9ebf7bb06435e4b31977d87bd5d5)  
9 libart.so (Missing BuildId c35c9ebf7bb06435e4b31977d87bd5d5)  
10 libart.so (Missing BuildId c35c9ebf7bb06435e4b31977d87bd5d5)  
11 libc.so (Missing BuildId 6d463132a910e8cedcfbd9e51b09adce)  
12 libc.so (Missing BuildId 6d463132a910e8cedcfbd9e51b09adce)  
13 libc.so (Missing BuildId 6d463132a910e8cedcfbd9e51b09adce)  
14 libc.so (Missing BuildId 6d463132a910e8cedcfbd9e51b09adce)  
15 libart.so (Missing BuildId c35c9ebf7bb06435e4b31977d87bd5d5)

Reproducer

we don't know how to reproduce.

Screenshots and Videos

No response

@react-native-bot react-native-bot added the Type: Unsupported Version Issues reported to a version of React Native that is no longer supported label Jan 20, 2025
@react-native-bot
Copy link
Collaborator

Warning

Unsupported version: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications. and removed Needs: Triage 🔍 labels Jan 20, 2025
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@react-native-bot
Copy link
Collaborator

Warning

Unsupported version: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@cortinico
Copy link
Contributor

I don't know since it's reported from firebase crashlytics

Not sure how we're supposed to help you here then. We would need a stable reproducer as otherwise this is impossible to debug in any form

@jaswant0605
Copy link

Same just happened to me

Here are the crash logs. Only crashes on some devices when downloaded from play store

backtrace:
#00 pc 0x0000000000055684 /system/lib64/libandroidfw.so (android::LoadedPackage::FindEntryByName(std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&, std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&) const+580)
#1 pc 0x0000000000045000 /system/lib64/libandroidfw.so (android::AssetManager2::GetResourceId(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) const+408)
#2 pc 0x000000000015fb1c /system/lib64/libandroid_runtime.so (android::NativeGetResourceIdentifier(_JNIEnv*, _jclass*, long, _jstring*, _jstring*, _jstring*)+520)
#3 pc 0x000000000046ffac /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+156)

@ZeeshanZahoor020
Copy link

Same for us.

React Native : 74.5
React: 18.3.1


backtrace:
#00 pc 0x0000000000056158 /system/lib64/libandroidfw.so (android::LoadedPackage::FindEntryByName(std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&, std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&) const+584)
#1 pc 0x0000000000045420 /system/lib64/libandroidfw.so (android::AssetManager2::GetResourceId(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) const+412)
#2 pc 0x00000000001608a0 /system/lib64/libandroid_runtime.so (android::NativeGetResourceIdentifier(_JNIEnv*, _jclass*, long, _jstring*, _jstring*, _jstring*)+524)
#3 pc 0x000000000035ffec /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+156)

Download from Playstore and crashes for Android 12 and below on app launch. 13 and above work fine

@buraks
Copy link

buraks commented Feb 8, 2025

same here, about 5% of the Android users started to see this crash. So far we have seen this crash coming from Android 9, 10, 11, 12.

This is what Play Store gives:

backtrace:
  #00  pc 0x00000000000567b8  /system/lib64/libandroidfw.so (android::LoadedPackage::FindEntryByName(std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&, std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&) const+584)
  #01  pc 0x0000000000045680  /system/lib64/libandroidfw.so (android::AssetManager2::GetResourceId(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const+412)
  #02  pc 0x0000000000163ad8  /system/lib64/libandroid_runtime.so (android::NativeGetResourceIdentifier(_JNIEnv*, _jclass*, long, _jstring*, _jstring*, _jstring*)+524)
  #03  pc 0x000000000037a51c  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+156)

This is what we see on Crashlytics:

#00 pc 0x55684 libandroidfw.so (BuildId: f848161ee2b682c8eb16641ba77ff14b)
#01 pc 0x554d8 libandroidfw.so (BuildId: f848161ee2b682c8eb16641ba77ff14b)
#02 pc 0x45000 libandroidfw.so (BuildId: f848161ee2b682c8eb16641ba77ff14b)
#03 pc 0x15fcf4 libandroid_runtime.so (BuildId: 8db80d173d13e5f0a5b12b849652c9aa)
#04 pc 0x728ebfac

I am not entirely sure if this is React Native related or another SDK. To help people narrow it down, can people who observe this crash in production share their common libraries?

We are using:

  • react-native 0.76.7
  • Firebase (analytics, crashlytics etc)
  • react-native-google-mobile-ads

Proguard is enabled.

@jaswant0605
Copy link

jaswant0605 commented Feb 8, 2025

Found a workaround.

Rename your android folder to something like android_old (Don’t delete it as you’ll need so migrate resources later on)

Now do
yarn add react-native-eject

Now
npx react-native eject

This will create a fresh android folder

Migrate your configurations from the android_old if required

Build the aab from the newly created android folder.

Push app to the play store and it won’t crash.

Still don’t know what the issue is but this seem to have fixed it for now.

One thing to note is that I was using react-native-keychain but I also removed it. Don't know if that was the reason.

@IgorVanian
Copy link

We have this problem too since yesterday, after a simple update. This might be related as it describes the same situation:
https://support.google.com/googleplay/android-developer/thread/323580584/app-update-via-bundle-causing-the-device-to-crash-bootloop-probably-sigsegv?hl=en

@esbenvb
Copy link
Contributor

esbenvb commented Feb 9, 2025

It seems to have been a problem with Google Play's signing...

I released an app update to play store on on feb 6th, which crashed on Android 12 devices.

It also crashed when downloaded from Firebase App Distribution as AAB. But worked well as APK.

Even building from older commits that has worked before, gave me the same issue.

Today, feb 9th, I tried to upload the same build again to Firebase App Distribution as AAB, and now it works on Android 12 devices.

Apparently, they have fixed the issue, but the apps that were uploaded when the issue was present, are still affected until you upload a new build.

Where can we expect to read a statement from google about this?

@IgorVanian
Copy link

Can confirm, the same build reuploaded yesterday to Play Store didn't crash.

@cortinico
Copy link
Contributor

Can confirm, the same build reuploaded yesterday to Play Store didn't crash.

Great so can we close this?

@octobus55
Copy link

I can also confirm, previously uploaded problematic builds works right now.

@cortinico cortinico added the Resolution: Answered When the issue is resolved with a simple answer label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications. Resolution: Answered When the issue is resolved with a simple answer Type: Unsupported Version Issues reported to a version of React Native that is no longer supported
Projects
None yet
Development

No branches or pull requests

9 participants