iOS real device Unknown device or simulator UDID - appium

Appium was giving me the error
The 'idevice_id' program is not installed. If you are running a real device test it is necessary. Install with 'brew install libimobiledevice --HEAD.
Then I followed the steps below.
brew uninstall ideviceinstaller
brew uninstall --ignore-dependencies libimobiledevice
brew install --HEAD libimobiledevice
brew unlink libimobiledevice && brew link libimobiledevice
brew install --HEAD ideviceinstaller
brew unlink ideviceinstaller && brew link ideviceinstaller
NOW I am getting this error:
Encountered internal error running command: Error: Unknown device or simulator UDID: ‘G9F8D9FS9DFDF76159347C6GD09FDF’
When I type the
idevice_id --list
command, my UDID shows up. I do not understand why Appium would not recognize it.
I am using Appium 1.14.1 on an iPhone X with iOS version 12.4.
It is a real device.

Related

Error whilst uninstalling a cask using brew

I have installed Autodesk Fusion 360 using homebrew on mac OS 12.5.1. I would now like to uninstall the cask, and am using the following command:
brew uninstall autodesk-fusion360
However the following error is returned:
Error: Failure while executing; /opt/homebrew/Caskroom/autodesk-fusion360/latest/Install\ Autodesk\ Fusion\ 360.app/Contents/MacOS/streamer --process uninstall --appid 73e72ada57b7480280f7a6f4a289729f --stream production --quiet exited with 1.
What can I do to fix the error, and uninstall the cask?

Can't install cocoapods on macOS Big Sur

I am using MacOS Big Sur 11.0 Beta.
I tried to install cocoapods but I can't.
First, I tried with;
sudo gem install cocoapods
It says
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
Then, I tried with;
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew cleanup -d -v
brew install cocoapods --build-from-source (also tried with "brew install cocoapods")
It says
Error: pkg-config: no bottle available!
You can try to install from source with:
brew install --build-from-source pkg-config
So, I tried brew install --build-from-source pkg-config, and it says Error: macOS '10.16' is invalid.
Anybody can help me?

Flutter get error when run on the real device

im using flutter when to run on the real iphone device i get bellow error
when i run bellow mentioned commands i get the same error
brew uninstall --ignore-dependencies libimobiledevice
brew install --HEAD libimobiledevice
brew install ideviceinstaller
[!] iOS toolchain - develop for iOS devices (Xcode 10.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.0, Build version 10A255
✗ Verify that all connected devices have been paired with this computer in Xcode.
If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
To update, run:
brew uninstall --ignore-dependencies libimobiledevice
brew install --HEAD libimobiledevice
brew install ideviceinstaller
• ios-deploy 2.0.0
• CocoaPods version 1.5.3
You're probably hitting the issue described at https://github.com/flutter/flutter/issues/22595.
Can you try to make sure you update usbmuxd as well? You should be able to run:
brew update
brew uninstall libimobiledevice
brew uninstall usbmuxd
brew install --HEAD usbmuxd
brew install --HEAD libimobiledevice

Executing libimobiledevice commands over wifi

I am trying to recreate the trustjacking attack presented by Symantec at RSA 2018 but I have been unable to execute libimobiledevice commands remotely through iTunes wifi sync.
When I have a physical USB connection between my ios device and the computer all the commands work perfectly but when I enable itunes wifi sync and disconnect the cable I can no longer contact to the device.
However, when I run idevice_id -l over wifi it displays the uuid of my ios device but any other commands just display errors such as ERROR: Could not connect to device or No device found, is it plugged in?.
Any suggestions on how I can resolve this problem?
Its turns out that my version of libimobiledevice was corrupt as well as the dependencies. I fixed this by completely reinstalling libimobiledevice and its dependencies as well as removing all previous data stored by libimobiledevice.
I had a similar problem and I had to uninstall the libmobiledevice completely and re-install it again. I found this Github issue here for complete instructions and hence I am sharing the commands here as well for convenience for the future developers.
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies ideviceinstaller
brew uninstall --ignore-dependencies usbmuxd
sudo rm /var/db/lockdown/*
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install --HEAD ideviceinstaller
If you do not have brew installed in your machine, please follow the instruction from this website.

ideviceinstaller fails with "Could not connect to lockdownd. Exiting."

When I try to use ideviceinstaller, the command fails with the following error message:
"Could not connect to lockdownd. Exiting."
Example commands:
ideviceinstaller -l
ideviceinstaller -i Something.ipa
I have googled more than an hour to find the solution, however nothing worked for me:
Reinstall ideviceinstaller
Reinstall libimobiledevice
Reinstall brew and reinstall again both ideviceinstaller, libimobiledevice
It works only if I use sudo but it's unfortunately not acceptable in my case.
System paramereters:
MacBookPro with 10.11.5 OSX El Capitan
Target devices: iPhone 5, iPad 2
Note:
I have installed both Xcode 7.3.1 and Xcode 8 beta 3 on my computer. And used these commands to switch between them:
sudo xcode-select -switch /Applications/Xcode-beta.app/
sudo xcode-select -switch /Applications/Xcode.app/
Meanwhile I found the answer. This command will add durable privileges to use ideviceinstaller:
sudo chmod -R 777 /var/db/lockdown/
Just FYI: updates to macOS, iTunes, and probably other Apple software will (correctly) reset the permissions on /var/db/lockdown.
The best solution here is to 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
I had many problems with ideviceinstaller too, so at least I have started to use cfgutil.
It's a CLI tool of Apple Configurator 2, always up-to-date and reliable, works well with iOS beta versions.
Just download the free app from the App Store: https://itunes.apple.com/hu/app/apple-configurator-2/id1037126344
Start the app then select "Apple Configurator 2 > Install Automation Tools" from the upper left menu.
To install/uninstall apps:
cfgutil --ecid $ECID remove-app $BUNDLE_ID_OF_INSTALLED_APP;
cfgutil --ecid $ECID install-app $PATH_TO_IPA_OR_APP_FOLDER;
To get ECID, connect an iOS device and run the following command:
cfgutil list
Here are the available functions: https://pastebin.com/ZzeueLK2
When you try this command:
ideviceinstaller -d -i Something.ipa
you will get a detailed error. In my case the error is:
lockdown.c:218 lockdown_check_result(): ERROR: PairingDialogResponsePending
11:28:09 lockdown.c:1012 lockdownd_do_pair(): Pair failure
Could not connect to lockdownd.
Exiting.
On further searching for this error no. 2 I found that there was a trust issue in the Iphone connected, so I opened the Iphone and gave trust device, then the issue got resolved.
To fix this, try first:
usbmuxd --force-exit
sudo usbmuxd -f -v
Then
ideviceinstaller -d -i Something.ipa
bellow commands solved my problem
brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew unlink libimobiledevice && brew link libimobiledevice
brew install --HEAD ideviceinstaller
brew unlink ideviceinstaller && brew link ideviceinstaller
sudo chmod -R 777 /var/db/lockdown/
If you are getting this error while brew install --HEAD libimobiledevice
:
"configure: error: Package requirements (libusbmuxd >= 1.1.0) were not met:
Requested 'libusbmuxd >= 1.1.0' but version of libusbmuxd is 1.0.10"
Below commands will solve the issue:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
use above mentioned command ->sudo chmod -R 777 /var/db/lockdown/
if the above command does not work then, remove files from lockdown folder
-> cd /var/db/lockdown/
-> rm -rf *
then try ->ideviceinstaller -l
In my case, the steps doesn't work.
Finally, I find a way to resolve:
DISCONNECT your device!
run cmd in sequence:
brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew install ideviceinstaller
sudo chmod -R 777 /var/db/lockdown
that works for me.

Resources