manishPatwari / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
52 stars 15 forks source link

clang: error: linker command failed with exit code 1 (use -v to see invocation) #16

Closed michaelseno closed 5 years ago

michaelseno commented 5 years ago

I'm not able to build the WebDriverAgent.xcworkspace but i'm not able to do so.

    cd /Users/michaelseno/Documents/Temp-IOS/WebDriverAgent
    export IPHONEOS_DEPLOYMENT_TARGET=9.3
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -L/Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Products/Debug-iphonesimulator -L/Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Products/Debug-iphonesimulator/SDVersion -F/Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Users/michaelseno/Documents/Temp-IOS/WebDriverAgent/Carthage/Build/iOS -F/Users/michaelseno/Documents/Temp-IOS/WebDriverAgent/Carthage/Build/Mac -filelist /Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Intermediates.noindex/WebDriverAgent.build/Debug-iphonesimulator/WebDriverAgentLib.build/Objects-normal/x86_64/WebDriverAgentLib.LinkFileList -install_name @rpath/WebDriverAgentLib.framework/WebDriverAgentLib -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -mios-simulator-version-min=9.3 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Intermediates.noindex/WebDriverAgent.build/Debug-iphonesimulator/WebDriverAgentLib.build/Objects-normal/x86_64/WebDriverAgentLib_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lSDVersion /Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Products/Debug-iphonesimulator/Starscream.framework/Starscream /Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Products/Debug-iphonesimulator/SocketIO.framework/SocketIO -lxml2 -framework RoutingHTTPServer /Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Products/Debug-iphonesimulator/JLRoutes.framework/JLRoutes /Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Products/Debug-iphonesimulator/libJLRoutes.a -lPods-WebDriverAgentLib -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Intermediates.noindex/WebDriverAgent.build/Debug-iphonesimulator/WebDriverAgentLib.build/Objects-normal/x86_64/WebDriverAgentLib_dependency_info.dat -o /Users/michaelseno/Library/Developer/Xcode/DerivedData/WebDriverAgent-aduhwbmuapgngudszyhkxhdnagdk/Build/Products/Debug-iphonesimulator/WebDriverAgentLib.framework/WebDriverAgentLib

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
      l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBAccessibility in XCUIElement+FBAccessibility.o
      l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBScrolling in XCUIElement+FBScrolling.o
      l_OBJC_$_CATEGORY_XCElementSnapshot_$_FBHitPoint in XCElementSnapshot+FBHitPoint.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
guadaran commented 5 years ago

Hi @michaelseno,

What version of XCode are you using? If you are using xCode 10 please check #14

Regards.

michaelseno commented 5 years ago

Thanks @guadaran for the response. I would like to check how to integrate the new version of WebDriverAgent into this project because i am having some issue with the podfile below is the error:


    The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
    Testing cancelled because the build failed.
** TEST FAILED **```

I've tried to remove pod then re install but still the same. maybe you have some inputs about this?
guadaran commented 5 years ago

Hi @michaelseno:

That is a problem that usually happens with CocoaPods. Please check if some of these solutions works for you.

michaelseno commented 5 years ago

Hi @guadaran Thank you very much for the input. I'm now able to start the server and run the command xcodebuild test -workspace WebDriverAgent.xcworkspace -scheme WebDriverAgentRunner -destination "platform=iOS Simulator,OS=12.1,name=iPhone XR" and it will have a success in the logs 2018-11-26 11:21:27.100969+0800 WebDriverAgentRunner-Runner[77155:5353953] ServerURLHere->http://192.168.3.180:8101<-ServerURLHere but when I tried to access the ServerURL. it will give { "value" : "Unhandled endpoint: \/ -- http:\/\/192.168.3.180:8101\/ with parameters {\n wildcards = (\n \"\"\n );\n}", "sessionId" : "242E37F0-734D-471B-BA54-8F1B0F5DE2C6", "status" : 1 } but no devices connected is the error on the 8000 port. can you point me to a documentation about no device connected error? Thanks for the support

michaelseno commented 5 years ago

closing issue