Cannot install. ipa in iOS real device with appium - ios

I am currently not able to install the .ipa file with appium.
I am able to install with ideviceinstaller manually with the command ideviceinstaller -i abc.ipa
but in appium, when I run my cucumber tests, I get the following error, when i tries to install,
Encountered internal error running command: Error: Command failed:
ideviceinstaller -u udid -i
/var/folders/58/bqk7r15x7hv_l35vll1hg5_w0000gp/T/2017311-19876-
1upzlv/Payload/abc.app
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
at ChildProcess.exithandler (child_process.js:202:12)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)
My env.rb file is
require "appium_lib"
def caps
{
caps:{ deviceName: "iPhone",
platformName: "iOS",
app: (File.join(File.dirname(__FILE__), "abc.ipa")),
bundleId: "com.abc.abc",
newCommandTimeout: "3600",
appium_lib: { wait: 20,
debug: false
}
}
}
end
def server_url
'http://0.0.0.0:4723/wd/hub'
end
Appium::Driver.new(caps)
Appium.promote_appium_methods Object

Appears like the Appium cannot handle the ' in the path of the .app and has been acknowledged by the appium team for the fix in iOS in 1.5.3 version.

Related

Get an adbExec error after trying to create session in Appium Inspector

I am a newbie in the Appium, and I get such error while trying to start a session through the Appium Inspector:
Failed to create a session.
An unknown server-side error occurred while processing the command.
Original error: Error executing adbExec.
Original error: 'Command 'C:\\Users\\xukin\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s emulator-5554 install -g C:\\Windows\\system32\\node_modules\\appium-uiautomator2-driver\\node_modules\\io.appium.settings\\apks\\settings_apk-debug.apk' exited with code 1';
Command output:
adb: failed to stat C:\Windows\system32\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk: No such file or directory
Capabilities:
{
"platformName": "Android",
"appium:platformVersion": "12",
"appium:deviceName": "Pixel XL",
"appium:app": "C:/Users/xukin/OneDrive/Документы/app-release.apk",
"appium:automationName": "UIAutomator2",
"appium:udid": "emulator-5554"
}
I looked at this path, and the file was there. Someone knows what's the problem?

Can't compile Electron app under Windows, node-gyp fails to build cpu-features

My Electron application compiles and packages under MacOS without any problems but when it comes to Windows, I can't seem to make it work.
Here's the debug output:
Error: node-gyp failed to rebuild '[appfolder]\release\app\node_modules\cpu-features'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
at NodeGyp.rebuildModule ([appfolder]\node_modules\electron-rebuild\lib\src\module-type\node-gyp.js:117:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ModuleRebuilder.rebuildNodeGypModule ([appfolder]\node_modules\electron-rebuild\lib\src\module-rebuilder.js:94:9)
at async ModuleRebuilder.rebuild ([appfolder]\node_modules\electron-rebuild\lib\src\module-rebuilder.js:124:14)
at async Rebuilder.rebuildModuleAt ([appfolder]\node_modules\electron-rebuild\lib\src\rebuild.js:145:13)
at async Promise.all (index 7)
at async Rebuilder.rebuild ([appfolder]\node_modules\electron-rebuild\lib\src\rebuild.js:104:13)
at async [appfolder]\node_modules\electron-rebuild\lib\src\cli.js:154:9
Error: Command failed: ..\..\node_modules\.bin\electron-rebuild --parallel --force --types prod,dev,optional --module-dir .
at checkExecSyncError (child_process.js:790:11)
at execSync (child_process.js:863:15)
at Object.<anonymous> ([appfolder]\.erb\scripts\electron-rebuild.js:17:11)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Module.m._compile ([appfolder]\node_modules\ts-node\src\index.ts:1455:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Object.require.extensions.<computed> [as .js] ([appfolder]\node_modules\ts-node\src\index.ts:1458:12)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) {
status: 4294967295,
signal: null,
output: [ null, null, null ],
pid: 2700,
stdout: null,
stderr: null
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elapp#4.5.0 electron-rebuild: `node -r ts-node/register ../../.erb/scripts/electron-rebuild.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the elapp#4.5.0 electron-rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\elodie\AppData\Roaming\npm-cache\_logs\2022-04-17T20_38_46_086Z-debug.log
error Command failed with exit code 1.
failedTask=installAppDeps stackTrace=Error: C:\Program Files\nodejs\node.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
yarn install v1.22.18
[1/4] Resolving packages...
success Already up-to-date.
$ npm run electron-rebuild && npm run link-modules
Tried this with Node v14, 16 and 17 to no avail.
EDIT: Missed the actual error while posting. Here's the error from C++ compilation step:
> elapp#4.5.0 electron-rebuild [appfolder]\release\app
> node -r ts-node/register ../../.erb/scripts/electron-rebuild.js
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
conpty.cc
conpty.cc
[appfolder]\release\app\node_modules\node-pty\src\win\conpty.cc : fatal error C1083: Cannot open compiler generated file: '[folder]\obj\conpty\src\win\conpty.obj': Permission denied [[appfolder]\release\app\node_modules\node-pty\build\conpty.vcxproj]
path_util.cc
conpty_console_list.cc
win_delay_load_hook.cc
win_delay_load_hook.cc
Creating library [folder]\conpty_console_list.lib and object [folder]\conpty_console_list.exp
Creating library [folder]\conpty.lib and object [folder]\conpty.exp
conpty_console_list.vcxproj -> [folder]\\conpty_console_list.node
conpty.vcxproj -> [folder]\\conpty.node
Agent.cc
conpty_console_list.vcxproj -> [folder]\\conpty_console_list.node
Agent.cc
[appfolder]\release\app\node_modules\node-pty\deps\winpty\src\agent\Agent.cc : fatal error C1083: Cannot open compiler generated file: '[appfolder]\release\app\node_modules\node-pty\build\deps\winpty\src\Release\obj\winpty-agent\deps\winpty\src\agent\Agent.obj': Permission denied [[appfolder]\release\app\node_modules\node-pty\build\deps\winpty\src\winpty-agent.vcxproj]
EDIT 2: Running the same command as an administrator lead to another error:
yarn install v1.22.18
[1/4] Resolving packages...
success Already up-to-date.
$ npm run electron-rebuild && npm run link-modules
> elapp#4.5.0 electron-rebuild C:\Users\elodie\Projects\elapp\release\app
> node -r ts-node/register ../../.erb/scripts/electron-rebuild.js
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error output:
- Searching dependency tree
The process cannot access the file because it is being used by another process.
The process cannot access the file because it is being used by another process.
gyp: Call to 'cmd /c "cd shared && UpdateGenVersion.bat 2c681018ca7311741a0022e3a170bf60174590b2"' returned exit status 0 while in deps\winpty\src\winpty.gyp. while loading dependencies of binding.gyp while trying to load binding.gyp
× Rebuild Failed
An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild 'C:\Users\elodie\Projects\elapp\release\app\node_modules\node-pty'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: `gyp` failed with exit code: 1

Installing #Forge/cli is bringing spawn ts-node ENOENT error

I followed this tutorial Getting started on Jira development.
I’m on a Mac so I went through those steps: Installing Forge on macOS successfully.
When I install forge Globally:
npm install -g #forge/cli
I get this error:
events.js:291
throw er; // Unhandled 'error' event
^
Error: spawn ts-node ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:470:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
at onErrorNT (internal/child_process.js:470:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn ts-node',
path: 'ts-node',
spawnargs: [
'/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/#forge/cli/out/workers/forge-cli-workers.ts',
'{"name":"#forge/cli","checkForUpdate":true,"environment":"prod"}'
]
}
Here the answer I got from the Forum:
looking at the error and at our postinstall script, it seems like you may have NODE_ENV=development set in your shell environment.
Perhaps you had set it earlier in the same terminal session, or maybe it’s set in your bashrc or bash_profile?
To confirm whether this is the issue, you could unset the NODE_ENV in your terminal session before running npm install -g #forge/cli by running unset NODE_ENV.

ideviceinstaller -l won't show the app list on the iPhone

I'm using Appium to test apps on the real device, and I got an strange error, here is the log
[debug] [iOS] App is not installed. Will try to install.
[MJSONWP] Encountered internal error running command: Error: Installing com.Sosgps.BiaoZhun4 failed
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/node-idevice/main.js:159:6
at ChildProcess.exithandler (child_process.js:193:7)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at maybeClose (internal/child_process.js:850:16)
at Socket. (internal/child_process.js:323:11)
at emitOne (events.js:90:13)
at Socket.emit (events.js:182:7)
at Pipe._onclose (net.js:475:12)
[HTTP] <-- POST /wd/hub/session 500 1535 ms - 175
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
then I use "ideviceinstaller -l" command to show the app list on the iPhone and I got "Could not connect to lockdownd. Exiting.". Then I open the iTunes and found that the app list is empty
Thanks for your time
PS: I have reinstall ideviceinstaller and Xcode and restart my mac and iPhone several times
Get the latest libimobiledevice, which has a fix for this particular issue:
brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew link --overwrite libimobiledevice
brew install ideviceinstaller
brew link --overwrite ideviceinstaller
First step: you need to change Appium setting on dashboard,don't select Full Reset button, and insert your Application path to AppPath context.
Second: Check your real Phone whether it has been installed with App or not, if you have then Uninstall it. If not then leave it as it is.

Error "Command failed with exit code 66" running ios simulator on meteor app

I am trying to run a simulation for ios of my meteor app, following all the steps:
meteor install-sdk ios
meteor add-platform ios
meteor run ios
But when I run the latter it gives me the following error:
Error while running for mobile platforms: Error running
/Users/ivanmac/.meteor/packages/meteor-
tool/.1.0.41.azxhr5++os.osx.x86_64+web.browser+web.cordova/meteor-tool-
os.osx.x86_64/tools/cordova-scripts/cordova.sh
xcodebuild: error: 'test_app.xcodeproj.xcodeproj' does not exist.
Error: /Users/ivanmac/Desktop/test_app/.meteor/local/cordova-
build/platforms/ios/cordova/build: Command failed with exit
code 66
at ChildProcess.whenDone
(/Users/ivanmac/.meteor/packages/meteor-
tool/.1.0.41.azxhr5++os.osx.x86_64+web.browser+web.cordova/meteor-tool-
os.osx.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-
lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
Running command: /Users/ivanmac/Desktop/test_app/.meteor/local/cordova-
build/platforms/ios/cordova/build
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR =
/Users/ivanmac/Desktop/test_app/.meteor/local/cordova-
build/platforms/ios/build/emulator
SDKROOT = iphonesimulator8.1
VALID_ARCHS = i386
Only post I found on the internet talking about this was solved by changing the path, which I tried but didn't help. I'm using Meteor 1.0.3.2 and my xcode is on version 6. Does anyone have any idea of what might be happening?
Update to question
I just found out that if I run the .xcodeproj file on the cordova/ios folder manually the project runs fine, so I guess the path to look for the file to run on xcode when I run "meteor run ios" has an error.
Open platforms/ios/cordova/build and change
XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
to
XCODEPROJ=$( ls "$PROJECT_PATH" | grep --color=never .xcodeproj )
PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
Source: phonegap build ios exception with HelloWorld Application

Resources