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

Container folder is not a project file 0.75.4 #46881

Closed
BogdanRad opened this issue Oct 8, 2024 · 6 comments · Fixed by react-native-community/cli#2522 · May be fixed by blakef/cli#4
Closed

Container folder is not a project file 0.75.4 #46881

BogdanRad opened this issue Oct 8, 2024 · 6 comments · Fixed by react-native-community/cli#2522 · May be fixed by blakef/cli#4
Labels

Comments

@BogdanRad
Copy link

Description

I updated my project from 0.74.1 to 0.75.4. In ios folder I have the container folder with GTM file. When I run from terminal I have this error xcodebuild: error: '/Users/bogdan/apps/react-native-mobile-app/ios/container' is not a project file.
If I run from xcode the build is successful. Can you help me to fix this problem from terminal?

Steps to reproduce

  1. after update to 0.75.4
  2. when I run yarn ios

React Native Version

0.75.4

Affected Platforms

Runtime - iOS

Output of npx react-native info

`System:
  OS: macOS 14.4.1
  CPU: (16) x64 Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
  Memory: 172.63 MB / 52.00 GB
  Shell:
    version: 3.2.57
    path: /bin/bash
Binaries:
  Node:
    version: 18.19.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.19
    path: /usr/local/bin/yarn
  npm:
    version: 10.2.3
    path: /usr/local/bin/npm
  Watchman:
    version: 4.9.0
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/bogdan/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.5
      - iOS 17.5
      - macOS 14.5
      - tvOS 17.5
      - visionOS 1.2
      - watchOS 10.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2021.3 AI-213.7172.25.2113.9123335
  Xcode:
    version: 15.4/15F31d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.7.5
    path: /Users/bogdan/.rbenv/shims/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: false
iOS:
  hermesEnabled: true
  newArchEnabled: false`

Stacktrace or Logs

`error Command failed with exit code 66: xcodebuild -list -json -project /Users/bogdan/apps/react-native-mobile-app/ios/container
2024-10-08 09:56:50.644 xcodebuild[86734:4199341] Writing error result bundle to /var/folders/r5/wpsjwhg9245cgqcjs95l5kjc0000gn/T/ResultBundle_2024-08-10_09-56-0050.xcresult
xcodebuild: error: '/Users/bogdan/apps/react-native-mobile-app/ios/container' is not a project file.
Error: Command failed with exit code 66: xcodebuild -list -json -project /Users/bogdan/apps/react-native-mobile-app/ios/container
2024-10-08 09:56:50.644 xcodebuild[86734:4199341] Writing error result bundle to /var/folders/r5/wpsjwhg9245cgqcjs95l5kjc0000gn/T/ResultBundle_2024-08-10_09-56-0050.xcresult
xcodebuild: error: '/Users/bogdan/apps/react-native-mobile-app/ios/container' is not a project file.
    at makeError (/Users/bogdan/apps/react-native-mobile-app/node_modules/execa/lib/error.js:60:11)
    at module.exports.sync (/Users/bogdan/apps/react-native-mobile-app/node_modules/execa/index.js:194:17)
    at /Users/bogdan/apps/react-native-mobile-app/node_modules/@react-native-community/cli-platform-apple/build/tools/getInfo.js:81:41
    at Array.reduce (<anonymous>)
    at getInfo (/Users/bogdan/apps/react-native-mobile-app/node_modules/@react-native-community/cli-platform-apple/build/tools/getInfo.js:74:15)
    at getConfiguration (/Users/bogdan/apps/react-native-mobile-app/node_modules/@react-native-community/cli-platform-apple/build/commands/buildCommand/getConfiguration.js:36:37)
    at Object.func (/Users/bogdan/apps/react-native-mobile-app/node_modules/@react-native-community/cli-platform-apple/build/commands/runCommand/createRun.js:113:52)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Command.handleAction (/Users/bogdan/apps/react-native-mobile-app/node_modules/@react-native-community/cli/build/index.js:118:9)
error Command failed with exit code 1.`

Reproducer

is private

Screenshots and Videos

image
@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Oct 8, 2024
@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

@BogdanRad BogdanRad changed the title Container folder is not a project file Container folder is not a project file 0.75.4 Oct 8, 2024
@cipolleschi
Copy link
Contributor

Hi @BogdanRad, I understand that the reproducer is private, but can you try to replicate the minimal setup starting from this template? Otherwise it would be quite hard for us to help you.

In 0.75 we introduced some changes in the CLI, so this specific use case might got broken. cc. @blakef, @szymonrybczak and @thymikee that worked on the CLI recently.

@blakef
Copy link
Contributor

blakef commented Oct 8, 2024

I can replicate this, it's a CLI bug from a feature added 4 months ago (react-native-community/cli#2415). It make some assumptions about what's in the xcworkspace contents.xcworkspacedata XML file. If I start adding other files via the Xcode project navigator:
CleanShot 2024-10-08 at 11 55 19@2x

It blows up:
CleanShot 2024-10-08 at 12 00 05@2x

We could make this a little more robust in the CLI:
CleanShot 2024-10-08 at 11 56 59@2x

@cipolleschi I think @BogdanRad is unblocked as he can build with Xcode, but I'll add some tests and try get a fix out on the CLI.

@BogdanRad
Copy link
Author

Thank you @blakef

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Oct 8, 2024
blakef added a commit to react-native-community/cli that referenced this issue Oct 8, 2024
We've been notified of a case where a user legitimately has more files
in listed in their workspace than the project and pods. This would crash
when running: npm @react-native-community/cli ios

Fixes: facebook/react-native#46881
@blakef blakef added 💻CLI and removed Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Oct 8, 2024
@blakef
Copy link
Contributor

blakef commented Oct 8, 2024

I'm going to close this as it isn't a React Native bug. Please track the progress on react-native-community/cli#2522.

@blakef blakef closed this as completed Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants