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

Error archiving after upgrade to 0.71.6 #37479

Closed
jersonpl opened this issue May 18, 2023 · 7 comments
Closed

Error archiving after upgrade to 0.71.6 #37479

jersonpl opened this issue May 18, 2023 · 7 comments

Comments

@jersonpl
Copy link

Description

After upgrading to Xcode 14.3 and react-native 0.71.6 the follow error is show me when archiving app

/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:1: error: Invalid UTF-8 continuation byte
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:1: error: unrecognized Unicode character \ufffd
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:2: error: Invalid UTF-8 continuation byte
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:2: error: unrecognized Unicode character \ufffd
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:4: error: Invalid UTF-8 lead byte 0xfb
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:4: error: unrecognized Unicode character \ufffd
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:5: error: Invalid UTF-8 continuation byte
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:5: error: unrecognized Unicode character \ufffd
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:6: error: unrecognized Unicode character \uf
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:7: error: unrecognized Unicode character \u0000
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:8: error: unrecognized Unicode character \u0000
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:11: error: unrecognized Unicode character \u0000
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:12: error: unrecognized Unicode character \u0000
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:13: error: Invalid UTF-8 continuation byte
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:13: error: unrecognized Unicode character \ufffd
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:14: error: unrecognized Unicode character \u7f
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:15: error: unrecognized Unicode character \u7
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:16: error: unrecognized Unicode character \u0000
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:9: error: Private name can only be used as left-hand side of `in` expression
������
/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/main.jsbundle:1:17: error: ';' expected
������
<unknown>:0: error: too many errors emitted
+ [[ '' == true ]]
+ BUNDLE_FILE=/Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/RNApp.app/main.jsbundle
+ [[ false != true ]]
+ [[ ! -f /Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/RNApp.app/main.jsbundle ]]
+ echo 'error: File /Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/RNApp.app/main.jsbundle does not exist. This must be a bug with React Native, please report it here: https://github.com/facebook/react-native/issues'
error: File /Users/user/Library/Developer/Xcode/DerivedData/RNApp-fypyjowcarkhskbzjwhntdvivibn/Build/Intermediates.noindex/ArchiveIntermediates/Release/BuildProductsPath/Release-iphoneos/RNApp.app/main.jsbundle does not exist. This must be a bug with React Native, please report it here: https://github.com/facebook/react-native/issues
+ exit 2

React Native Version

0.71.6

Output of npx react-native info

System:
    OS: macOS 13.2
    CPU: (8) arm64 Apple M1
    Memory: 612.75 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.14.0/bin/yarn
    npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
    Watchman: 2023.02.27.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/user/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.9971841
    Xcode: 14.3/14E222b - /usr/bin/xcodebuild
  Languages:
    Java: 19.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.6 => 0.71.6 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Archiving or install release version

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

Can't provide one at this stage

@github-actions
Copy link

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.71.8. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@danidaryaweesh
Copy link

danidaryaweesh commented May 19, 2023

@jersonpl Try upgrading Cocoapods to version 1.12.1 and then rebuilding the app . That should fix the issue for you.

@jersonpl
Copy link
Author

Thanks for answering, I have updated the version of cocoapods to 1.12.1, cleaned the project and it still gives an error

System:
    OS: macOS 13.2
    CPU: (8) arm64 Apple M1
    Memory: 59.36 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.14.0/bin/yarn
    npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
    Watchman: 2023.02.27.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.12.1 - /Users/user/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.9971841
    Xcode: 14.3/14E222b - /usr/bin/xcodebuild
  Languages:
    Java: 19.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.8 => 0.71.8 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@dislev
Copy link

dislev commented Jul 12, 2023

not sure if related but my issue rooted from...

Error: Unable to resolve module ./assets/back-icon.png from /Users/expo/workingdir/build/node_modules/@react-navigation/elements/src/index.tsx: 
None of these files exist:
  * back-icon.png
  * node_modules/@react-navigation/elements/src/assets/back-icon.png/index(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs

(from Xcode logs)

I ended up looking in node_modules/@react-navigation/elements/src/assets and folder and its contents were missing entirely.

While I was looking at the folder contents in node_modules/@react-navigation/elements/src/, I saw that /assets/* was being created but after yarn was in its clean up phase.

Checking that I had .yarnclean file in my project root directory, saw that there was an entry in that file for "assets". After removing that entry, I saw that the /assets/* folder and its contents were present still.

Therefore was able to build and archive my ios app successfully (generated the ipa file successfully)

@chennyboy
Copy link

chennyboy commented Jul 26, 2023

I have just ran into this issues, for me this was caused by having hermes and ram-bundled enabled at the same time.
React Native documentation states
If you are using Hermes JS Engine, you should not have RAM bundles feature enabled. In Hermes, when loading the bytecode, mmap ensures that the entire file is not loaded. Using Hermes with RAM bundles might lead to issues, because those mechanisms are not compatible with each other.
To turn RAM bundle off you just need to go in Xcode by editing the build phase "Bundle React Native code and images" and delete the following line
export BUNDLE_COMMAND="ram-bundle"

@yurakruhlyk
Copy link

If you use nvm check which node version shows this command in terminal /usr/local/bin/node -v
For my case it was v12

I just linked nvm again, and it works perfect.

sudo rm -f /usr/local/bin/node
sudo rm -f /usr/local/bin/npm
sudo ln -s $(which node) /usr/local/bin/
sudo ln -s $(which npm) /usr/local/bin/

@jersonpl
Copy link
Author

I have just ran into this issues, for me this was caused by having hermes and ram-bundled enabled at the same time. React Native documentation states If you are using Hermes JS Engine, you should not have RAM bundles feature enabled. In Hermes, when loading the bytecode, mmap ensures that the entire file is not loaded. Using Hermes with RAM bundles might lead to issues, because those mechanisms are not compatible with each other. To turn RAM bundle off you just need to go in Xcode by editing the build phase "Bundle React Native code and images" and delete the following line export BUNDLE_COMMAND="ram-bundle"

Thanks, works for me

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

No branches or pull requests

5 participants