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

[macos-12] [0.70.0-rc.0-1] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist #34274

Closed
leotm opened this issue Jul 26, 2022 · 9 comments
Labels
Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@leotm
Copy link
Contributor

leotm commented Jul 26, 2022

Description

Note: macOS 13b builds/runs fine locally

Similar older cases not on RN New arch

# ...
⚠️  ld: method '-compareToSize:thresholdRatio:' in category from /Users/runner/Library/Developer/Xcode/DerivedData/MyApp-brtubmujgpwqbxfcbmbgsgmzrura/Build/Products/Release-iphonesimulator/React-RCTText/libReact-RCTText.a(NSTextStorage+FontScaling.o) conflicts with same method from another category
⚠️  ld: method '-scaleFontSizeWithRatio:minimumFontSize:maximumFontSize:' in category from /Users/runner/Library/Developer/Xcode/DerivedData/MyApp-brtubmujgpwqbxfcbmbgsgmzrura/Build/Products/Release-iphonesimulator/React-RCTText/libReact-RCTText.a(NSTextStorage+FontScaling.o) conflicts with same method from another category
▸ Processing Info.plist
▸ Running script 'Bundle React Native code and images'
    the transform cache was reset.

❌  error: File /Users/runner/Library/Developer/Xcode/DerivedData/MyApp-brtubmujgpwqbxfcbmbgsgmzrura/Build/Products/Release-iphonesimulator/MyApp.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

▸ Generating 'MyApp.app.dSYM'
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening MyApp.xcworkspace.
info Run CLI with --verbose flag for more details.
Error: Process completed with exit code 1.

Example log or latest commits

A suspicion :suspect: (wasn't this, still happening on unpatched 0.70.0-rc.1)

In which case reverting the Yarn v3 patch then re-applying

Should in theory fix

Version

0.70.0-rc.0 (patched), 0.70.0-rc.1 (unpatched, current)

Previously patched 0.70.0-rc.0 (1-liner) to allow PRODUCTION=1 pod install

Output of npx react-native info

remember to yarn install first
Run npx react-native info
  npx react-native info
  shell: /bin/bash -e {0}
npm WARN exec The following package was not found and will be installed: react-native
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.[2](https://github.com/leotm/react-native-template-new-architecture/runs/7519128906?check_suite_focus=true#step:3:2).1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated source-map-resolve@0.5.[3](https://github.com/leotm/react-native-template-new-architecture/runs/7519128906?check_suite_focus=true#step:3:3): See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated uglify-es@3.3.[9](https://github.com/leotm/react-native-template-new-architecture/runs/7519128906?check_suite_focus=true#step:3:10): support for ECMAScript is superseded by `uglify-js` as of v3.13.0
error Failed to load configuration of your project.
info Run CLI with --verbose flag for more details.
Error: Process completed with exit code 1.

Similar to

Nvm, forgot to run it after Yarn

warn Package react-native-flipper contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Fetching system and libraries information...
System:
    OS: macOS 12.4
    CPU: (3) x[6](https://github.com/leotm/react-native-template-new-architecture/runs/7519237740?check_suite_focus=true#step:4:6)4 Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
    Memory: 3.64 GB / 14.00 GB
    Shell: 3.2.5[7](https://github.com/leotm/react-native-template-new-architecture/runs/7519237740?check_suite_focus=true#step:4:7) - /bin/bash
  Binaries:
    Node: 16.16.0 - /usr/local/bin/node
    Yarn: 3.2.2 - ~/.yarn/bin/yarn
    npm: [8](https://github.com/leotm/react-native-template-new-architecture/runs/7519237740?check_suite_focus=true#step:4:8).11.0 - /usr/local/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.3 - /usr/local/lib/ruby/gems/3.0.0/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: 27, 28, 2[9](https://github.com/leotm/react-native-template-new-architecture/runs/7519237740?check_suite_focus=true#step:4:9), 30, 31, 32, 33
      Build Tools: 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.0, 30.0.1, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 33.0.0
      Android NDK: 23.2.8568313
  IDEs:
    Android Studio: Not Found
    Xcode: 13.4.1/13F[10](https://github.com/leotm/react-native-template-new-architecture/runs/7519237740?check_suite_focus=true#step:4:10)0 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_332 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: next => 8.0.0-alpha.0 
    react: [18](https://github.com/leotm/react-native-template-new-architecture/runs/7519237740?check_suite_focus=true#step:4:18).1.0 => 18.1.0 
    react-native: 0.70.0-rc.0 => 0.70.0-rc.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

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

https://github.com/leotm/react-native-template-new-architecture/pull/690/files

@leotm leotm added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Jul 26, 2022
@leotm leotm changed the title Release-iphonesimulator/MyApp.app/main.jsbundle does not exist [Linux] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist Jul 26, 2022
@leotm leotm changed the title [Linux] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist [macos12] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist Jul 26, 2022
@leotm leotm changed the title [macos12] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist [macos12] 0.70.0-rc.0 | Release-iphonesimulator/MyApp.app/main.jsbundle does not exist Jul 26, 2022
@leotm leotm changed the title [macos12] 0.70.0-rc.0 | Release-iphonesimulator/MyApp.app/main.jsbundle does not exist [macos12] [0.70.0-rc.0] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist Jul 26, 2022
@leotm leotm changed the title [macos12] [0.70.0-rc.0] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist [macos-12] [0.70.0-rc.0] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist Jul 26, 2022
@dmytrorykun
Copy link
Contributor

Hey @leotm , thanks for posting. Just a quick sanity check, is bundler running without errors on the machine that produces this error?

❌  error: File /Users/runner/Library/Developer/Xcode/DerivedData/MyApp-brtubmujgpwqbxfcbmbgsgmzrura/Build/Products/Release-iphonesimulator/MyApp.app/main.jsbundle does not exist.

@leotm
Copy link
Contributor Author

leotm commented Jul 28, 2022

np ^ good question, i've added a bundle step before the build which looks fine (presuming index .ts is ok too)

Run npx react-native bundle --entry-file='index.ts' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'
  npx react-native bundle --entry-file='index.ts' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'
  shell: /bin/bash -e {0}
warn Package react-native-flipper contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
                    Welcome to Metro!
              Fast - Scalable - Integrated


info Writing bundle output to:, ./ios/main.jsbundle
info Done writing bundle output
info Copying 1 asset files
info Done copying assets

@leotm
Copy link
Contributor Author

leotm commented Jul 28, 2022

jus spotted @react-native-community/cli seems to be 8.0.0-alpha.0 (outdated @next) here in CI, but 9.0.0-alpha.4 locally :suspect:

think i'm going to remove my dependency to stick to the RN 0.70.0-rc.0 one
edit: done, no luck

but try 9.0.0-alpha.5 first no luck

note: now on 9.0.0-alpha.5 in RN 0.70.0-rc.1

@leotm
Copy link
Contributor Author

leotm commented Jul 28, 2022

done

  • temp bundle to ./ios/main.jsbundle before build
  • temp bundle to ./ios/MyApp/main.jsbundle before build

next steps

update template/repro project.pbxproj seems missed in 0.63.4 to 0.64.0 upg

  • 6685aba

    • Remove the main.jsbundle file that doesn't exists, this file is included automatically in the app bundle and doesn't need to be in xcode (it won't even be at that path).
  • update template remaining project.pbxproj and .xcscheme in-line with facebook/react-native (main)

new project

if still happening, check below for possible patching RN again w Yarn v3

or check CLI changes if regression there

@leotm leotm changed the title [macos-12] [0.70.0-rc.0] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist [macos-12] [0.70.0-rc.0-1] Release-iphonesimulator/MyApp.app/main.jsbundle does not exist Jul 31, 2022
@kelset
Copy link
Contributor

kelset commented Aug 1, 2022

@leotm can you help me understand the scope of this issue you are reporting? Is there a way to repro locally?

leotm added a commit to leotm/react-native-template-new-architecture that referenced this issue Aug 1, 2022
@leotm
Copy link
Contributor Author

leotm commented Aug 1, 2022

sure jus noticed been unable to build iOS Release since 0.69.0, only in CI on macOS-12 (so Xcode 13.4.1)

but had no prob locally on ye olde MBP M1 (might wait for the M3)
while upgrading early to (unsupported) macOS-13 beta and Xcode 14 beta

if you're still on macOS-12 stable then hopefully can repro locally here

exhausted most options can think of so think next step my side will be to try to repro in a new repo w vanilla npx react-native init RN070RC1 --version 0.70.0-rc.1 w same CI (GitHub Actions, same workflow)

then if still getting the error try to dive deeper and come up w a PR

@leotm
Copy link
Contributor Author

leotm commented Aug 1, 2022

great stuff so far, where them video chapters at (;

@leotm
Copy link
Contributor Author

leotm commented Aug 2, 2022

closing since npx react-native init RN070RC1 --version 0.70.0-rc.1 w added CI works OOTB, couldn't repro

will figure/fix eventually, betting my big bucks missed smth some point during the upg process since 0.61.5

so frequently glancing back n forth at our template on main

@leotm leotm closed this as completed Aug 2, 2022
leotm added a commit to leotm/react-native-template-new-architecture that referenced this issue Aug 5, 2022
* Draft ios.yml

* Fix indentation

* Update ios.yml

* Build app for release

* Fix prod build error w Flipper, set env flag

Issue
- reactwg/react-native-releases#21 (comment)
- facebook/react-native#33764
PR
- facebook/react-native#33882

* Remove stale comment

* Temporarily add `npx react-native info`

* Move `npx react-native info` after `yarn`

* Add release bundle step before build

* Update bundle script

* Update bundle script

* Update RN CLI from next (8.0.0-alpha.0) to 9.0.0-alpha.5

* Remove devDep @react-native-community/cli

No luck with 9.0.0-alpha.5

Should now use npm:9.0.0-alpha.4 (via npm:^9.0.0-alpha.3)

* Try bundling also to ios/MyApp/main.jsbundle

* Add debug before release bundle/build

* Fix yarn lockfile/cache conflict res

* Add normal pod install before debug

* Comment debug pod install and build, working fine

* Update pbxproj and xcscheme

Follow-up:
- facebook/react-native#34274 (comment)

Also update parts in-line with current main
- https://github.com/facebook/react-native/tree/main/template

* Disable Metro experimentalImportSupport

* Resolve Yarn lockfile

From conflict res

* Rename xcode.env prefix _ to .

* Remove react-native-flipper

* Revert "Remove react-native-flipper"

This reverts commit 646dd74.

* Revert "Rename xcode.env prefix _ to ."

This reverts commit 8f15810.

* Revert "Disable Metro experimentalImportSupport"

This reverts commit 41ed14b.

* Add index.js for iOS Release bundling

* Add back @react-native-community/cli 9.0.0-alpha.5

* Revert "Try bundling also to ios/MyApp/main.jsbundle"

This reverts commit 80e7354.

* Revert "Comment debug pod install and build, working fine"

This reverts commit 0ea4d01.

* Update workflow comments
@wustzhy
Copy link

wustzhy commented Oct 19, 2022

#29356 (comment)

works fine!!

when js code has error, main.bundle will create fail, then archive release package will fail too.
npm run build:ios helps to display the errro timely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

6 participants