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

Custom port on ios does not work after react-native upgrade to 0.73 #2228

Closed
grgmo opened this issue Dec 21, 2023 · 8 comments · Fixed by #2245
Closed

Custom port on ios does not work after react-native upgrade to 0.73 #2228

grgmo opened this issue Dec 21, 2023 · 8 comments · Fixed by #2245
Assignees

Comments

@grgmo
Copy link

grgmo commented Dec 21, 2023

Environment

System:
  OS: macOS 13.6.3
  CPU: (10) arm64 Apple M1 Pro
  Memory: 93.98 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.14.2
    path: ~/.nvm/versions/node/v18.14.2/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 9.5.0
    path: ~/.nvm/versions/node/v18.14.2/bin/npm
  Watchman:
    version: 2023.02.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.12.1
    path: /Users/gurung/.asdf/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - watchOS 10.2
  Android SDK:
    API Levels:
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
    Build Tools:
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-30 | Google APIs ARM 64 v8a
      - android-31 | Google APIs ARM 64 v8a
      - android-31 | Google Play ARM 64 v8a
      - android-32 | Google APIs ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11076708
  Xcode:
    version: 15.1/15C65
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /usr/bin/javac
  Ruby:
    version: 3.0.3
    path: /Users/gurung/.asdf/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.1
    wanted: 0.73.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Description

Running react-native run-ios --port=8888 does not work on ios anymore on react-native 0.73. Android seems to be working fine.

It does start the correct port on metro but somehow is not communicated properly on native ios.

Testing on 0.72 works fine on both platforms.

Reproducible Demo

https://github.com/grgmo/react-native-custom-port-bug-repro

@szymonrybczak szymonrybczak self-assigned this Dec 22, 2023
@abhinav-official
Copy link

+1

@tm00-git
Copy link

tm00-git commented Jan 5, 2024

same issue for me

@tm00-git
Copy link

tm00-git commented Jan 8, 2024

Still same issue in React Native 0.73.2

@szymonrybczak
Copy link
Collaborator

@tm00-git, this fix will land in 0.73.3

@tm00-git
Copy link

tm00-git commented Feb 1, 2024

@tm00-git, this fix will land in 0.73.3

Still same issue in 0.73.3

@liamjones
Copy link
Contributor

liamjones commented Feb 2, 2024

Still same issue in 0.73.3

0.73.3 has CLI version 12.3.2 in it: https://github.com/facebook/react-native/blob/v0.73.3/packages/react-native/package.json#L96

The fix needs 13.3.0 or higher: 453fe0c

If you need it right now, it's a tiny one-line change - you could use patch-package to apply the patch to your local project if you can't wait. Just make sure you edit the compiled JS, not the TS source file (e.g. node_modules/@react-native-community/cli-platform-ios/build/commands/buildIOS/buildProject.js)

@szymonrybczak
Copy link
Collaborator

Thanks @liamjones for your explanation 🙏 @tm00-git, somehow we forgot to backport fix to relevant branch. Sorry for trouble. I'll make sure that this will land in next RN patch, for now you can follow steps from Liam.

@azamdev00
Copy link

I m not able to call my deployed API in "react-native": "0.73.6", i can access API through IP address but can not with my sub-domain. API is working in ios but not in android. The issue is just in android. If i run api on my localhost then it is also working fine. But the problem is in android with deploy api subdomain. Please help me ASAP, it is urgent.
@liamjones @szymonrybczak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants