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

iOS - New Architecture (Fabric) doesn't work - RN 0.68.1 #33668

Closed
brunoducattii opened this issue Apr 20, 2022 · 4 comments
Closed

iOS - New Architecture (Fabric) doesn't work - RN 0.68.1 #33668

brunoducattii opened this issue Apr 20, 2022 · 4 comments
Labels
Platform: iOS iOS applications. Resolution: Answered When the issue is resolved with a simple answer Tech: Fabric Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@brunoducattii
Copy link

brunoducattii commented Apr 20, 2022

Description

Getting this log just after opening the application running 0.68.1 with New Architecture true on iOS:

ERROR Warning: Warning: setNativeProps is not currently supported in Fabric
  in Card (at CardContainer.tsx:219)
  in CardContainer (at CardStack.tsx:661)
  in RNSScreen (at createAnimatedComponent.js:211)
  in AnimatedComponent (at createAnimatedComponent.js:264)
  in AnimatedComponentWrapper (at src/index.native.tsx:281)
  in MaybeFreeze (at src/index.native.tsx:280)
  in Screen (at Screens.tsx:37)
  in MaybeScreen (at CardStack.tsx:654)
  in RNSScreenContainer (at src/index.native.tsx:351)
  in ScreenContainer (at Screens.tsx:20)
  in MaybeScreenContainer (at CardStack.tsx:566)
  in RCTView (at View.js:32)
  in View (at Background.tsx:13)
  in Background (at CardStack.tsx:564)
  in CardStack (at StackView.tsx:437)
  in RCTView (at View.js:32)
  in View (at SafeAreaProviderCompat.tsx:42)
  in SafeAreaProviderCompat (at StackView.tsx:430)
  in RCTView (at View.js:32)
  in View (at GestureHandlerRootView.tsx:17)
  in GestureHandlerRootView (at StackView.tsx:429)
  in StackView (at createStackNavigator.tsx:121)
  in Unknown (at createStackNavigator.tsx:120)
  in StackNavigator (at bottom.tsx:20)
  in HomeRoute (at SceneView.tsx:132)
  in StaticContainer
  in EnsureSingleNavigator (at SceneView.tsx:124)
  in SceneView (at useDescriptors.tsx:217)
  in RCTView (at View.js:32)
  in View (at Screen.tsx:63)
  in RCTView (at View.js:32)
  in View (at Background.tsx:13)
  in Background (at Screen.tsx:58)
  in Screen (at BottomTabView.tsx:130)
  in RNSScreen (at createAnimatedComponent.js:211)
  in AnimatedComponent (at createAnimatedComponent.js:264)
  in AnimatedComponentWrapper (at src/index.native.tsx:281)
  in MaybeFreeze (at src/index.native.tsx:280)
  in Screen (at ScreenFallback.tsx:38)
  in MaybeScreen (at BottomTabView.tsx:123)
  in RNSScreenNavigationContainer (at src/index.native.tsx:349)
  in ScreenContainer (at ScreenFallback.tsx:29)
  in MaybeScreenContainer (at BottomTabView.tsx:93)
  in RCTView (at View.js:32)
  in View (at SafeAreaProviderCompat.tsx:42)
  in SafeAreaProviderCompat (at BottomTabView.tsx:92)
  in BottomTabView (at createBottomTabNavigator.tsx:118)
  in Unknown (at createBottomTabNavigator.tsx:117)
  in BottomTabNavigator (at bottom.tsx:75)
  in Bottom (at routes/index.tsx:35)
  in RoutesAuth (at routes/index.tsx:273)
  in EnsureSingleNavigator (at BaseNavigationContainer.tsx:430)
  in BaseNavigationContainer (at NavigationContainer.tsx:132)
  in ThemeProvider (at NavigationContainer.tsx:131)
  in NavigationContainerInner (at routes/index.tsx:259)
  in RNCSafeAreaProvider (at SafeAreaContext.tsx:87)
  in SafeAreaProvider (at routes/index.tsx:258)
  in Navigation (at app/index.tsx:102)
  in RNCSafeAreaProvider (at SafeAreaContext.tsx:87)
  in SafeAreaProvider (at app/index.tsx:101)
  in ApolloProvider (at app/index.tsx:100)
  in ThemeProvider (at app/index.tsx:99)
  in App (at sdk.js:98)
  in ReactNativeProfiler (at sdk.js:97)
  in RCTView (at View.js:32)
  in View (at touchevents.js:23)
  in __Sentry.TouchEventBoundary (at sdk.js:96)
  in RootApp (at CodePush.js:585)
  in CodePushComponent (at app/index.js:40)
  in MyApp (at renderApplication.js:50)
  in RCTView (at View.js:32)
  in View (at AppContainer.js:92)
  in RCTView (at View.js:32)
  in View (at AppContainer.js:119)
  in AppContainer (at renderApplication.js:43)
  in MyAPpp(RootComponent) (at renderApplication.js:60).

Version

0.68.1

Output of npx react-native info

System:
OS: macOS 12.3.1
CPU: (8) x64 Apple M1
Memory: 53.94 MB / 16.00 GB
Shell: 5.8 - /bin/zsh

Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 1.22.18 - ~/Desktop/MyApp/app/node_modules/.bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
Watchman: Not Found

Managers:
CocoaPods: 1.11.3 - /Users/brunoducatti/.rvm/rubies/ruby-2.7.4/bin/pod

SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5

Android SDK: Not Found

IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8309675
Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild

Languages:
Java: 11.0.14 - /usr/bin/javac

npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.1 => 0.68.1
react-native-macos: Not Found

npmGlobalPackages:
react-native: Not Found

Steps to reproduce

  • Upgrade from 0.68 to 0.68.1.

  • Run RCT_NEW_ARCH_ENABLED=1 pod install on /ios.

  • Open the App.

Snack, code example, screenshot, or link to a repository

Package.json:

"name": "MyApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "backgroundTests": "jest --verbose ./src/services/background",
    "postinstall": "patch-package"
  },
  "dependencies": {
    "@apollo/client": "^3.5.10",
    "@MyApp/react-native-selectable-text": "^0.0.14",
    "@react-native-async-storage/async-storage": "^1.16.1",
    "@react-native-community/art": "^1.2.0",
    "@react-native-community/clipboard": "^1.5.1",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-community/netinfo": "^6.0.0",
    "@react-native-community/slider": "^3.0.3",
    "@react-native-firebase/analytics": "^14.7.0",
    "@react-native-firebase/app": "^14.7.0",
    "@react-native-firebase/crashlytics": "^14.7.0",
    "@react-native-firebase/in-app-messaging": "^14.7.0",
    "@react-native-firebase/messaging": "^14.7.0",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/native": "^6.0.8",
    "@react-navigation/stack": "^6.0.11",
    "@sentry/cli": "^1.72.1",
    "@sentry/react-native": "^3.2.10",
    "@types/react-native-vector-icons": "^6.4.10",
    "@types/react-navigation": "^3.4.0",
    "add": "^2.0.6",
    "formik": "^2.2.6",
    "graphql": "^16.3.0",
    "graphql-tag": "^2.11.0",
    "hermes-engine": "^0.11.0",
    "lottie-ios": "^3.2.3",
    "lottie-react-native": "^5.0.1",
    "npm-check-updates": "^11.3.0",
    "ramda": "^0.27.1",
    "react": "17.0.2",
    "react-native": "0.68.1",
    "react-native-animatable": "^1.3.3",
    "react-native-background-downloader": "^2.3.4",
    "react-native-background-fetch": "^4.0.4",
    "react-native-background-timer": "^2.4.1",
    "react-native-branch": "^5.0.1",
    "react-native-code-push": "^7.0.4",
    "react-native-codegen": "^0.0.14",
    "react-native-collapsible": "^1.5.3",
    "react-native-device-info": "^8.0.5",
    "react-native-flash-message": "^0.1.23",
    "react-native-fs": "^2.16.6",
    "react-native-gesture-handler": "^2.4.0",
    "react-native-gradle-plugin": "^0.0.6",
    "react-native-hyperlink": "0.0.19",
    "react-native-iap": "^8.0.4",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-open-notification": "^0.1.4",
    "react-native-progress": "^5.0.0",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "^4.2.4",
    "react-native-safe-area-view": "^1.1.1",
    "react-native-screens": "^3.13.1",
    "react-native-share": "^7.3.9",
    "react-native-size-matters": "^0.4.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-sound": "^0.11.1",
    "react-native-splash-screen": "^3.2.0",
    "react-native-status-bar-height": "^2.6.0",
    "react-native-super-grid": "^4.2.0",
    "react-native-svg": "^12.1.0",
    "react-native-system-setting": "^1.7.6",
    "react-native-tts": "^4.1.0",
    "react-native-vector-icons": "^9.1.0",
    "react-native-webview": "11.3.1",
    "realm": "10.20.0-beta.5",
    "rn-fetch-blob": "^0.12.0",
    "styled-components": "^5.2.1",
    "text-encoding": "^0.7.0",
    "use-http": "^1.0.18",
    "yarn": "^1.22.10",
    "yup": "^0.32.9",
    "zustand": "^3.3.3"
  },
  "devDependencies": {
    "@babel/core": "^7.13.10",
    "@babel/plugin-proposal-class-properties": "^7.13.0",
    "@babel/plugin-transform-flow-strip-types": "^7.13.0",
    "@babel/runtime": "^7.13.10",
    "@react-native-community/cli-debugger-ui": "^5.0.1",
    "@react-native-community/eslint-config": "^2.0.0",
    "@types/jest": "^26.0.20",
    "@types/ramda": "^0.27.39",
    "@types/react": "^17.0.17",
    "@types/react-native": "^0.63.52",
    "@types/react-native-background-downloader": "^2.3.3",
    "@types/react-native-background-timer": "^2.0.0",
    "@types/react-native-dotenv": "^0.2.0",
    "@types/react-native-share": "^3.3.1",
    "@types/react-native-snap-carousel": "^3.8.2",
    "@types/react-test-renderer": "17.0.1",
    "@types/styled-components": "^5.1.15",
    "@types/styled-components-react-native": "^5.1.1",
    "@types/text-encoding": "^0.0.35",
    "@types/yup": "^0.29.11",
    "@typescript-eslint/eslint-plugin": "^4.18.0",
    "@typescript-eslint/parser": "^4.18.0",
    "babel-jest": "^26.6.3",
    "babel-plugin-module-resolver": "^4.1.0",
    "eslint": "^7.32.0",
    "eslint-plugin-prettier": "^3.3.1",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.67.0",
    "patch-package": "^6.4.7",
    "postinstall-postinstall": "^2.1.0",
    "prettier": "^2.2.1",
    "react-native-dotenv": "^2.5.3",
    "react-native-flipper": "^0.124.0",
    "react-native-svg-transformer": "^0.14.3",
    "react-test-renderer": "17.0.2",
    "typescript": "^4.2.3"
  },
  "jest": {
    "preset": "react-native",
    "moduleNameMapper": {
      "^services(.*)$": "<rootDir>/src/services$1"
    },
    "transform": {
      "^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
    },
    "testPathIgnorePatterns": [
      "/node_modules/",
      "./dist"
    ],
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }
}```
@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Apr 20, 2022
@brunoducattii brunoducattii changed the title IOS - New Architecture (Fabric) doesn't work - RN 0.68.1 iOS - New Architecture (Fabric) doesn't work - RN 0.68.1 Apr 20, 2022
@brunoducattii
Copy link
Author

No one any suggestion?

@cortinico cortinico added the Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) label May 4, 2022
@cortinico
Copy link
Contributor

The error is self-explanatory:

ERROR Warning: Warning: setNativeProps is not currently supported in Fabric

You can't use setNativeProps on the New Arch. Is explained here https://reactnative.dev/docs/next/new-architecture-library-intro#migrating-off-setnativeprops

@cipolleschi cipolleschi added Tech: Fabric Resolution: Answered When the issue is resolved with a simple answer labels May 19, 2022
@sanjayjhaa
Copy link

How to identify where setNativeProps are getting used? as i was trying to move old project to Fabric but it throws same error and i am not sure what changes i need to do so that fabric works.
please suggest

@sanjayjhaa
Copy link

I am using Redux, Navigationcontainer etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS iOS applications. Resolution: Answered When the issue is resolved with a simple answer Tech: Fabric Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

5 participants