Error Install appium 1.8.1 & failed built xcode mac

Environment:
-vmware Mac os mojave
-xcode 9.4.1
-npm 4.6.1
-node 11.5.0

Hi,

1. i just wanna ask about installing appium server, i got error when install appium npm @1.8.1,
3 warning & 2 error generated

adams-Mac:~ adam$ npm install -g appium@1.8.1
npm WARN deprecated appium-android-bootstrap@2.11.0: Moved to appium-android-driver
npm WARN deprecated appium-android-ime@2.0.0: Moved to io.appium.settings
npm WARN deprecated appium-uiautomator@1.2.0: Moved to appium-android-bootstrap
npm WARN deprecated appium-unlock@2.0.0: Moved to io.appium.settings
npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead
/usr/local/bin/appium → /usr/local/lib/node_modules/appium/build/lib/main.js

appium-chromedriver@4.0.0 install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver
node install-npm.js

info Chromedriver Install Installing Chromedriver version ‘2.38’ for platform ‘mac’ and architecture ‘64’
info Chromedriver Install Opening temp file to write chromedriver_mac64 to…
info Chromedriver Install Downloading https://chromedriver.storage.googleapis.com/2.38/chromedriver_mac64.zip
info Chromedriver Install Writing binary content to /var/folders/d_/fh1prnqs70qft70tf28l8b_m0000gn/T/20181120-437-1746bxd.3j2d/chromedriver_mac64.zip…
info Chromedriver Install Extracting /var/folders/d_/fh1prnqs70qft70tf28l8b_m0000gn/T/20181120-437-1746bxd.3j2d/chromedriver_mac64.zip to /var/folders/d_/fh1prnqs70qft70tf28l8b_m0000gn/T/20181120-437-1746bxd.3j2d/chromedriver_mac64
info Chromedriver Install Creating /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac…
info Chromedriver Install Copying unzipped binary, reading from /var/folders/d_/fh1prnqs70qft70tf28l8b_m0000gn/T/20181120-437-1746bxd.3j2d/chromedriver_mac64/chromedriver…
info Chromedriver Install Writing to /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver…
info Chromedriver Install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver successfully put in place

appium-selendroid-driver@1.8.0 install /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver
node ./bin/install.js

dbug AndroidDriver Getting Java version
info AndroidDriver Java version is: 1.6.0_65
info Selendroid Ensuring /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download exists
info Selendroid Downloading Selendroid standalone server version 0.17.0 from http://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar → /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar
info Selendroid Writing binary content to /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server.jar.tmp
info Selendroid Selendroid standalone server downloaded
info Selendroid Determining AndroidManifest location
info Selendroid Determining server apk location
info Selendroid Extracting manifest and apk to /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download
info Selendroid Copying manifest and apk to /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid
info Selendroid Cleaning up temp files
info Selendroid Fixing AndroidManifest icon bug

fsevents@1.2.4 install /usr/local/lib/node_modules/appium/node_modules/fsevents
node install

node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and node@11.5.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
In file included from …/fsevents.cc:6:
In file included from …/…/nan/nan.h:203:
In file included from …/…/nan/nan_new.h:189:
…/…/nan/nan_implementation_12_inl.h:337:28: warning: ‘New’ is deprecated: Use
Isolate* version [-Wdeprecated-declarations]
return v8::StringObject::New(value).Asv8::StringObject();
^
/Users/adam/.node-gyp/11.5.0/include/node/v8.h:5241:3: note: ‘New’ has been
explicitly marked deprecated here
V8_DEPRECATED(“Use Isolate* version”,
^
/Users/adam/.node-gyp/11.5.0/include/node/v8config.h:326:29: note: expanded from
macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
In file included from …/fsevents.cc:6:
…/…/nan/nan.h:1034:44: warning: ‘ToString’ is deprecated: Use maybe version
[-Wdeprecated-declarations]
v8::Localv8::String string = from->ToString();
^
/Users/adam/.node-gyp/11.5.0/include/node/v8.h:2548:10: note: ‘ToString’ has
been explicitly marked deprecated here
inline V8_DEPRECATED(“Use maybe version”, Local ToString() const);
^
/Users/adam/.node-gyp/11.5.0/include/node/v8config.h:326:29: note: expanded from
macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
In file included from …/fsevents.cc:6:
…/…/nan/nan.h:1044:27: warning: ‘WriteUtf8’ is deprecated: Use Isolate*
version [-Wdeprecated-declarations]
length_ = string->WriteUtf8(str_, static_cast(len), 0, flags);
^
/Users/adam/.node-gyp/11.5.0/include/node/v8.h:2753:3: note: ‘WriteUtf8’ has
been explicitly marked deprecated here
V8_DEPRECATED(“Use Isolate* version”,
^
/Users/adam/.node-gyp/11.5.0/include/node/v8config.h:326:29: note: expanded from
macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
…/fsevents.cc:63:6: warning: field ‘async_resource’ will be initialized after
field ‘lockStarted’ [-Wreorder]
: async_resource(“fsevents:FSEvents”), lockStarted(false) {
^
4 warnings generated.
SOLINK_MODULE(target) Release/fse.node
COPY /usr/local/lib/node_modules/appium/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node
TOUCH Release/obj.target/action_after_build.stamp

heapdump@0.3.9 install /usr/local/lib/node_modules/appium/node_modules/heapdump
node-gyp rebuild

CXX(target) Release/obj.target/addon/src/heapdump.o
In file included from …/src/heapdump.cc:17:
…/src/compat-inl.h:300:19: error: no member named ‘GetCpuProfiler’ in
‘v8::Isolate’
return isolate->GetCpuProfiler()->StartProfiling(title, record_samples);
~~~~~~~ ^
…/src/compat-inl.h:310:19: error: no member named ‘GetCpuProfiler’ in
‘v8::Isolate’
return isolate->GetCpuProfiler()->StopProfiling(title);
~~~~~~~ ^
…/src/heapdump.cc:106:23: warning: ‘Utf8Value’ is deprecated: Use Isolate
version [-Wdeprecated-declarations]
String::Utf8Value filename_string(args[0]);
^
/Users/adam/.node-gyp/11.5.0/include/node/v8.h:2991:5: note: ‘Utf8Value’ has
been explicitly marked deprecated here
V8_DEPRECATED(“Use Isolate version”,
^
/Users/adam/.node-gyp/11.5.0/include/node/v8config.h:326:29: note: expanded from
macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
…/src/heapdump.cc:143:9: warning: ‘MakeCallback’ is deprecated: Use
MakeCallback(…, async_context) [-Wdeprecated-declarations]
node::MakeCallback(isolate, isolate->GetCurrentContext()->Global(), callback,
^
/Users/adam/.node-gyp/11.5.0/include/node/node.h:171:1: note: ‘MakeCallback’ has
been explicitly marked deprecated here
NODE_DEPRECATED(“Use MakeCallback(…, async_context)”,
^
/Users/adam/.node-gyp/11.5.0/include/node/node.h:91:20: note: expanded from
macro ‘NODE_DEPRECATED’
attribute((deprecated(message))) declarator
^
…/src/heapdump.cc:157:44: warning: ‘Int32Value’ is deprecated: Use maybe
version [-Wdeprecated-declarations]
PlatformInit(args.GetIsolate(), args[0]->Int32Value());
^
/Users/adam/.node-gyp/11.5.0/include/node/v8.h:2572:3: note: ‘Int32Value’ has
been explicitly marked deprecated here
V8_DEPRECATED(“Use maybe version”, int32_t Int32Value() const);
^
/Users/adam/.node-gyp/11.5.0/include/node/v8config.h:326:29: note: expanded from
macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^
3 warnings and 2 errors generated.
make: *** [Release/obj.target/addon/src/heapdump.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.0.0
gyp ERR! command “/usr/local/Cellar/node/11.5.0/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /usr/local/lib/node_modules/appium/node_modules/heapdump
gyp ERR! node -v v11.5.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 (node_modules/appium/node_modules/heapdump):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.9 install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

  • appium@1.8.1
    added 534 packages from 407 contributors in 169.793s

2. in xcode, in red text ,what does its mean?

Built failed

any can help pls
thx b4

1 Like

Hi @adam_malik,

Not sure if you got your issue resolved, but something you will need to do (if you haven’t already) is run the following from the WebDriverAgent Xcode project directory before you can build successfully:

rm -rf Carthage
mkdir Carthage
mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh -d

This will install the Carthage dependencies that the WebDriverAgent project needs.

NOTE: If you’re building on Xcode10, you may see an error about:

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_XCElementSnapshot", referenced from:
l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBIsVisible in XCUIElement+FBIsVisible.o
l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBUID in XCUIElement+FBUID.o
l_OBJC_$_CATEGORY_XCElementSnapshot_$_WebDriverAttributes in XCUIElement+FBWebDriverAttributes.o
objc-class-ref in XCUIElement+FBWebDriverAttributes.o
objc-class-ref in XCUIElement+FBUtilities.o
l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBAccessibility in XCUIElement+FBAccessibility.o
l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBScrolling in XCUIElement+FBScrolling.o

There is a bug with building WebDriverAgent for Appium 1.8.x and Xcode 10. To get around this, you’ll need to add to the WebDriverAgentLib->Build Settings->“Other Linker Flags” a value for -Wl,-U,"_OBJC_CLASS_$_XCElementSnapshot"

Hope this helps,

Chris