Can't "Run" iOS build in Trigger.IO - trigger.io

When I go to "Run" my build for iOS, I get this error.
[INFO] lldb.target.Launch(lldb.SBLaunchInfo(shlex.split(args[1] and args[1] or '')), error)
[INFO] IndexError: list index out of range
I have seen an issue around this in PhoneGap's repo... but not sure how to fix this in Trigger.IO.

I'm running Xcode 8.1. I had a similar issue. Running the command below solved my problem.
npm install -g ios-deploy

Related

React Native Error: EMFILE: too many open files, watch

Getting the following error and not 100% sure why. Currently getting this issue when I run my app in ios simulator
I've tried to do npm install watchman, But I just saw the latest update on the npm packages and it seems like it's been depreciated.
events.js:292
throw er; // Unhandled 'error' event
^
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:127:28)
Emitted 'error' event on NodeWatcher instance at:
at NodeWatcher.checkedEmitError
at FSWatcher.emit (events.js:315:20)
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:133:12) {
errno: -24,
syscall: 'watch',
code: 'EMFILE',
filename: null
}
This error was caused by watchman.
You should run brew install watchman in the terminal.
If watchman fails to install, you should change the ownership of these directories to your user by
sudo chown -R $(whoami) /usr/local/etc/bash_completion.d /usr/local/lib/pkgconfig /usr/local/var/log
please refer to the tips in your terminal.
Finally you run brew install watchman. The problem should be solved.
For people with Mac M1 who are running into this problem, I tried the above brew install and upgrade watchman but they didnt work. My specific problem was that react-native project would build on the simulator fine through 'npm run ios' but when archiving or building through xcode I would get this error. After hours upon hours this is what did:
Go into your Security in your System Preferences of your Mac and give full disk access to watchman
The project you are building for some reason (Probably because Apple restricts access) does not work when in your Desktop or your Documents location. Once I moved it to under /Users/myname/ it finally built and archived in xcode.
Hopefully this will save someone else the 6 hours I spent debugging and trying to figure out this.
EDIT: THIS BROKE AGAIN SO HAD TO FOLLOW THIS NEXT TO FIX IT:
This error is because of a bug in module fsevents for mac m1 silicon. See the thread: https://github.com/facebook/metro/issues/668
It got fixed with new version of watchman. Upgrade your watchman through brew. Delete your project and download from git and rebuild everything along with pod install and then it should archive no problem.

CircleCI + React Native + Xcode 10

I have an app running fine with React Native 0.57.7 on CircleCI on Xcode 9.
But we need to bump up Xcode version to 10.1.0.
But when I switch it, Ci stops to work, even with enabling legacy system (-UseNewBuildSystem=NO or -UseModernBuildSystem=0 being passed to Fastlane's build_ios_app), I get "Myapp.app/main.jsbundle does not exist" error.
▸ + echo 'error: File /Users/distiller/project/ios/build/Build/Intermediates.noindex/ArchiveIntermediates/Myapp/BuildProductsPath/Release-iphoneos/Myapp.app/main.jsbundle does not exist. This must be a bug with'
▸ error: File /Users/distiller/project/ios/build/Build/Intermediates.noindex/ArchiveIntermediates/Myapp/BuildProductsPath/Release-iphoneos/Myapp.app/main.jsbundle does not exist. This must be a bug with
▸ + echo 'React Native, please report it here: https://github.com/facebook/react-native/issues'
▸ React Native, please report it here: https://github.com/facebook/react-native/issues
After some hours spent just to figure out what was going on with it, I found out the issue: the build is failing silently because the docker image for Xcode 10.1.0 on CircleCI is missing some dependencies needed to build the app by React Native.
The error was just saying “main.jsbundle does not exist”. It happens when xcode runs react-native-cli bundle from react-native-xcode.sh file. And it doesn't tell the root cause for the error: watchman is missing in the docker image used by this Xcode version.
Why those images don’t have the same installed packages? I don’t know. I was only expecting the same installed packages between the images.
Adding brew install watchman makes the CI pass again:
- run:
name: "Install React Native dependencies"
command: |
brew update
brew install watchman
I wish react-native-xcode.sh could return the root error instead of just main.jsbundle does not exist

Cordova Reading build config file error: Cannot read property 'name' of undefined

I'm using Cordova (7.0.1) and after I'm executing
cordova run ios "--target=iPhone-7, 10.3"
I'm getting error
MAC:folder user$ cordova run ios "--target=iPhone-7, 10.3"
Reading build config file: Error: Cannot read property 'name' of undefined
However, after I'm executing
cordova run ios "--target=iPhone-7, 10.3"
Everything works just fine. 'Verbose' doesn't help really.
I thought that the issue is connected with this issue, so I tried to do
cd platforms/ios/cordova/node_modules/
sudo npm install -g ios-sim#latest
But no luck.
Any ideas why it doesn't work if I specify iOS version and how to fix it?
Do I need to put a 'name' property somewhere or it's just a bug?
Node : 8.1.4
npm : 5.4.1
ios-deploy : 1.9.2
ios-sim : 6.0.0
OS : 10.12.6
Xcode : 8.3.3 (8E3004b)
Looks like this is my issue: issues.apache.org: cordova emulate ios with --target throws undefined error
Guys from Apache are saying that it was fixed in cordova-ios#4.5.0
So this solved my issue
npm i -g cordova-ios#latest
However is going to do that - please make sure do it not only for global, but for local project too. i.e.
npm i cordova-ios#latest
I hope it helps. 🙂

Unable to resolve module react/lib/ReactUpdates

I'm cloning a proyect:
The steps are:
npm i
react-native link
When i run it react-native run-ios i have a problem with RCTWebSocket library. This problem is easy to resolve if you search a little just need remove 2 compiler flags, in Custom Compiler Flags.
Later just i run again react-native run-ios and works fine, but when the app is open, show the next error:
Searching i found that is related to upgrade, source here
but i'm using that command and not works.
When this command is executed, it starts showing me some overrides to some files and at the end of this process, the problem persists.
My react info:
react-native-cli: 1.0.0
react-native: 0.32.1
I'm running in Xcode 8 and ios 10.0
PDTA: When I start a new project works perfect
UPDATES:
When clone on another mac works, I am ensuring to have the same versions of both xcode and node.
Could it be some mac configuration problem?
The only difference between the 2 macs is the cli version:
`react-native-cli: 1.1.0` --> my mac
`react-native-cli: 1.2.0` --> the other mac
Will this be enough to cause all this problem?
With React 0.32~0.37: The problem is most likely that you are using React 15.4.x instead of 15.3.x. One of the changes between 15.3 and 15.4 was that many of the modules under react/lib were moved to react-dom/lib, which is why the packager can't find react/lib/ReactUpdates.
Ensure that your package.json file locks React to 15.3.x:
"dependencies": {
"react": "~15.3.2"
}
Then delete your node_modules folder and run yarn or npm install again. Verify that you installed React 15.3.x:
$ npm ls react
app#1.0.0 /code/app
└── react#15.3.2
Last, restart the React Native server and load your bundle again.
This has been fixed!
Update your dependencies and use react-native ^0.38.0 or newer.
Run react-native upgrade after all react-native version upgrades.

The following build commands failed

I hope someone can help me. I'm really crazy, I've tried everything.
A few days ago installed Titanium Studio on my Mac, then install Xcode. I created a "single window Application Project". Without touching anything special puslo RUN> iOS Simulator> iPhone Retina (3.5 inch).
The program begins to build until the prompt type:
[INFO]: Invoking xcodebuild
[ERROR]: ** BUILD FAILED **
[ERROR]: The following build commands failed:
[ERROR]: Ld build / Debug-iphonesimulator / helloworld.app / helloworld Normal i386
[ERROR] (1 failure)
I updated all Xcode and everything related to Titanium.
Is there any solution?
I have read a lot a lot many forums, but I have not found any solution that works. I have cleaned the build folder, and even fails.
Can you think of anything?
Try installing the command line tools for Xcode. Xcode -> Preferences, Downloads.
Also try checking if you have a folder that has the same name as the app itself?
For me this was a caching issue causing the build to fail.
Delete all DerivedData from your Library root folder
rm -rf /Users/<Your Username>/Library/Developer/Xcode/DerivedData/*
Obviously, replace <Your Username> with whatever your username is (if you're not sure, just run the $ whoami command)
We need to clean cache
If you're using npm
watchman watch-del-all; npm start -- --reset-cache;
If you're using yarn
watchman watch-del-all; yarn start --reset-cache;
Re-install pods
cd ios; pod install; cd ..;
This worked for me at the very least.

Resources