iOS: App ID gets disconnected during run (Encountered internal error running command: Error: appIdKey)
See original GitHub issueThe problem
During an ongoing run the app gets disconnected resulting in a message saying ‘Application ‘PID:2073’ disconnected. Removing from app dictionary.’
I have noticed this happening since appium-xcuitest 2.126.4 update.
After the app is reset via driver.reset_app(), the app gets attached back with a new PID and the execution continues from that point.
Environment
- Appium version (or git revision) that exhibits the issue: v1.14.0-beta.2
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: Mac OS 10.14.5
- Node.js version (unless using Appium.app|exe): 10.16.2
- Npm or Yarn package manager: 6.9.0
- Mobile platform/version under test: 12.4 iOS
- Real device or emulator/simulator:iPhone X
- Appium CLI or Appium.app|exe:
Details
Here are the logs:
2019-08-14 09:42:39:276 - [debug] [RemoteDebugger] Application 'PID:2073' disconnected. Removing from app dictionary.
2019-08-14 09:42:39:277 - [debug] [RemoteDebugger] Current app is PID:2073
2019-08-14 09:42:39:277 - [debug] [RemoteDebugger] No longer have app id. Attempting to find new one.
2019-08-14 09:42:43:143 - [HTTP] --> POST /wd/hub/session/b5464628-2dcf-4e88-aa33-98ff1d0c46b5/element
2019-08-14 09:42:43:143 - [HTTP] {"using":"xpath","value":"(//hi-checkbox)[1]"}
2019-08-14 09:42:43:143 - [debug] [W3C (b5464628)] Calling AppiumDriver.findElement() with args: ["xpath","(//hi-checkbox)[1]","b5464628-2dcf-4e88-aa33-98ff1d0c46b5"]
2019-08-14 09:42:43:143 - [debug] [XCUITest] Executing command 'findElement'
2019-08-14 09:42:43:144 - [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
2019-08-14 09:42:43:144 - [debug] [BaseDriver] Waiting up to 0 ms for condition
2019-08-14 09:42:43:144 - [debug] [RemoteDebugger] Executing atom 'find_element'
2019-08-14 09:42:43:144 - [debug] [RemoteDebugger] Executing 'find_element' atom in default context
2019-08-14 09:42:43:145 - [debug] [W3C (b5464628)] Encountered internal error running command: Error: appIdKey
2019-08-14 09:42:43:145 - [debug] [W3C (b5464628)] at RemoteDebuggerRealDevice.execute (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-remote-debugger/lib/remote-debugger.js:609:13)
2019-08-14 09:42:43:145 - [debug] [W3C (b5464628)] at RemoteDebuggerRealDevice.execute [as executeAtom] (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-remote-debugger/lib/remote-debugger.js:387:30)
2019-08-14 09:42:43:145 - [debug] [W3C (b5464628)] at process._tickCallback (internal/process/next_tick.js:68:7)
2019-08-14 09:42:43:145 - [HTTP] <-- POST /wd/hub/session/b5464628-2dcf-4e88-aa33-98ff1d0c46b5/element 500 2 ms - 513
Additional Details
Gist : https://gist.github.com/mayureshshirodkar/e177763131ac1e3621b030bcb05648db
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Encountered internal error running command: Error: appIdKey
Hi all. Need help. Running my tests for native iOS app, all was fine before the update to new java-client and latest server...
Read more >Appium inspector is always loading - Stack Overflow
It needs to do this to call getPageSource() which is what is displayed in that section that's still loading. I was testing on...
Read more >Game Center: "Unable to connect to server" error on iOS 14
I fixed the problem. Newest iOS 14.0.1 is installed. Go into settings -> iCloud - turn off the "Game Center App" who used...
Read more >iOS :Got an unexpected response accessing NATIVE popup ...
Appium v1.11.1 The script runs fine in NATIVE mode and then does something correctly also in Webview mode, then it return back to...
Read more >Integrating Google Sign-In into your iOS or macOS app
This page shows you how to integrate Google Sign-In into an iOS or macOS app. You may need to adapt these instructions for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mayureshshirodkar Could you try again with the latest beta? I added a fix for finding contexts. There is a chance it might fix this one as well
@mykola-mokhnach we ca close this issue, If i spot the above java script heap issue, i will open another issue for it, with some more info.
I have tried to increase the memory limit with export NODE_OPTIONS=–max_old_space_size=4096