[TIMOB-23755] iOS: Hyperloop - Cannot build Hyperloop project if Xcode is not in default location
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-08-15T16:42:37.000+0000 |
Affected Version/s | Release 5.4.0 |
Fix Version/s | Backlog |
Components | Hyperloop, iOS |
Labels | notable, qe-5.4.0 |
Reporter | Eric Wieber |
Assignee | Hans Knöchel |
Created | 2016-08-10T16:49:55.000+0000 |
Updated | 2018-08-06T17:49:12.000+0000 |
Description
If Xcode is not in the default location (
/Applications/Xcode.app
), Hyperloop projects fail to build (the metabase fails to generate).
*Steps to reproduce issue*
1. Ensure there is not an Xcode in the default location (/Applications/Xcode.app
)
2. Select your Xcode, not in the default location, using sudo xcode-select -s /path_to_xcode/Contents/Developer
3. Create a new project with Hyperloop
4. Change the code of the project to reference Hyperloop
5. Build the project for sim or device
*Actual Results*
The build fails with:
[TRACE] [Hyperloop] metabase took 37 ms to generate
2016-08-10T16:32:54.320Z | ERROR | An uncaught exception was thrown!
ENOENT: no such file or directory, open '/Users/Eric/Documents/Appcelerator_Studio_Workspace/HLTEST/build/hyperloop/ios/metabase-7.1-iphonesimulator-2e0197f93f6a8a0561f89e29961fab80.json'
2016-08-10T16:32:54.322Z | ERROR | ENOENT: no such file or directory, open '/Users/Eric/Documents/Appcelerator_Studio_Workspace/HLTEST/build/hyperloop/ios/metabase-7.1-iphonesimulator-2e0197f93f6a8a0561f89e29961fab80.json'
*Expected Results*
The build succeeds and the metabase is created
*Notes*
After the error I have the .h
file in my build/hyperloop/ios
folder, but the .json
files and js
folder are not populated.
I don't think that's a Hyperloop-issue. If you change the default Xcode-location (which is really not recommended), you need to run
sudo xcode-select -s /path_to_xcode/Content/Developer
. Please validate.That was part of the validation and reproduction steps. However, I have edited the description and broke it out into a separate step to make it clear. To repro, you should have a selected Xcode and not have an Xcode in the default location.
After some more research and testing, I found out that if you build the module with the non-default location and run it afterwards, it does work. I checked the logs and the
metabase
binary and found out that the path of the Xcode-installation is referenced inside the binary by Xcode itself. So I don't really know if we can actually fix it without touching the binary after being built. So two options I can propose:Make this ticket a docs issue and add a note to the Hyperloop-guides to keep Xcode in the default (recommended) location
Touch the metbase in
Besides that, it also affects the Xcode-beta version which would currently fail if we build the module with Xcode-beta and try to run it on a installation that does not have Xcode (stable) installed. But that won't be a problem, because we can and will compile Hyperloop for SDK 5.5.0 with the Golden Master of Xcode which will be "Xcode.app". Thats it for now, feedback appreciated. *EDIT*: I tried #2 and obviously it didn't work, because the binary hashes differ now causing the metabase to fail even earlier. So unless we know something else, I would update the docs to inform users about this behavior. And it is not only for our binary put also for every other native library that needs to reference other (system) libraries in it.plugins/hyperloop/node_modules/hyperloop-metabase/bin/metabase
by manually regex'ing the location.Updated the [Hyperloop guide](https://wiki.appcelerator.org/display/guides2/Enabling+Hyperloop) with this information. [~bimmel] please include this page in the next guides-push.
Thanks Hans. This document, along with the rest of the Hyperloop docs, will be published on the next doc push which should be the Dashboard 4.9.0 some time this week.
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.