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

0.73.1 Android flash error message:An error occurred while executing doInBackground() #43542

Closed
shihao905 opened this issue Mar 19, 2024 · 3 comments
Labels
Platform: Android Android applications. Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library

Comments

@shihao905
Copy link

Description

Run time flash back, js no error message

Steps to reproduce

yarn android

React Native Version

0.73.1

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 14.2.1
  CPU: (8) x64 Apple M1 Pro
  Memory: 19.81 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.19.0
    path: ~/.nvm/versions/node/v18.19.0/bin/node
  Yarn:
    version: 1.22.21
    path: ~/.nvm/versions/node/v18.19.0/bin/yarn
  npm:
    version: 10.2.3
    path: ~/.nvm/versions/node/v18.19.0/bin/npm
  Watchman:
    version: 2023.12.04.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.11.3
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - watchOS 10.2
  Android SDK:
    Android NDK: 22.1.7171670
IDEs:
  Android Studio: 2021.1 AI-211.7628.21.2111.8193401
  Xcode:
    version: 15.1/15C65
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 18.0.1.1
    path: /usr/bin/javac
  Ruby:
    version: 3.1.4
    path: /usr/local/opt/ruby@3.1/bin/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

03-19 11:41:10.686 E/OpenGLRenderer(  751): Unable to match the desired swap behavior.
03-19 11:41:11.380 E/ingtian.pro.app(13341): Attempt to load writable dex file: /data/user/0/io.ht.qingtian.pro.app/files/libs/tdata_IWV990.jar
03-19 11:41:11.418 E/ingtian.pro.app(13341): Attempt to load writable dex file: /data/user/0/io.ht.qingtian.pro.app/files/libs/tdata_MNg402.jar
03-19 11:41:11.551 E/OpenGLRenderer(13341): Unable to match the desired swap behavior.
03-19 11:41:11.605 E/ingtian.pro.app(13341): Invalid resource ID 0x00000000.
03-19 11:41:11.617 E/OpenGLRenderer(13341): Unable to match the desired swap behavior.
03-19 11:41:11.629 E/AndroidRuntime(13341): FATAL EXCEPTION: AsyncTask #1
03-19 11:41:11.629 E/AndroidRuntime(13341): Process: io.ht.qingtian.pro.app, PID: 13341
03-19 11:41:11.629 E/AndroidRuntime(13341): java.lang.RuntimeException: An error occurred while executing doInBackground()
03-19 11:41:11.629 E/AndroidRuntime(13341):     at android.os.AsyncTask$4.done(AsyncTask.java:415)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at java.util.concurrent.FutureTask.run(FutureTask.java:269)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at java.lang.Thread.run(Thread.java:1012)
03-19 11:41:11.629 E/AndroidRuntime(13341): Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process io.ht.qingtian.pro.app. Make sure to call FirebaseApp.initializeApp(Context) first.
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.google.firebase.FirebaseApp.getInstance(FirebaseApp.java:183)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.google.firebase.messaging.FirebaseMessaging.getInstance(com.google.firebase:firebase-messaging@@21.1.0:1)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.wix.reactnativenotifications.fcm.FcmToken.refreshToken(FcmToken.java:75)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.wix.reactnativenotifications.fcm.FcmToken.onAppReady(FcmToken.java:65)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.wix.reactnativenotifications.fcm.FcmInstanceIdRefreshHandlerService.onHandleWork(FcmInstanceIdRefreshHandlerService.java:26)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:396)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:387)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at android.os.AsyncTask$3.call(AsyncTask.java:394)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at java.util.concurrent.FutureTask.run(FutureTask.java:264)
03-19 11:41:11.629 E/AndroidRuntime(13341):     ... 3 more
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007): Failed to fetch suggestions from AppSearch, fallback to AGA
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007): java.util.concurrent.CompletionException: java.util.NoSuchElementException: No value present
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:308)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:323)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:684)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:486)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2138)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at com.google.android.apps.nexuslauncher.allapps.H0.onResult(Unknown Source:59)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at android.app.appsearch.SearchSessionUtil$1.lambda$onResult$0(SearchSessionUtil.java:129)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at android.app.appsearch.SearchSessionUtil$1.$r8$lambda$_nlk9WiPjSfaAsqKYmp0aPvSRC0(SearchSessionUtil.java:1)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at android.app.appsearch.SearchSessionUtil$1$$ExternalSyntheticLambda0.run(R8$$SyntheticClass:13)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at android.os.Handler.handleCallback(Handler.java:958)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at android.os.Handler.dispatchMessage(Handler.java:99)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at android.os.Looper.loopOnce(Looper.java:205)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at android.os.Looper.loop(Looper.java:294)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at android.os.HandlerThread.run(HandlerThread.java:67)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007): Caused by: java.util.NoSuchElementException: No value present
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at java.util.Optional.get(Optional.java:144)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   at com.google.android.apps.nexuslauncher.allapps.H0.onResult(Unknown Source:16)
03-19 11:41:11.710 E/OneSearchSuggestProvider( 1007):   ... 8 more
03-19 11:41:11.721 E/OpenGLRenderer( 1650): Unable to match the desired swap behavior.
03-19 11:41:11.728 E/OpenGLRenderer( 1007): Unable to match the desired swap behavior.
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007): Unable to get suggestions from AGA
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007): io.grpc.StatusRuntimeException: UNKNOWN
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007):   at S2.d.a(Unknown Source:68)
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007):   at io.grpc.internal.p.b(Unknown Source:32)
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007):   at io.grpc.internal.p.a(Unknown Source:14)
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007):   at io.grpc.internal.C.run(Unknown Source:6)
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007):   at io.grpc.internal.y2.run(Unknown Source:18)
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
03-19 11:41:11.933 E/OneSearchSuggestProvider( 1007):   at java.lang.Thread.run(Thread.java:1012)
03-19 11:41:12.122 E/BpTransactionCompletedListener(  393): Failed to transact (-32)

Reproducer

null

Screenshots and Videos

No response

Copy link

⚠️ 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.73.6. 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.

@github-actions github-actions bot added Platform: Android Android applications. Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Mar 19, 2024
Copy link

⚠️ 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.

@shihao905 shihao905 changed the title Android flash error message:An error occurred while executing doInBackground() 0.73.1 Android flash error message:An error occurred while executing doInBackground() Mar 19, 2024
@cortinico
Copy link
Contributor

According to the stacktrace:

03-19 11:41:11.629 E/AndroidRuntime(13341): Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process io.ht.qingtian.pro.app. Make sure to call FirebaseApp.initializeApp(Context) first.
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.google.firebase.FirebaseApp.getInstance(FirebaseApp.java:183)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.google.firebase.messaging.FirebaseMessaging.getInstance(com.google.firebase:firebase-messaging@@21.1.0:1)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.wix.reactnativenotifications.fcm.FcmToken.refreshToken(FcmToken.java:75)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.wix.reactnativenotifications.fcm.FcmToken.onAppReady(FcmToken.java:65)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at com.wix.reactnativenotifications.fcm.FcmInstanceIdRefreshHandlerService.onHandleWork(FcmInstanceIdRefreshHandlerService.java:26)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:396)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:387)
03-19 11:41:11.629 E/AndroidRuntime(13341):     at android.os.AsyncTask$3.call(AsyncTask.java:394)

it seems like you're not initializing firebase correctly.

Please report your issue here:
https://github.com/invertase/react-native-firebase

@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: Triage 🔍 Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android Android applications. Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library
Projects
None yet
Development

No branches or pull requests

2 participants