【问题标题】:An unknown server-side error occurred while processing the command. Original error: Could not navigate to webview; there are none处理命令时发生未知的服务器端错误。原始错误:无法导航到 webview;没有了
【发布时间】:2022-10-14 00:16:20
【问题描述】:

所需的能力

"appium:platformName": "iOS", "appium:platformVersion": "15.0", "appium:deviceName": "iPhone 13 pro Max", "appium:automationName": "XCUITest", “udid”:“0B2392E0-F3A7-4860-8E01-98C2B43EE6C9”, “autoWebview”:“真”

环境:1)Appium 服务器界面:1.22.0 2)Xcode - 13.0 3)appium 检查员 - 2022.2.1 4)Java - 18.0.2.1 5)硒 - 3.11.0 6)java-client - 6.0.0-BETA5 7)Eclipse-版本:2022-06 (4.24.0) 8) os.name: 'Mac OS X 9)操作系统版本:'12.5.1'

Appium原木

[RemoteDebugger] Checking for bundle identifiers: com.apple.WebKit.WebContent, process-com.apple.WebKit.WebContent, process-SafariViewService, com.apple.SafariViewService, *, com.zetadocs.expenses
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'com.apple.WebKit.WebContent'
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'process-com.apple.WebKit.WebContent'
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'process-SafariViewService'
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'com.apple.SafariViewService'
[RemoteDebugger] Found app id key 'PID:41591' for bundle '*'
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'com.zetadocs.expenses'
[RemoteDebugger] Trying out the possible app ids: PID:41591 (try #1 of 20)
[RemoteDebugger] Attempting app 'PID:41591'
[RemoteDebugger] Sending '_rpc_forwardGetListing:' message to app 'PID:41591' (id: 376): 'connectToApp'
[RemoteDebugger] Received response from send (id: 376): '["PID:41591",{}]'
[RemoteDebugger] Sending to Web Inspector took 1ms
[RemoteDebugger] Empty page dictionary received
[RemoteDebugger] Error checking application: 'Empty page dictionary received'. Retrying connection
[RemoteDebugger] Current applications available:
[RemoteDebugger]     Application: "PID:41591"
[RemoteDebugger]         id: "PID:41591"
[RemoteDebugger]         isProxy: false
[RemoteDebugger]         name: "com.apple.WebKit.WebContent"
[RemoteDebugger]         bundleId: "process-com.apple.WebKit.WebContent"
[RemoteDebugger]         hostId: undefined
[RemoteDebugger]         isActive: true
[RemoteDebugger]         isAutomationEnabled: "Unknown"
[RemoteDebugger]     Application: "PID:41592"
[RemoteDebugger]         id: "PID:41592"
[RemoteDebugger]         isProxy: false
[RemoteDebugger]         name: "com.apple.WebKit.Networking"
[RemoteDebugger]         bundleId: "process-com.apple.WebKit.Networking"
[RemoteDebugger]         hostId: undefined
[RemoteDebugger]         isActive: true
[RemoteDebugger]         isAutomationEnabled: "Unknown"
[RemoteDebugger]     Application: "PID:41589"
[RemoteDebugger]         id: "PID:41589"
[RemoteDebugger]         isProxy: false
[RemoteDebugger]         name: "Zetadocs.Approval.Mobile.iOS"
[RemoteDebugger]         bundleId: "process-Zetadocs.Approval.Mobile.iOS"
[RemoteDebugger]         hostId: undefined
[RemoteDebugger]         isActive: true
[RemoteDebugger]         isAutomationEnabled: "Unknown"
[RemoteDebugger] Checking for bundle identifiers: com.apple.WebKit.WebContent, process-com.apple.WebKit.WebContent, process-SafariViewService, com.apple.SafariViewService, *, com.zetadocs.expenses
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'com.apple.WebKit.WebContent'
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'process-com.apple.WebKit.WebContent'
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'process-SafariViewService'
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'com.apple.SafariViewService'
[RemoteDebugger] Found app id key 'PID:41591' for bundle '*'
[RemoteDebugger] Found app id key 'PID:41591' for bundle 'com.zetadocs.expenses'
[RemoteDebugger] Trying out the possible app ids: PID:41591 (try #1 of 20)
[RemoteDebugger] Attempting app 'PID:41591'
[RemoteDebugger] Sending '_rpc_forwardGetListing:' message to app 'PID:41591' (id: 378): 'connectToApp'
[RemoteDebugger] Received response from send (id: 378): '["PID:41591",{}]'
[RemoteDebugger] Sending to Web Inspector took 1ms
[RemoteDebugger] Empty page dictionary received
[RemoteDebugger] Error checking application: 'Empty page dictionary received'. Retrying connection
[RemoteDebugger] Could not connect to a valid app after 20 tries.
[XCUITest] No available web pages: Could not connect to a valid app after 20 tries.
[XCUITest] No web frames found.
[XCUITest] {}
[WD Proxy] Matched '/session/35db46e3-9aab-48f8-afe5-d6e11abe8ff1' to command name 'deleteSession'
[WD Proxy] Proxying [DELETE /session/35db46e3-9aab-48f8-afe5-d6e11abe8ff1] to [DELETE http://127.0.0.1:8100/session/2DAE2402-0733-43DC-A98E-1CDD488A2CA4] with no body
[WD Proxy] Got response with status 200: {"value":null,"sessionId":null}
[DevCon Factory] Releasing connections for 0B2392E0-F3A7-4860-8E01-98C2B43EE6C9 device on any port number
[DevCon Factory] Found cached connections to release: ["0B2392E0-F3A7-4860-8E01-98C2B43EE6C9:8100"]
[DevCon Factory] Cached connections count: 0
[XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[XCUITest] Found a remote debugger session. Removing...
[RemoteDebugger] Disconnecting from remote debugger
[RemoteDebugger] Cleaning up listeners
[IOSSimulatorLog] Stopping iOS log capture
[BaseDriver] Event 'newSessionStarted' logged at 1664949451836 (11:27:31 GMT+0530 (India Standard Time))
[W3C] Encountered internal error running command: Error: Could not navigate to webview; there are none!
[W3C]     at spinHandles (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:161:13)
[W3C]     at spinHandles (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:168:14)
[W3C]     at spinHandles (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:168:14)
[W3C]     at spinHandles (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:168:14)
[W3C]     at spinHandles (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:168:14)
[W3C]     at spinHandles (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:168:14)
[W3C]     at spinHandles (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:168:14)
[W3C]     at spinHandles (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:168:14)
[W3C]     at spinHandles (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:168:14)
[W3C]     at XCUITestDriver.navToViewWithTitle (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:186:3)
[W3C]     at XCUITestDriver.navToInitialWebview (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/commands/context.js:222:5)
[W3C]     at XCUITestDriver.start (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:528:7)
[W3C]     at XCUITestDriver.createSession (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:262:7)
[W3C]     at AppiumDriver.createSession (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/lib/appium.js:387:35)
[HTTP] <-- POST /wd/hub/session 500 95464 ms - 677
[HTTP] 

Can anyone please help on this issue?

【问题讨论】:

  • 请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如它目前所写的那样,很难准确地说出你在问什么。
  • 问题:每当我使用 XCUITest 驱动程序和 appium 1.22.0 测试在 iphone 13 Pro Max 模拟器上启动我的测试套件时,随机失败并出现错误“处理命令时发生未知的服务器端错误。原始错误:无法导航到 webview ; 没有了”。我注意到运行测试的是应用程序启动并因上述错误而失败。
  • 请查看附加的 appium 日志以获取更多信息。

标签: ios webview appium hybrid-mobile-app simulator


【解决方案1】:

我有同样的问题,我通过激活 Safari Web-Inspector 解决了它。

设置 -> Safari -> 高级 -> Web Inspector

希望这对你有用 :)

【讨论】:

    猜你喜欢
    • 2017-10-21
    • 2019-01-03
    • 2020-03-23
    • 2020-06-04
    • 2017-01-24
    • 2021-04-01
    • 1970-01-01
    • 2022-10-06
    • 1970-01-01
    相关资源
    最近更新 更多