Skip to content
New issue

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

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

Already on GitHub? # to your account

ANR Due to StatusBar #48375

Closed
Endagorion-Peter opened this issue Dec 23, 2024 · 3 comments
Closed

ANR Due to StatusBar #48375

Endagorion-Peter opened this issue Dec 23, 2024 · 3 comments
Labels
Component: StatusBar Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Type: Too Old Version

Comments

@Endagorion-Peter
Copy link

Description

We are getting ANR while using StatusBar from react-native. We are using it in our App.tsx like following:

<>
  <StatusBar barStyle='dark-content' hidden />
  <ErrorBoundary>
    <GestureHandlerRootView style={styles.flex1}>
      <PortalProvider>
        <SafeAreaView style={styles.safeAreaView} edges={['right', 'left', 'top']}>
          <View style={styles.background}>
            <Provider store={store}>
              <TooltipLib.TooltipManager>
                <View style={styles.background}>
                  <NavigationContainer
                    ref={navigationGlobalRef}
                    theme={DarkTheme}
                    onStateChange={logActiveRouteName}
                  >
                    <AppNavigationContainer />
                  </NavigationContainer>
                  <PortalHost name='onboardingNudge' />
                  <GeneralOptions />
                  <PortalHost name='modals' />
                  <StartupTime setAppStartupTime={setAppStartupTime} />
                </View>
              </TooltipLib.TooltipManager>
              <PerformanceStats />
              <LoggerPersistence />
            </Provider>
          </View>
        </SafeAreaView>
      </PortalProvider>
    </GestureHandlerRootView>
  </ErrorBoundary>
</>

Stack-Trace:

"main" tid=1 Native

#00 pc 0x000000000005dd10 /apex/com.android.runtime/lib/bionic/libc.so (syscall+28)
#1 pc 0x00000000002106af /apex/com.android.art/lib/libart.so (art::ConditionVariable::WaitHoldingLocks+86)
#2 pc 0x000000000059d64d /apex/com.android.art/lib/libart.so (artJniMethodEnd+312)
#3 pc 0x00000000000a3d89 /apex/com.android.art/lib/libart.so (art_jni_method_end+8)
at android.os.BinderProxy.transactNative (Native method)
at android.os.BinderProxy.transact (BinderProxy.java:599)
at android.app.IActivityClientController$Stub$Proxy.setTaskDescription (IActivityClientController.java:2078)
at android.app.ActivityClient.setTaskDescription (ActivityClient.java:432)
at android.app.Activity.setTaskDescription (Activity.java:7531)
at android.app.Activity$1.updateStatusBarColor (Activity.java:1092)
at com.android.internal.policy.PhoneWindow.setStatusBarColor (PhoneWindow.java:3874)
at com.facebook.react.modules.statusbar.StatusBarModule$1.runGuarded (StatusBarModule.java:108)
at com.facebook.react.bridge.GuardedRunnable.run (GuardedRunnable.java:30)
at android.os.Handler.handleCallback (Handler.java:958)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loopOnce (Looper.java:205)
at android.os.Looper.loop (Looper.java:294)
at android.app.ActivityThread.main (ActivityThread.java:8492)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:640)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1026)

Looks like ANR is produced while setting color of status-bar.

Steps to reproduce

NA

React Native Version

0.71.13

Affected Platforms

Runtime - Android

Output of npx react-native info

NA

Stacktrace or Logs

NA

Reproducer

https://github.com/Endagorion-Peter

Screenshots and Videos

NA

@react-native-bot
Copy link
Collaborator

Caution

Too old version: It looks like your issue or the example you provided uses a Too Old 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: Repro This issue could be improved with a clear list of steps to reproduce the issue. Component: StatusBar labels Dec 23, 2024
@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

Caution

Too old version: It looks like your issue or the example you provided uses a Too Old 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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Component: StatusBar Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Type: Too Old Version
Projects
None yet
Development

No branches or pull requests

2 participants