software-mansion / react-native-ide

https://ide.swmansion.com
Other
729 stars 24 forks source link

Building fails due to concurrent builds #143

Open terrysahaidak opened 2 months ago

terrysahaidak commented 2 months ago

Not sure how this happens but I cannot get it to work since it's somehow running multiple builds in parallel which results into this error

2024-04-24 14:03:37.280 [info] error: unable to attach DB: error: accessing build database "/Users/terrysahaidak/Library/Developer/Xcode/DerivedData/daze-byqfqcfikitkcbghnzrgqjbtvjoc/Build/Intermediates.noindex/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.

Steps:

  1. Open IDE it starts building
  2. Then it fails with these errors:
    2024-04-24 14:03:07.763 [info] Found Xcode workspace /Users/terrysahaidak/Projects/myapp/app/ios/myapp.xcworkspace
    2024-04-24 14:03:07.763 [info] Xcode build will use "DevelopmentDebug" scheme
    2024-04-24 14:03:07.763 [info] Building using "xcodebuild -workspace /Users/terrysahaidak/Projects/myapp/app/ios/myapp.xcworkspace -configuration DevelopmentDebug -scheme DevelopmentDebug -destination generic/platform=iOS Simulator build
    2024-04-24 14:03:37.918 [error] Subprocess xcodebuild -workspace /Users/terrysahaidak/Projects/myapp/app/ios/myapp.xcworkspace -configuration DevelopmentDebug -scheme DevelopmentDebug -destination generic/platform=iOS Simulator build execution resulted in an error: Command failed with exit code 65: xcodebuild -workspace /Users/terrysahaidak/Projects/myapp/app/ios/myapp.xcworkspace -configuration DevelopmentDebug -scheme DevelopmentDebug -destination generic/platform=iOS Simulator build
    2024-04-24 14:03:37.918 [error] Couldn't start device session Command failed with exit code 65: xcodebuild -workspace /Users/terrysahaidak/Projects/myapp/app/ios/myapp.xcworkspace -configuration DevelopmentDebug -scheme DevelopmentDebug -destination generic/platform=iOS Simulator build
    2024-04-24 14:04:23.816 [error] Unhandled promise rejection Error: ENOENT: no such file or directory, stat '/Users/terrysahaidak/Projects/myapp/app/.watchman-cookie-MacBook-Pro-Terry.local-4218-16'
    2024-04-24 14:04:23.894 [error] Unhandled promise rejection Error: ENOENT: no such file or directory, stat '/Users/terrysahaidak/Projects/myapp/app/.watchman-cookie-MacBook-Pro-Terry.local-4218-16'
  3. After the fail i click on build again
  4. If fails with the error with concurrent builds.

Looks like when it fails for the first time it doesn't stop the build in the background?

terrysahaidak commented 2 months ago

So now I finally got it working. Had to basically wait for like 10m before the next build to make sure everything was done in the background.

terrysahaidak commented 2 months ago

At some point, the app froze and I clicked on "Reset the app" button (next to the router url) and now i again have this error:

error: unable to attach DB: error: accessing build database "/Users/terrysahaidak/Library/Developer/Xcode/DerivedData/daze-byqfqcfikitkcbghnzrgqjbtvjoc/Build/Intermediates.noindex/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.
fahadfiras commented 1 month ago

Currently facing this issue, even restarting my entire Mac fresh gives the same error