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 when switching tabs after updating to Expo 52 (old arch) #2512

Closed
wongk opened this issue Nov 18, 2024 · 6 comments
Closed

Crash when switching tabs after updating to Expo 52 (old arch) #2512

wongk opened this issue Nov 18, 2024 · 6 comments
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Platform: Web This issue is specific to web

Comments

@wongk
Copy link

wongk commented Nov 18, 2024

Description

I have a Tamagui app that uses Expo and React Native for our native apps. Today I updated to the latest Expo 52, and updated all of our dependencies. The app runs, but any time I switch tabs (on both iOS and Android), the app crashes. The stack trace points to the crash coming from react-native-screens. We are using the old architecture.

 ERROR  Warning: TypeError: Cannot read property 'regular' of undefined

This error is located at:
    in SceneView (created by NativeStackView)
    in Suspender (created by Freeze)
    in Suspense (created by Freeze)
    in Freeze (created by DelayedFreeze)
    in DelayedFreeze (created by ScreenStack)
    in RNSScreenStack (created by ScreenStack)
    in Unknown (created by ScreenStack)
    in ScreenStack (created by NativeStackView)
    in RCTView (created by View)
    in View (created by SafeAreaProviderCompat)
    in SafeAreaProviderCompat (created by NativeStackView)
    in NativeStackView (created by NativeStackNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by NativeStackNavigator)
    in NativeStackNavigator
    in Unknown (created by Layout)
    in Layout
    in Unknown (created by Route(profile))
    in Suspense (created by Route(profile))
    in Route (created by Route(profile))
    in Route(profile) (created by SceneView)
    in StaticContainer
    in EnsureSingleNavigator (created by SceneView)
    in SceneView (created by Navigator)
    in NavigatorSlot (created by Slot)
    in Slot (created by AppNavigation)
    in Navigator (created by AppNavigation)
    in RCTView (created by TabsContent)
    in TabsContent
    in Unknown (created by Themed(Anonymous))
    in Theme (created by Themed(Anonymous))
    in Themed(Anonymous) (created by TabsContents)
    in TabsContents (created by BottomTabBar)...

Steps to reproduce

I don't have specific steps. Please see the stack trace in the description.

Snack or a link to a repository

I am not able to provide a reproduction

Screens version

4.1.0

React Native version

0.76.2

Platforms

Android, iOS, Web

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Platform: Web This issue is specific to web labels Nov 18, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@Odyrac
Copy link

Odyrac commented Nov 19, 2024

same here

@kkafar
Copy link
Member

kkafar commented Nov 19, 2024

Hey, they only occurrences of regular property are related to fonts.regular, which indicates that the issue is located in react-navigation/native-stack or react-navigation/bottom-tabs code. Would you be so kind to transfer the issue there (and ping me there)?

@wongk
Copy link
Author

wongk commented Nov 19, 2024

I was able to track this down and it is not a react-native-screens issue. I only assumed so due to the call stack. For anyone else experiencing this issue, ThemeProvider from react-navigation now requires the fonts property. I solved this as follows:

    <ThemeProvider
      value={{
        ...DefaultTheme,
        dark: scheme === "dark",
        colors: {
             ...
        },
      }}
    >
      {children}
    </ThemeProvider>

@wongk wongk closed this as completed Nov 19, 2024
@kkafar
Copy link
Member

kkafar commented Nov 19, 2024

Glad to hear you managed to resolve this!

@kkafar
Copy link
Member

kkafar commented Nov 19, 2024

@Odyrac was your case the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Platform: Web This issue is specific to web
Projects
None yet
Development

No branches or pull requests

3 participants