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

RN V0.75.4 New Architecture | Unable to load the bundle from custom location #48101

Closed
sandeep36butte opened this issue Dec 4, 2024 · 4 comments
Labels
📦Bundler Needs: Triage 🔍 Resolution: Answered When the issue is resolved with a simple answer

Comments

@sandeep36butte
Copy link

Description

I am trying to load the jsBundle from the custom location by overriding the getJSBundle method from the ReactNativeHost.
But seems like this overriden method never get called on the initial time.
Where as others overrided methods seems to be get called fine confirmed from logs. Attched the stack trace as well for validations.

FYI: This works fine with the upgrade v0.76.4 but was just checking why it's not working for this working since upgrading the Version is presently i want to avoid since it required the minsdk to 24 which will reduce my 10% of devices.

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.75.4

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: 118.36 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.11.25.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.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": Not Found
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.75.4
    wanted: 0.75.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

2024-12-05 00:03:34.574 19183-19183 ReactNative             com.example                          D  Loading from new Architecture
2024-12-05 00:03:34.747 19183-19183 ReactNative             com.example                          D  ReactDelegate
2024-12-05 00:03:34.747 19183-19183 ReactNative             com.example                          D  calling LaunchActions
2024-12-05 00:03:34.747 19183-19183 ReactNative             com.example                          D  GetPackages
2024-12-05 00:03:34.762 19183-19183 ReactNative             com.example                          D  GetDebug
2024-12-05 00:03:35.127 19183-19289 unknown:ReactNative     com.example                          W  The packager does not seem to be running as we got an IOException requesting its status: Failed to connect to /10.0.2.2:8081
2024-12-05 00:03:35.181   560-625   CoreBackPreview         system_server                        D  Window{5a55ff u0 com.example/com.example.android.activities.ReactNativeActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@a02c215, mPriority=0}
2024-12-05 00:03:35.388   560-576   ActivityTaskManager     system_server                        I  Displayed com.example/.android.activities.ReactNativeActivity: +2s28ms
2024-12-05 00:03:35.423 19183-19183 unknown:ReactNative     com.example                          W  Packager connection already open, nooping.
2024-12-05 00:03:35.571 19183-19296 ReactNativeJS           com.example                          I  Bridgeless mode is enabled
2024-12-05 00:03:35.573 19183-19296 ReactNativeJS           com.example                          I  Running "ReactNativeBrownFieldApp"
2024-12-05 00:03:35.615 19183-19296 ReactNativeJS           com.example                          I  'Is New Architecture Enabled:', true
2024-12-05 00:03:35.615 19183-19296 ReactNativeJS           com.example                          I  nativemodules: {}
2024-12-05 00:03:35.676 19183-19296 ReactNativeJS           com.example                          I  devices:Googlesdk_gphone64_arm64

Reproducer

https://github.com/sandeep36butte/RNBrownFeldApp

Screenshots and Videos

Uploading Screenshot 2024-12-05 at 12.13.33 AM.png…

@cortinico
Copy link
Contributor

I believe this is the correct fix:

which is included in 0.76 and 0.77

You can request a pick for 0.75 over here:
https://github.com/reactwg/react-native-releases/blob/main/docs/faq.md#what-is-a-pick-request

@cortinico cortinico closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2024
@cortinico cortinico added the Resolution: Answered When the issue is resolved with a simple answer label Dec 4, 2024
@sandeep36butte
Copy link
Author

@cortinico
Thanks this will work.I have request a pick for this in v0.74.

reactwg/react-native-releases#661

Would be very helpful if this get picked and updated in the v0.75 since i don't want to update the minsdk version to 24 now as my system is not ready for it still and i'll lose support on 10% of the devices where i have a 10% of traffic still.

@cortinico
Copy link
Contributor

Yeah this is quite straightforward. Will be included in the next 0.75 point release

@sandeep36butte
Copy link
Author

@cortinico
Is there any workaround for this until this pick request is done & deployment.
Something similar to creating a patch file and linking the dependency from local.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦Bundler Needs: Triage 🔍 Resolution: Answered When the issue is resolved with a simple answer
Projects
None yet
Development

No branches or pull requests

3 participants