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

Invalid range "t-5" in string transliteration #34530

Closed
Sam-Lam-Secret-Key-Labs opened this issue Aug 30, 2022 · 8 comments
Closed

Invalid range "t-5" in string transliteration #34530

Sam-Lam-Secret-Key-Labs opened this issue Aug 30, 2022 · 8 comments
Labels
Needs: Triage 🔍 Type: Upgrade Issue Issues reported from upgrade issue form

Comments

@Sam-Lam-Secret-Key-Labs
Copy link

Sam-Lam-Secret-Key-Labs commented Aug 30, 2022

New Version

0.70.0

Old Version

0.66.4

Build Target(s)

iOS debug

Output of react-native info


System:
    OS: macOS 12.5.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 95.17 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.13.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 8.1.0 - /usr/local/bin/npm
    Watchman: 2022.08.22.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      API Levels: 30, 31, 32
      Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0
      System Images: android-30 | ARM 64 v8a, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play ARM 64 v8a, android-32 | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7935034
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0 
    react-native: 0.70.0-rc.4 => 0.70.0-rc.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Issue and Reproduction Steps

Upon doing pod install or npx pod-install this message will occur.

[!] An error occurred while processing the post-install hook of the Podfile.

invalid range "t-5" in string transliteration

~/Documents/${Project_dir}/node_modules/react-native/scripts/cocoapods/utils.rb:144:in `delete'
~/Documents/${Project_dir}/node_modules/react-native/scripts/cocoapods/utils.rb:144:in `fix_library_search_path'
~/Documents/${Project_dir}/node_modules/react-native/scripts/cocoapods/utils.rb:85:in `block (2 levels) in fix_library_search_paths'
~/Documents/${Project_dir}/node_modules/react-native/scripts/cocoapods/utils.rb:84:in `each'
~/Documents/${Project_dir}/node_modules/react-native/scripts/cocoapods/utils.rb:84:in `block in fix_library_search_paths'
~/Documents/${Project_dir}/node_modules/react-native/scripts/cocoapods/utils.rb:83:in `each'
~/Documents/${Project_dir}/node_modules/react-native/scripts/cocoapods/utils.rb:83:in `fix_library_search_paths'
~/Documents/${Project_dir}/node_modules/react-native/scripts/react_native_pods.rb:158:in `react_native_post_install'
~/Documents/${Project_dir}/ios/Podfile:28:in `block (3 levels) in from_ruby'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-core-1.11.3/lib/cocoapods-core/podfile.rb:196:in `post_install!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:945:in `run_podfile_post_install_hook'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:933:in `block in run_podfile_post_install_hooks'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:149:in `message'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:932:in `run_podfile_post_install_hooks'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:331:in `block (2 levels) in create_and_save_projects'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:330:in `block in create_and_save_projects'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:309:in `create_and_save_projects'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:301:in `generate_pods_project'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:180:in `integrate'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:167:in `install!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `<main>'

I have tried using ruby rvm and use ruby 2.7.5 and adding the gemfile after bundle install, it still gives the same error.

@Sam-Lam-Secret-Key-Labs Sam-Lam-Secret-Key-Labs added Needs: Triage 🔍 Type: Upgrade Issue Issues reported from upgrade issue form labels Aug 30, 2022
@Sam-Lam-Secret-Key-Labs Sam-Lam-Secret-Key-Labs changed the title Upgrade invalid range "t-5" in string transliteration Aug 30, 2022
@Sam-Lam-Secret-Key-Labs Sam-Lam-Secret-Key-Labs changed the title invalid range "t-5" in string transliteration Invalid range "t-5" in string transliteration Aug 30, 2022
@codingslash76
Copy link

I am also facing the same issue.
RN Version - 0.70.0

@bukhari-flip
Copy link

If I remove these lines, error message disappear. So these lines maybe related to this issue.

react_native_post_install(
    installer,
    # Set `mac_catalyst_enabled` to `true` in order to apply patches
    # necessary for Mac Catalyst builds
    :mac_catalyst_enabled => false
)

@cuteWarmFrog
Copy link

Set this flag :mac_catalyst_enabled to true and it actually fixed crush while pod install

@bukhari-flip
Copy link

Set this flag :mac_catalyst_enabled to true and it actually fixed crush while pod install

I can confirm, this is actually works. Thanks 👍🏻

@codingslash76
Copy link

Set this flag :mac_catalyst_enabled to true and it actually fixed crush while pod install

I can confirm, this is actually works. Thanks 👍🏻

No, it's not working on my end.

After removing this code from podfile it works.

post_install do |installer|
    flipper_post_install(installer)
    installer.pods_project.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.1'
    end
    react_native_post_install(
      installer,
      # Set `mac_catalyst_enabled` to `true` in order to apply patches
      # necessary for Mac Catalyst builds
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end

@Sam-Lam-Secret-Key-Labs
Copy link
Author

Sam-Lam-Secret-Key-Labs commented Sep 6, 2022

Set this flag :mac_catalyst_enabled to true and it actually fixed crush while pod install

I tired, it does not work.

First of all I don't think it's a good idea to remove the post install phase.

As @codingslash76 mentioned, it works if we remove the post_install process but actually it works if we add escape character before the t to node_modules/react-native/scripts/cocoapods/utils.rb:144

        lib_search_paths.delete("$(TOOLCHAIN_DIR)/usr/lib/swif\t-5.0/$(PLATFORM_NAME)")
        lib_search_paths.delete("\"$(TOOLCHAIN_DIR)/usr/lib/swif\t-5.0/$(PLATFORM_NAME)\"")

but this is inside the npm package so it will have to be done every time we do npm install.

@views-dev
Copy link

it works if we remove these 2 lines:

@Sam-Lam-Secret-Key-Labs

Could you please specify which file you modified? I'm facing the same issue. Thanks!

@Sam-Lam-Secret-Key-Labs
Copy link
Author

Sam-Lam-Secret-Key-Labs commented Sep 6, 2022

it works if we remove these 2 lines:

@Sam-Lam-Secret-Key-Labs

Could you please specify which file you modified? I'm facing the same issue. Thanks!

node_modules/react-native/scripts/cocoapods/utils.rb

This work around is working, for now, shouldnt make you miss anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Type: Upgrade Issue Issues reported from upgrade issue form
Projects
None yet
Development

No branches or pull requests

5 participants