Unable to launch app via appium capabilities but app launched successfully via 'xcrun simctl install booted install myApp.app' - automation

Error message: ‘myApp.app’ cannot be opened because the developer cannot be verified.
I face above error when I install the myApp.app using Appium on my iOS simulator. However, when I install the same myApp.app using terminal command ‘xcrun simctl install booted install myApp.app’ then the app installed/launched perfectly fine.
Note: I am a tester hence I have not built the app using XCode and moving forward I will be getting the .app file only from the developer for testing.
Below are the details
Appium desktop client version : 1.15.1
macOS version : 10.15.2
XCode version: 11.3
I am using below appium desired capabilities for iOS
{
“platformName”: “iOS”,
“platformVersion”: “13.3”,
“deviceName”: “iPhone 8”,
“automationName”: “XCUITest”,
“app”: “/Users/harj/Desktop/myApp.app”,
“bundleId”: “com.abc.xyzApp”,
“commandTimeouts”: 60000,
“noReset”: false,
“autoGrantPermissions”: true,
“useNewWDA”: true,
“showXcodeLog”: true
}
Appium logs
There are many errors in the log but i found this one relevent
Original error: ‘idb’ has not been found in PATH. Is it installed? Read https://www.fbidb.io for more details
That would be great if someone faced the same problem and got a solution.
Happpy Testing
harj

I can able to launch the sample .app file on simulator with below versions.
I have resolved setup issue for simulator 13.4 version with xcode 11.4.
Simulator-: 13.4
xcode -: 11.4
mac os. -: 10.15.4
appium v -: 1.17.0
If you still face any issue then let me know. with appium logs and whole details.

Finally, the solution has been found.
Actually, the problem is with the macOS Catalina not with the Appium. The OS was preventing the .app to install on the simulator. There are two ways to solve this problem.
1) Degrade the gatekeeper(security) check on your mac.
2) Quarantine that specific app using below terminal command
xattr -dr com.apple.quarantine /yourAppPath/myApp.app
I recommended the option2 as it will keep your mac safe from attacks.

Related

“launchPackager.command” can’t be opened

Just updated my Mac to the official release of Ventura, and I cannot launch my application via react-native run-ios.
Expected behavior:
running react-native run-ios will launch an Xcode simulator and a terminal window with Metro running.
Current behavior:
Xcode simulator opens, main terminal says app was built successfully, but an error is thrown instead of the metro terminal opening:
“launchPackager.command” can’t be opened because (null) is not allowed to open documents in Terminal.
The simulator just shows a white screen and can't be interacted with.
What I've tried:
manually opening node_modules/react-native/scripts/launchPackager.command
opens Metro terminal but is not connected to the app
warn No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.
info Reloading app...
giving Terminal full disk access (no change)
This happened to me after upgrading to macOS Ventura. I happen to use iTerm as my main terminal, not the built-in Terminal.app so the following fix only applies to that scenario:
Set iTerm as the Default Handler for *.command Files
Open node_modules/react-native/scripts/ in Finder (open node_modules/react-native/scripts/)
Right-Click on launchPackager.command and click Open With then choose Other...
In your Applications directory, select iTerm and click Always Open With
After this, you might need to run npm run ios again from this terminal window. However, from now on, Metro will open in a new iTerm tab instead of trying to open the command in a new Terminal window.
For me, this was the desired behaviour and it removed this warning.
Note In future, any *.command files will now open with iTerm instead of Terminal.
I encountered the same problem as you, I installed another terminal (iTerm2), then randomly found a .command file, and in the display introduction, changed the default opening method to iTerm2enter image description here
I'm having this issue after upgrading my MacOS to Ventura 13.1.
If you don't want to use iTerm as the accepted answer suggest, the workaround I found was to look for the launchPackager.command file inside node-modules/react-native/scripts/ and open this file manually every time you run your app for the first time (specifically when the error pop-up appears). This will open the terminal with metro running already.
I know that manually processes are not the best, but I don't want to use iTerm :)
Using Intel version of apps (Webstorm, Android Studio, other IDE etc...) fixed my problems. I encountered the same issue and thanks to Intel version of Webstorm and Xcode on Rosetta I can able to pod install and other operations.
Note: I'm using Intel version of Android Studio, WebStorm. Also Xcode uses Rosetta 2. No problem detected and everything works perfect. I can able to develop React-Native & Native Android & iOS and Flutter apps without problem. Before that I was using Silicon version of WebStorm and almost no function worked.
Config: MacBook Air, macOS Ventura 13.2 on Apple M1 processor.
For Most of the case you just have to delete node_modules and install modules again (npm i). This happens when project was copied from old mac which had node_modules folder created by the old user, or if the system thinks so
This happened to me after i configured my terminal for the look and feel - but with iterm2, oh my zsh, and powerlevel10k

Android emulator won't start on Mac OS 10.13

I just installed Android Studio 3.0.1 on my Mac with OS 10.13.2 but the emulator doesn't start. All I see is some errors in the event log:
Emulator: Failed to open vm 4
Emulator: Failed to create HAX VM
Emulator: No accelerator found.
Emulator: failed to initialize HAX: Invalid argument
I know this question has been asked before, but none of the solutions work for me. Is there a work around for this problem? Or should I just wait for fix in Android Studio/HAXM/Hypervisor.Framework/Mac OS?
"Hakintosh" user here...
Had the same issue.
My solution was to turn on Inter Virtualisation Technology in Bios settings.
Hope it helps for someone!
I had the same issue and fixed it following these steps:
In Android SDK Manager -> SDKTools uninstall the following:
Intel x86 Emulator Accelerator (HAXM installer)
Then download the HAXM installer and install it from here: HAXM Installer
Finally, open
~/Library/Android/sdk/emulator/lib/advancedFeatures.ini
and change the line 'HVF = off' to 'HVF = on'
I was able to resolve this by going to SDK Manager > SDK Tools (tab)
and re-installing:
Android SDK Build tools
Android Emulator
Android SDK Platform-tools
Intel x86 Emulator Accelerator (HAXM Installer)

Trouble with CLI and iOS simulator

I'm moving to a new machine and want to start out fresh. I'm leaving Appcelerator Studio behind and want to go all CLI.
The project I'm working on is still on SDK 5.5.1.
When I try to build our app for the iPhone simulator it builds fine and launches the simulator but when it tries to start the app the simulator goes black execpt for the status bar. No errors are thrown in the terminal and nothing interesting shows up in console.app
I can launch the app in the simulator on my old machine without issues (done it 1000 times or so).
I build with: appc run -p ios
This is the last output I get:
[INFO] Launching iOS Simulator
-- Start simulator log -------------------------------------------------------
[INFO] Application started
[INFO] OurAppName/2.8.1 (5.5.1.b18727f)
This is my setup:
Appcelerator Command-Line Interface, version 5.5.1
2017-02-08 14:54:46
Name = Mac OS X
Xcode 8.1
Version = 10.12.3
Node.js Version = 4.7.3
npm Version = 2.15.11
Titanium CLI Version = 5.0.9
Titanium SDK Version = 5.5.1.GA
SDK Path = /Users/-/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA
Target Platform = iphone
What am I missing?
You could try building on a specific simulator
run
appc run -p iOS --device-id
it will prompt you with all the devices available and you can choose among the list (choose an iOS 9 simulator, it looks like the problem is with the iOS 10 simulator)
Not sure if it helps, but we're using Titanium SDK 5.4.0, and so far still using Xcode 7. For another project, using Titanium 6 we are using Xcode 8.
We experienced some issues in communication between Studio/CLI and Xcode/Simulator.
if you are using Xcode 8.1 then you can use the following command
appc ti build -p ios -I 10.1
where -p is platform and -I is IOS version
if you want to check IOS version
Step 1: Go to Xcode
Step 2: Window -> Devices.
please see the image it will clear all things.
It worked for me.

Hello, World! program for React Native throws "Could not parse the simulator list output" on Mac

I just started learning React Native and was trying to run my Hello, World! app using the steps given in https://facebook.github.io/react-native/docs/getting-started.html#content
I took the following steps
1. `brew install watchman`
2. `npm install -g react-native-cli`
3. `react-native init hello`
4. `cd hello`
5. `react-native run-ios`
Instead of launching the iOS app, I got the following error in the terminal:
Found Xcode project hello.xcodeproj
Usage: simctl list [devices|devicetypes|runtimes]
Could not parse the simulator list output
I also tried to run it using Xcode; however Xcode shows lot of compilation errors.
Following are details on my system
OS: Mac OS v10.10.5 (Yosemite)
Node.js version: 4.4.1
Xcode version: Version 6.3 (6D554n)
Following is a screenshot of errors shown in Xcode.
Error disappeared after I launched Xcode and allowed to install some updates.
The problem was that I updated Xcode and never opened it after the update completed. After I opened Xcode it did install components then when I tried again it worked fine.
In my situation, I closed the current terminal and reopened it, then the error was gone.
I realized that I was using a beta version of Xcode. Once I installed the latest version of Xcode then all errors were gone and the app were launched in the simulator.

Titanium Appcelerator - can't create new project & iOS simulator not running kitchen sink

I have a fresh installation of Titanium Appcelerator on Mac OS (Mountain Lion - 10.8.2); I did all the updates to Titanium Studio + SDK + GIT and it confirms the iOS framework (Xcode 4.5.2, iOS 6) is installed correctly but I'm encountering two issues:
when running kitchen sink on iPad / iPhone iOS device simulator I get an "Launching (iPad/iPhone) Simulator - 'Kitchen Sink' has encountered a problem" message
when I try to create a brand new project I get an "unable to create project" message
The error details in both cases start with:
Launching simulator process failed
[ERROR] : Error: ENOENT, no such file or directory
'/Users/(user_name)/.titanium/auth_session.json'
I've already tried clearing / deleting the build folder for the first error but nothing changes.
The .titanium folder under my user folder doesn't exist at all. I've already uninstalled and re-installed a couple of times. Again, no change.
I solved it by installing titanium manually.
# Mac & Linux
sudo npm install -g titanium
# Windows
npm install -g titanium