请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

打开分享链接后,定位标题

[debug] [AndroidDriver] Found webviews: [“WEBVIEW_unknown”]
[debug] [AndroidDriver] Available contexts: [“NATIVE_APP”,“WEBVIEW_unknown”]
[debug] [AndroidDriver] Connecting to chrome-backed webview context ‘WEBVIEW_unknown’
[debug] [AndroidDriver] A port was not given, using random free port: 8000
[debug] [AndroidDriver] Before starting chromedriver, androidPackage is com.tencent.mm
[debug] [Chromedriver] Changed state to ‘starting’
[Chromedriver] Set chromedriver binary as: D:\tools\chromedriver.exe
[debug] [Chromedriver] Killing any old chromedrivers, running: wmic process where “commandline like ‘%chromedriver.exe%–port=8000%’” delete
[debug] [Chromedriver] Successfully cleaned up old chromedrivers
[debug] [Chromedriver] Cleaning any old adb forwarded port socket connections
[debug] [ADB] List forwarding ports
[debug] [ADB] Running ‘D:\android-sdk-windows\platform-tools\adb.exe -P 5037 -s NSRBB19429205927 forward --list’
[debug] [ADB] Removing forwarded port socket connection: 12643
[debug] [ADB] Running ‘D:\android-sdk-windows\platform-tools\adb.exe -P 5037 -s NSRBB19429205927 forward --remove tcp:12643’
[Chromedriver] Spawning chromedriver with: D:\tools\chromedriver.exe --url-base=wd/hub --port=8000 --adb-port=5037 --verbose
[debug] [Chromedriver] Chromedriver version: ‘2.38.552522’
[debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
[debug] [WD Proxy] Got response with status 200: “{“sessionId”:”",“status”:0,“value”:{“build”:{“version”:“alpha”},“os”:{“arch”:“x86_64”,“name”:“Windows NT”,“version”:“10.0.18363”}}}"
[debug] [WD Proxy] Determined that the downstream protocol for proxy is MJSONWP
[debug] [WD Proxy] Matched ‘/session’ to command name ‘createSession’
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.tencent.mm”,“androidUseRunningApp”:true,“androidProcess”:“com.tencent.mm:tools”,“androidDeviceSerial”:“NSRBB19429205927”},“loggingPrefs”:{“browser”:“ALL”}}}
[debug] [Chromedriver] Webview version: ‘Chrome/77.0.3865.120’
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“a847bdfcd04cc3087c74eaebac77d190”,“status”:13,“value”:{“message”:“unknown error: unable to discover open pages\n (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)”}}
[WD Proxy] Got an unexpected response: {“sessionId”:“a847bdfcd04cc3087c74eaebac77d190”,“status”:13,“value”:{“message”:“unknown error: unable to discover open pages\n (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)”}}
[debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: unknown error: unable to discover open pages
[Chromedriver] (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)
[Chromedriver] at Object.wrappedLogger.errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:78:13)
[Chromedriver] at errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\lib\chromedriver.js:493:13)
[debug] [WD Proxy] Matched ‘/session’ to command name ‘createSession’
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.tencent.mm”,“androidUseRunningApp”:true,“androidProcess”:“com.tencent.mm:tools”,“androidDeviceSerial”:“NSRBB19429205927”},“loggingPrefs”:{“browser”:“ALL”}}}
[debug] [Chromedriver] Webview version: ‘Chrome/77.0.3865.120’
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“ff7d2c6634ead6c3a98cf641e0c88783”,“status”:13,“value”:{“message”:“unknown error: unable to discover open pages\n (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)”}}
[WD Proxy] Got an unexpected response: {“sessionId”:“ff7d2c6634ead6c3a98cf641e0c88783”,“status”:13,“value”:{“message”:“unknown error: unable to discover open pages\n (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)”}}
[debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: unknown error: unable to discover open pages
[Chromedriver] (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)
[Chromedriver] at Object.wrappedLogger.errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:78:13)
[Chromedriver] at errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\lib\chromedriver.js:493:13)
[debug] [WD Proxy] Matched ‘/session’ to command name ‘createSession’
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.tencent.mm”,“androidUseRunningApp”:true,“androidProcess”:“com.tencent.mm:tools”,“androidDeviceSerial”:“NSRBB19429205927”},“loggingPrefs”:{“browser”:“ALL”}}}
[debug] [Chromedriver] Webview version: ‘Chrome/77.0.3865.120’
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“5e10e174cf7ea5d0d81663d5f200e738”,“status”:13,“value”:{“message”:“unknown error: unable to discover open pages\n (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)”}}
[WD Proxy] Got an unexpected response: {“sessionId”:“5e10e174cf7ea5d0d81663d5f200e738”,“status”:13,“value”:{“message”:“unknown error: unable to discover open pages\n (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)”}}
[debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: unknown error: unable to discover open pages
[Chromedriver] (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)
[Chromedriver] at Object.wrappedLogger.errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:78:13)
[Chromedriver] at errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\lib\chromedriver.js:493:13)
[debug] [WD Proxy] Matched ‘/session’ to command name ‘createSession’
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.tencent.mm”,“androidUseRunningApp”:true,“androidProcess”:“com.tencent.mm:tools”,“androidDeviceSerial”:“NSRBB19429205927”},“loggingPrefs”:{“browser”:“ALL”}}}
[debug] [Chromedriver] Webview version: ‘Chrome/77.0.3865.120’
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“37fbf6365f84af5636b88a00fa8855c1”,“status”:13,“value”:{“message”:“unknown error: unable to discover open pages\n (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)”}}
[WD Proxy] Got an unexpected response: {“sessionId”:“37fbf6365f84af5636b88a00fa8855c1”,“status”:13,“value”:{“message”:“unknown error: unable to discover open pages\n (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)”}}
[debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: unknown error: unable to discover open pages
[Chromedriver] (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)
[Chromedriver] at Object.wrappedLogger.errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:78:13)
[Chromedriver] at errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\lib\chromedriver.js:493:13)
[Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [Chromedriver] Changed state to ‘stopped’
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: unknown error: unable to discover open pages
[Chromedriver] (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)
[Chromedriver] at Object.wrappedLogger.errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:78:13)
[Chromedriver] at Chromedriver.errorAndThrow [as start] (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\lib\chromedriver.js:441:11)
[debug] [W3C (bbfe3976)] Encountered internal error running command: Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: unknown error: unable to discover open pages
[debug] [W3C (bbfe3976)] (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)
[debug] [W3C (bbfe3976)] at Object.wrappedLogger.errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:78:13)
[debug] [W3C (bbfe3976)] at Chromedriver.errorAndThrow [as start] (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\lib\chromedriver.js:441:11)
[HTTP] <-- POST /wd/hub/session/bbfe3976-3da9-4eb9-88e1-74fd4c157ec8/context 500 245234 ms - 1141
[HTTP]
[HTTP] --> DELETE /wd/hub/session/bbfe3976-3da9-4eb9-88e1-74fd4c157ec8
[HTTP] {}
[debug] [W3C (bbfe3976)] Calling AppiumDriver.deleteSession() with args: [“bbfe3976-3da9-4eb9-88e1-74fd4c157ec8”]
[debug] [BaseDriver] Event ‘quitSessionRequested’ logged at 1604891060908 (11:04:20 GMT+0800 (GMT+08:00))
[Appium] Removing session bbfe3976-3da9-4eb9-88e1-74fd4c157ec8 from our master session list
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched ‘/’ to command name ‘deleteSession’
[debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://localhost:8200/wd/hub/session/c5195cef-8a32-4926-a7bf-2c1b291d32a3] with no body
[debug] [WD Proxy] Got response with status 200: “{“sessionId”:“c5195cef-8a32-4926-a7bf-2c1b291d32a3”,“status”:0,“value”:“Session deleted”}”
[debug] [UiAutomator2] Resetting IME to ‘com.baidu.input_huawei/.ImeService’
[debug] [ADB] Running ‘D:\android-sdk-windows\platform-tools\adb.exe -P 5037 -s NSRBB19429205927 shell ime set com.baidu.input_huawei/.ImeService’
[debug] [Instrumentation] .
[debug] [Instrumentation] Time: 390.318

[debug] [Instrumentation]

[debug] [Instrumentation] OK (1 test)
[debug] [Instrumentation] The process has exited with code 0
[debug] [ADB] Running ‘D:\android-sdk-windows\platform-tools\adb.exe -P 5037 -s NSRBB19429205927 shell am force-stop com.tencent.mm
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running ‘D:\android-sdk-windows\platform-tools\adb.exe -P 5037 -s NSRBB19429205927 forward --remove tcp:8200’
[debug] [BaseDriver] Event ‘quitSessionFinished’ logged at 1604891062610 (11:04:22 GMT+0800 (GMT+08:00))
[debug] [W3C (bbfe3976)] Received response: null
[debug] [W3C (bbfe3976)] But deleting session, so not returning
[debug] [W3C (bbfe3976)] Responding to client with driver.deleteSession() result: null
[HTTP] <-- DELETE /wd/hub/session/bbfe3976-3da9-4eb9-88e1-74fd4c157ec8 200 1703 ms - 14
[HTTP]

老师你好,一个问题解决了,又来一个新问题,这个是微信打开连接后,切换到WEBVIEW_unknown后,去定位一个标题,然后就报错了,请问老师怎么解决呀?

正在回答 回答被采纳积分+3

1回答

Mushishi 2020-11-09 16:03:49

 Webview version: ‘Chrome/77.0.3865.120’
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“37fbf6365f84af5636b88a00fa8855c1”,“status”:13,“value”:{“message”:“unknown error: unable to discover open pages\n (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.18363 x86_64)”}}

看这个错误。看懂了就ok了。你看你chromedriver和内置webview得版本匹配不

0 回复 有任何疑惑可以回复我~
  • 提问者 纳纳酱 #1
    我理解的也是这个意思,但是我正常首页进去跑脚本都是正常的,就是链接进去报这个问题,这不是很奇怪嘛,要是不匹配,首页进去也跑不了吧?
    回复 有任何疑惑可以回复我~ 2020-11-09 16:33:07
  • Mushishi 回复 提问者 纳纳酱 #2
    你进入首页 没有用到chromedriver呀,你要到h5页面之后再操作得时候才有
    回复 有任何疑惑可以回复我~ 2020-11-10 11:31:54
  • 提问者 纳纳酱 #3
    [Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. Original error: [object Object] unknown error: Failed to forward ports to device NSRBB19429205927. No port chosen: . Perhaps your adb version is out of date. ChromeDriver 2.39 and newer require adb version 1.0.38 or newer. Run 'adb version' in your terminal of the host device to find your version of adb.
    [debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
    [Chromedriver]   (Driver info: chromedriver=77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217-refs/branch-heads/3865@{#442}),platform=Windows NT 10.0.18363 x86_64)
    [Chromedriver]     at Object.wrappedLogger.errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:78:13)
    [Chromedriver]     at errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\lib\chromedriver.js:493:13)
    [Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM  我把chromdriver换了后更不对了,首页进入就报错了,首页我也是通过微信公众号链接进入的,原来的charomdriver就是对的
    回复 有任何疑惑可以回复我~ 2020-11-12 09:55:09
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信