Skip to content

Error: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, props, _owner, _store}) #553

@TesloCosmin

Description

@TesloCosmin

Describe the bug
I'm following the example on Build Expo apps for TV to quickly start an Android TV app, and the app throws this error at start:

Android Bundled 4604ms node_modules/expo-router/entry.js (1806 modules)
 (NOBRIDGE) ERROR  Warning: Error: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, props, _owner, _store}). If you meant to render a collection of children, use an array instead.

This error is located at:
    in App (created by ErrorOverlay)
    in ErrorToastContainer (created by ErrorOverlay)
    in ErrorOverlay (created by withDevTools(ErrorOverlay))
    in withDevTools(ErrorOverlay)
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent)
 (NOBRIDGE) ERROR  Warning: Error: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, props, _owner, _store}). If you meant to render a collection of children, use an array instead.

This error is located at:
    in App (created by ErrorOverlay)
    in ErrorToastContainer (created by ErrorOverlay)
    in ErrorOverlay (created by withDevTools(ErrorOverlay))
    in withDevTools(ErrorOverlay)
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in main(RootComponent)

To Reproduce
Steps to reproduce the behavior:

  1. Go to the folder of your choice
  2. Run npx create-expo-app MyTVProject -e with-router-tv
  3. Run cd MyTVProject
  4. Run npm run android

Expected behavior
The app is to start successfully.

Screenshots

Image

Image

Desktop (please complete the following information):

  • OS: macOS Sequoia 15.3.2
  • Chip: M3 Pro
  • Android Studio: Meerkat | 2024.3.1
  • Android 15.0
  • Android API 36

Smartphone (please complete the following information):

  • Device: Television (4K) - emulated
  avd.ini.displayname              Television (4K)
  avd.ini.encoding                 UTF-8
  AvdId                            Television_4K
  disk.dataPartition.size          6442450944
  fastboot.chosenSnapshotFile      
  fastboot.forceChosenSnapshotBoot no
  fastboot.forceColdBoot           no
  fastboot.forceFastBoot           yes
  hw.accelerometer                 no
  hw.arc                           false
  hw.audioInput                    yes
  hw.battery                       no
  hw.camera.back                   none
  hw.camera.front                  emulated
  hw.cpu.ncore                     4
  hw.device.hash2                  MD5:b2fbeaca3635b06b0113eb891dbb6a8d
  hw.device.manufacturer           Google
  hw.device.name                   tv_4k
  hw.dPad                          yes
  hw.gps                           no
  hw.gpu.enabled                   yes
  hw.gpu.mode                      auto
  hw.gyroscope                     no
  hw.initialOrientation            landscape
  hw.keyboard                      yes
  hw.keyboard.lid                  yes
  hw.lcd.density                   640
  hw.lcd.height                    2160
  hw.lcd.width                     3840
  hw.mainKeys                      yes
  hw.ramSize                       2048
  hw.sdCard                        yes
  hw.sensors.light                 no
  hw.sensors.magnetic_field        no
  hw.sensors.orientation           no
  hw.sensors.pressure              no
  hw.sensors.proximity             no
  hw.trackBall                     no
  image.androidVersion.api         34
  image.sysdir.1                   system-images/android-34/android-tv/arm64-v8a/
  PlayStore.enabled                false
  runtime.network.latency          none
  runtime.network.speed            full
  showDeviceFrame                  yes
  skin.dynamic                     yes
  tag.display                      Android TV
  tag.displaynames                 Android TV
  tag.id                           android-tv
  tag.ids                          android-tv
  vm.heapSize                      768

package.json

{
  "name": "mytvproject",
  "main": "expo-router/entry",
  "version": "1.0.0",
  "scripts": {
    "start": "EXPO_TV=1 expo start",
    "android": "EXPO_TV=1 expo run:android",
    "ios": "EXPO_TV=1 expo run:ios",
    "web": "expo start --web",
    "reset-project": "./scripts/reset-project.js",
    "test": "jest --watchAll",
    "lint": "expo lint",
    "prebuild": "EXPO_TV=1 expo prebuild --clean"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^14.0.2",
    "expo": "~52.0.37",
    "expo-build-properties": "~0.13.2",
    "expo-constants": "~17.0.7",
    "expo-font": "~13.0.4",
    "expo-linking": "~7.0.5",
    "expo-router": "~4.0.17",
    "expo-splash-screen": "~0.29.22",
    "expo-status-bar": "~2.0.1",
    "expo-system-ui": "~4.0.8",
    "expo-web-browser": "~14.0.1",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-native": "npm:[email protected]",
    "react-native-gesture-handler": "~2.24.0",
    "react-native-reanimated": "~3.16.7",
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "~4.4.0",
    "react-native-web": "~0.19.13"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@react-native-tvos/config-tv": "^0.1.1",
    "@types/jest": "^29.5.14",
    "@types/react": "~18.3.12",
    "@types/react-test-renderer": "^18.3.1",
    "jest": "~29.7.0",
    "jest-expo": "~52.0.5",
    "react-test-renderer": "^18.3.1",
    "typescript": "~5.3.3"
  },
  "expo": {
    "install": {
      "exclude": [
        "react-native"
      ]
    }
  },
  "private": true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions