Skip to content

RN v0.76.0 | Issue with autolinking packages with Brownfield project #47406

Closed
@sandeep36butte

Description

@sandeep36butte

Description

I have upgraded the RN version of my project to latest(v0.76.0).
After the upgrade the autolinklibraries not linking any packages.
For Sample i have just added one library react-native-vision camera but the nativemodules are coming as null after upgrade when i consoled the packages list from getpackges it consist of only the single ReactNativemainpackage.

Steps to reproduce

This is the brownfield app.
Git clone the repo: https://github.com/sandeep36butte/RNBrownFeldApp
yarn start and run on android

React Native Version

0.76.0

Affected Platforms

Runtime - Android

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: macOS 14.2.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 90.14 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.0
    path: ~/.nvm/versions/node/v18.18.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v18.18.0/bin/yarn
  npm:
    version: 9.8.1
    path: ~/.nvm/versions/node/v18.18.0/bin/npm
  Watchman:
    version: 2024.09.09.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    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: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2412.12266719
  Xcode:
    version: 15.1/15C65
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.0-alpha.2
    wanted: 15.0.0-alpha.2
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.0
    wanted: 0.76.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.76.1 is now available (your project is running on v0.76.0).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.1
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.76.0&to=0.76.1
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

Stacktrace or Logs

Running "ReactNativeBrownFieldApp" with {"initialProps":{"payload":null,"initialProps":"props123","appName":"ReactNativeBrownFieldApp"},"rootTag":11}
2024-11-05 10:38:43.616 18043-18250 ReactNativeJS           com.example                          I  'Is New Architecture Enabled:', false
2024-11-05 10:38:43.616 18043-18250 ReactNativeJS           com.example                          I  nativemodules: {}
2024-11-05 10:38:43.627 18043-18250 ReactNativeJS           com.example                          E  'TypeError: Cannot read property \'getConstants\' of null, js engine: hermes', { [Component Stack] name: 'Component Stack' }
2024-11-05 10:38:43.647 18043-18250 ReactNativeJS           com.example                          W  Warning: TypeError: Cannot read property 'CameraDevices' of undefined
                                                                                                    
                                                                                                    This error is located at:
                                                                                                        in App
                                                                                                        in RCTView (created by View)
                                                                                                        in View (created by AppContainer)
                                                                                                        in RCTView (created by View)
                                                                                                        in View (created by AppContainer)
                                                                                                        in AppContainer
                                                                                                        in ReactNativeBrownFieldApp(RootComponent), js engine: hermes
2024-11-05 10:38:43.651 18043-18250 ReactNativeJS           com.example                          W  Warning: TypeError: Cannot read property 'CameraDevices' of undefined
                                                                                                    
                                                                                                    This error is located at:
                                                                                                        in App
                                                                                                        in RCTView (created by View)
                                                                                                        in View (created by AppContainer)
                                                                                                        in RCTView (created by View)
                                                                                                        in View (created by AppContainer)
                                                                                                        in AppContainer
                                                                                                        in ReactNativeBrownFieldApp(RootComponent), js engine: hermes
2024-11-05 10:38:43.713   590-850   CoreBackPreview         system_server                        D  Window{d89a94a u0 com.example/com.example.android.activities.ReactNativeActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@f24eb84, mPriority=0}

Reproducer

https://github.com/sandeep36butte/RNBrownFeldApp

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions