appium: Unable launch app - Error : Building for iOS, but the linked framework 'CocoaAsyncSocket.framework' was built for tvOS + tvOS Simulator when running real device
The problem
I am not able to launch app in OS X / real device . This used to work till I update my xcode today. There are no changes in the script .
Environment
Appium 1.15.1 Mac OS X Catalina 10.15.4 XCode 11.4 (11E146)
- Appium version (or git revision) that exhibits the issue: Appium 1.15.1
- Last Appium version that did not exhibit the issue (if applicable): Appium 1.15.1
- Desktop OS/version used to run Appium: Mac OS X Catalina 10.15.4
- Node.js version (unless using Appium.app|exe): 12.11.1
- Npm or Yarn package manager:
- Mobile platform/version under test: OS X 12.4.5
- Real device or emulator/simulator: Real Device / iPhone 6
- Appium CLI or Appium.app|exe: Both - CLI and Appium app
Details
Launch Appium Desktop Go to App Inspector Start Session (I am using Netflix as an example) in real device from Appium Desktop
If necessary, describe the problem you have been experiencing in more detail. This used to work before I update XCode today.
Link to Appium logs
Create a GIST which is a paste of your full Appium logs, and link them here. https://gist.github.com/ivantay2003/f1dc3362e0fc84bd1f6ce69392a84133
Do NOT paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, always include Appium logs!
Code To Reproduce Issue [ Good To Have ]
- Launch Appium Desktop app
- Go to Inspector
- Start session
Error (see log) This used to work before i update my xcode. It is repro on both the app and cli.
Please remember that with sample code it’s easier to reproduce the bug and it’s much faster to fix it.
Please git clone https://github.com/appium/appium and from the sample-code
directory, use one of your favourite languages and sample apps to reproduce the issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 37 (7 by maintainers)
Hi, Iam having the same issue getting the error error: Building for iOS Simulator, but the embedded framework ‘CocoaAsyncSocket.framework’ was built for iOS + iOS Simulator. (in target ‘WebDriverAgentRunner’ from project ‘WebDriverAgent’) error: Building for iOS Simulator, but the embedded framework ‘YYCache.framework’ was built for iOS + iOS Simulator. (in target ‘WebDriverAgentRunner’ from project ‘WebDriverAgent’)
Xcode: 12.3 Appium Version:1.18.3 ,MAC OS: Catalina 10.15.6
Could please help me out the resolve
I fixed this issue by reinstall the latest appium. I delete off the carthage and reinstall it. I document the steps of setting up here:
https://medium.com/@ivantay2003/setting-up-appium-in-os-x-ecd9e7108a9c
The one by @Whiperdief works for me (but the last update i had was in March back). I will update this in my doc
Same issue. None of the above helps. (iOS) Reinstalled appium-desktop. Reinstalled appium CLI. Reinstalled node. Removed everything appium/node related. Run appium-doctor, no errors or warning.
I did find a “solution” to my problem.
When I execute JAVA code testing following folder is generated: … Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu
When I execute appium-desktop following folder is generated: … Library/Developer/Xcode/DerivedData/WebDriverAgent-akxhdiizyykdxefsthlnfyomlaiz
Both folders will be random generated, just keep track which Appium generates which folder. The CLI appium generated folder has a folder named ‘build’. Copy paste that into the folder generated by appium-dekstop. And it works for me. The folder generated by appium-desktop is missing the webdriveragent. The ‘build’ folder generated by CLI has a working webdriver agent.
I hope this helps some people out.
Second solution:
caps.setCapability(“derivedDataPath”, “/Users/xxx/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu”);
This does the same, but tell appium-desktop to look for derivedData from Appium-CLI.
I confirmed. Could you update to the latest appium version? I reproduced the build error with 1.15.1, but it was resolved in the latest one.
For Xcode 12.3 persons https://github.com/appium/appium/issues/14952
I fixed this issue … Environment Appium Version 1.17.1 (1.15.1.20191013.2) MacOS Catakina v 10.15.4 (19E287) -xcode Version 11.4.1 (11E503a) The solution
1- reinstall the appium >> take care to run brew insatll carthage + brew link carthage 2- ~/ appium-webdriveragent >> run mkdir -p Resources/WebDriverAgent.bundle 3- run ./Scripts/bootstrap.sh -d 4- add this to your capiblity >desiredCapabilities.setCapability (“showXcodeLog”, true);>> very useful
Setting
WebDriverAgent -> Build Settings -> Build Options -> Validate Workspace = Yes
for each target of the workspaceFor Desktop Appium the project located here:
(/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/webdriver...)
For console appium the project located here:
/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent
Tested on environments: Mac OS-X Catalina 10.15.7 and also on Big Sur Appium 1.18.3
Appium 1.20 worked for me. For Appium desktop I had to upgrade to 1.20.0-beta.0 (https://github.com/appium/appium-desktop/releases)
@Whiperdief - Yes, that did the trick! Thank you!! Perhaps I’m missing something, but this seems like a pretty big issue considering the latest version of Appium Desktop doesn’t seem to work on macOS without this convoluted workaround.