Couldn't find a pair record for device ... - problem when trying to connect Appium to real iPhone device / Appium can't connect to real iPhone - iphone

So I'm trying to run few tests on physical iPhone - but for some reason it's not working.
Works correctly on build in Xcode iPhones Simulator, Android Simulator and real Android device - it's only issue with iPhone real device. ios-deploy is seeing connected device but seems like Appium at first sees the device but then can't connect to it because it can't find "pair record for device" (whatever that means).
Tried with two different iPhones (iPhone 11#13.2 and iPhone 8#13.1)
Tried with Appium CLI (1.16) / Desktop (1.15.1)
Error message returned by Appium:
Error: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device
Here are logs with mentioned error:
[XCUITest] Available devices: 00008030-000A11413E00802A
[XCUITest] Creating iDevice object with udid '00008030-000A11413E00802A'
[XCUITest] Getting the platformVersion from the phone since it was not specified in the capabilities
[XCUITest] Determining device to run tests on: udid: '00008030-000A11413E00802A', real device: true
[XCUITest] Normalized platformVersion capability value '13.2.0' to '13.2'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1578909419779 (10:56:59 GMT+0100 (CET))
[BaseDriver] Event 'appConfigured' logged at 1578909419780 (10:56:59 GMT+0100 (CET))
[BaseDriver] Event 'resetStarted' logged at 1578909419780 (10:56:59 GMT+0100 (CET))
[XCUITest] Reset: running ios real device reset flow
[BaseDriver] Event 'resetComplete' logged at 1578909419780 (10:56:59 GMT+0100 (CET))
[XCUITest] Continuing without capturing device logs: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device
[XCUITest] Setting up real device
[XCUITest] Error: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device
[XCUITest] at startLockdownSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-ios-device/lib/utilities.js:108:13)
[DevCon Factory] Releasing connections for 00008030-000A11413E00802A device on any port number
[DevCon Factory] No cached connections have been found
[BaseDriver] Event 'newSessionStarted' logged at 1578909419790 (10:56:59 GMT+0100 (CET))
[MJSONWP] Encountered internal error running command: Error: Couldn't find a pair record for device 00008030-000A11413E00802A. Please first pair with the device
Does anyone know what's the issue here and how can I solve it?

So, it turned out all I had to do was to install idevicepair (it comes bundled within libimobiledevice). So all I had to do was to:
brew install libimobiledevice
Verify that idevicepair is correctly installed and it sees your connected iPhone with:
idevicepair list
After everythings good you can pair your device with
idevicepair --udid [here goes UDID of your iPhone] pair
This worked for me :)

Related

Can't flash CM0+ Core in NUCLEO STM32WL

In a wireless project, I'm using en Nucleo STM32WLJC1 in dual core configuration.
I take DualCore Ping Pong ST code example, that I rework to make my own application.
I didn't touch anything of the CMO+ project, I only work on the applicative layer in CM4.
I've some problems about flashing the CM0+ Core.
The first time I flashed the board it works and now I've most of the times the folowing error when I try to flash the CM0+. It sometimes work one time for no reason.
Pop-up Problem Occurred Windows :
Error in final launch sequence:
Failed to start GDB server Failed to start GDB server Error in
initializing ST-LINK device. Reason: (255) Unknown. Please check power
and cabling to target.
Console informations
STMicroelectronics ST-LINK GDB server. Version 6.0.0 Copyright (c)
2021, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
Target unknown error 32
Error in initializing ST-LINK device. Reason: Unknown. Please check
power and cabling to target.
It looks like the STlink can't reach the core...
Someone may know what is happening ?
Is there a flashing configuration that has to be done? (to chose which core we want to flash)

iOS 14 gives "OS Error: Bad file descriptor, errno = 9" when doing local network broadcasting

Doing a little Jeopardy style Q&A here.
I'm developing an app in Flutter that uses the udp package for broadcasting on the local network. This has worked fine on Android, Windows, macOS and iOS until I tried on an iOS 14.6 device.
The code flow is mainly like this:
var endPoint = Endpoint.broadcast(port: Port(6000));
var udpFuture = UDP.bind(Endpoint.any(port: Port(6000)));
udpFuture.then((udp) {
udp.listen((datagram) {
handleMessage(datagram.data);
});
udp.send(bytesToSend, endPoint);
}
The error message I'm getting is this: Unhandled Exception: OS Error: Bad file descriptor, errno = 9
Starting from iOS 14 your app needs the Multicast networking entitlement com.apple.developer.networking.multicast to be able to send or receive IP multicast traffic.
To get the entitlement you need to apply using Apple's request form. It took me 4-5 days before I got the request approved.
Then you can follow the instructions on Apple's forums to get up and running.

debugging not working in physical device. flutter

When I was trying to debug my app in physical device getting error as:
java.lang.IllegalArgumentException: Multiple entries with same key: en-AE=https://www.gstatic.com/android-search/hotword/x_google/9b74550b2fb24680fdac9ec59c56e828/hotword.data and en-AE=https://www.gstatic.com/android-search/hotword/x_google/9b74550b2fb24680fdac9ec59c56e828/hotword.data

pkcs#11 CKR_DEVICE_REMOVED error logging in to HSM

I have the SmartCard HSM usb plugged in to my laptop. I can see it when I run a command thru an application using the PKCS#11 API:
Slot 0
Slot info:
Description: Identiv uTrust 3512 SAM slot Token [CCID Interface] (55511725602
Manufacturer ID: Identiv
Hardware version: 2.2
Firmware version: 0.0
Token present: yes
Token info:
Manufacturer ID: www.CardContact.de
Model: PKCS#15 emulated
Hardware version: 24.13
Firmware version: 2.5
Serial number: DECC0300697
Initialized: yes
User PIN init.: yes
Label: UserPIN (SmartCard-HSM)
Its been initialized with a SO-PIN and USER-PIN.
When I try to login in to the HSM using C_Login, I get a CKR_DEVICE_REMOVED error back. The usb HSM is still plugged in. I have googled the error but nothing fruitful came up.
login_token -LOGIN user -SLOT 0 -UPIN user-pin
EROR: rv=0x00000032: Could not log in on the token.
How can I login to the HSM ?
Following text is the description of CKR_DEVICE_REMOVED error from PKCS#11 v2.20 specification:
CKR_DEVICE_REMOVED: The token was removed from its slot during the
execution of the function.
If you did not attach/detach new reader and did not insert/remove smartcard once the PKCS#11 library was loaded then I don't see any obvious reason why you are receiving this error.
However you are using PKCS#11 library provided by OpenSC project so you can enable its debugging via environment variable or configuration file. You may be able to find the cause of the error by exploring the debug output yourself. If not, then your best bet is to open new OpenSC issue and discuss your problem with OpenSC project members.

macOS high sierra 10.13 AD Mobile acount issue

I am try to login to AD account in macOS high sierra 10.13 and getting error:-
You are unable to log in to user account "skull" at this time
Login in the account failed because an error occurred
System logs :
Oct 6 08:24:49 MyMac kcm[399]: DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?
Oct 6 08:24:50 MyMac authorizationhost[344]: ERROR | -[HomeDirMounter mountNetworkHomeWithURL:attributes:dirPath:username:] | PremountHomeDirectoryWithAuthentication( url=smb://IMASFRG-KS0099/skull%%98, homedir=/home/skull, name=skull ) returned 2
Try to uncheck "Use UNC path from Active Directory to derive network home location". Here is a screenshot for your reference. Then you can map the drive via Enterprise Connect if your company had it.
Screenshot