求助:测试mumu模拟器的浏览器,打开后,异常退出

[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8001/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.browser","androidActivity":"com.android.browser.BrowserActivity","androidDeviceSerial":"127.0.0.1:7555"},"loggingPrefs":{"browser":"ALL"}}}
[Chromedriver] [STDERR] [0.518][INFO]: COMMAND InitSession {
[Chromedriver] [STDERR]    "desiredCapabilities": {
[Chromedriver] [STDERR]       "chromeOptions": {
[Chromedriver] [STDERR]          "androidActivity": "com.android.browser.BrowserActivity",
[Chromedriver] [STDERR]          "androidDeviceSerial": "127.0.0.1:7555",
[Chromedriver] [STDERR]          "androidPackage": "com.android.browser"
[Chromedriver] [STDERR]       },
[Chromedriver] [STDERR]       "loggingPrefs": {
[Chromedriver] [STDERR]          "browser": "ALL"
[Chromedriver] [STDERR]       }
[Chromedriver] [STDERR]    }
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [0.518][DEBUG]: Sending adb command: host:devices
[Chromedriver] [STDERR] [0.519][DEBUG]: Received adb response: 127.0.0.1:7555   device
[Chromedriver] [STDERR] emulator-5554   offline
[Chromedriver] [STDERR] [0.519][DEBUG]: Sending adb command: host:transport:127.0.0.1:7555|shell:pm path com.android.browser
[Chromedriver] [STDERR] [0.667][DEBUG]: Received adb response: package:/system/app/Browser/Browser.apk
[Chromedriver] [STDERR] [0.667][DEBUG]: Sending adb command: host:transport:127.0.0.1:7555|shell:pm clear com.android.browser
[Chromedriver] [STDERR] [0.822][DEBUG]: Received adb response: Success
[Chromedriver] [STDERR] [0.822][DEBUG]: Sending adb command: host:transport:127.0.0.1:7555|shell:am start -W -n com.android.browser/com.android.browser.BrowserActivity -d data:,
[Chromedriver] [STDERR] [2.631][DEBUG]: Received adb response: Starting: Intent { dat=data:, cmp=com.android.browser/.BrowserActivity }
[Chromedriver] [STDERR] Status: ok
[Chromedriver] [STDERR] Activity: com.android.browser/.BrowserActivity
[Chromedriver] [STDERR] ThisTime: 1425
[Chromedriver] [STDERR] TotalTime: 1425
[Chromedriver] [STDERR] WaitTime: 1443
[Chromedriver] [STDERR] Complete
[Chromedriver] [STDERR] [2.631][DEBUG]: Sending adb command: host:transport:127.0.0.1:7555|shell:ps
[Chromedriver] [STDERR] [2.651][DEBUG]: Received adb response: USER      PID   PPID  VSIZE  RSS   WCHAN              PC  NAME
[Chromedriver] [STDERR] root      1     0     4572   1340           0 00004d816a S /init
[Chromedriver] [STDERR] root      2     0     0      0              0 0000000000 S kthreadd
[Chromedriver] [STDERR] root      3     2     0      0              0 0000000000 S ksoftirqd/0
[Chromedriver] [STDERR] root      13    2     0      0              0 0000000000 S migration/0
[Chromedriver] [STDERR] root      14    2     0      0              0 0000000000 S migration/1
[Chromedriver] [STDERR] root      15    2     0      0              0 0000000000 S ksoftirqd/1
[Chromedriver] [STDERR] root      21    2     0      0              0 0000000000 S migration/2
[Chromedriver] [STDERR] root      22    2     0      0              0 0000000000 S ksoftirqd/2
[Chromedriver] [STDERR] root      28    2     0      0              0 0000000000 S khelper
[Chromedriver] [STDERR] root      29    2     0      0              0 0000000000 S perf
[Chromedriver] [STDERR] root      30    2     0      0              0 0000000000 S writeback
[Chromedriver] [STDERR] root      31    2     0      0              0 0000000000 S ksmd
[Chromedriver] [STDERR] root      33    2     0      0              0 0000000000 S crypto
[Chromedriver] [STDERR] root      34    2     0      0              0 0000000000 S kintegrityd
[Chromedriver] [STDERR] root      35    2     0      0              0 0000000000 S bioset
[Chromedriver] [STDERR] root      36    2     0      0              0 0000000000 S kblockd
[Chromedriver] [STDERR] root      37    2     0      0              0 0000000000 S ata_sff
[Chromedriver] [STDERR] root      38    2     0      0              0 0000000000 S kswapd0
[Chromedriver] [STDERR] root      39    2     0      0              0 0000000000 S kpclimitd
[Chromedriver] [STDERR] root      40    2     0      0              0 0000000000 S fsnotify_mark
[Chromedriver] [STDERR] root      55    2     0      0              0 0000000000 S acpi_thermal_pm
[Chromedriver] [STDERR] root      58    2     0      0              0 0000000000 S kloopd
[Chromedriver] [STDERR] root      64    2     0      0              0 0000000000 S dm_bufio_cache
[Chromedriver] [STDERR] root      65    2     0      0              0 0000000000 S binder
[Chromedriver] [STDERR] root      66    2     0      0              0 0000000000 S ipv6_addrconf
[Chromedriver] [STDERR] root      67    2     0      0              0 0000000000 S krfcommd
[Chromedriver] [STDERR] root      68    2     0      0              0 0000000000 S deferwq
[Chromedriver] [STDERR] root      92    2     0      0              0 0000000000 S jbd2/sda6-8
[Chromedriver] [STDERR] root      93    2     0      0              0 0000000000 S ext4-rsv-conver
[Chromedriver] [STDERR] root      107   2     0      0              0 0000000000 S jbd2/sdb3-8
[Chromedriver] [STDERR] root      108   2     0      0              0 0000000000 S ext4-rsv-conver
[Chromedriver] [STDERR] root      115   2     0      0              0 0000000000 S iprt-NemuWQueue
[Chromedriver] [STDERR] root      131   2     0      0              0 0000000000 S jbd2/sdb1-8
[Chromedriver] [STDERR] root      132   2     0      0              0 0000000000 S ext4-rsv-conver
[Chromedriver] [STDERR] root      137   1     4052   1112           0 00004c0c9a S /sbin/ueventd
[Chromedriver] [STDERR] root      139   137   4052   216            0 00004c0c9a S /sbin/ueventd
[Chromedriver] [STDERR] logd      143   1     16096  4004           0 7fc2cfc8fe97 S /system/bin/logd
[Chromedriver] [STDERR] root      252   1     5448   364            0 7f2a839392da S /system/bin/VBoxShell
[Chromedriver] [STDERR] root      253   252   6292   856            0 7f24bb622d77 S nemuVM-nemu-control
[Chromedriver] [STDERR] root      254   1     14784  876            0 7f340546d9b7 S /system/bin/vold
[Chromedriver] [STDERR] root      280   1     5304   200            0 7f26604f1dba S /system/bin/logwrapper
[Chromedriver] [STDERR] root      281   280   5352   376            0 7fd71648cad7 S /system/bin/virtual_shell
[Chromedriver] [STDERR] root      282   281   6292   860            0 7f23ef283d77 S nemuVM-nemu-control
[Chromedriver] [STDERR] root      287   1     4452   880            0 0000458f1a S /sbin/healthd
[Chromedriver] [STDERR] root      288   1     9892   1108           0 0000443cca S /sbin/adbd
[Chromedriver] [STDERR] root      289   1     6040   264            0 7f306ea4ac3a S /system/bin/lmkd
[Chromedriver] [STDERR] system    290   1     6092   256            0 7f1fd0ec7d77 S /system/bin/servicemanager
[Chromedriver] [STDERR] root      291   1     42760  1740           0 7f9866497c3a S /system/bin/surfaceflinger
[Chromedriver] [STDERR] root      292   1     5336   332            0 7f717c2b9b5a S /system/bin/ntp_server
[Chromedriver] [STDERR] root      293   1     5452   348            0 7fd65c98bad7 S /system/bin/vinput
[Chromedriver] [STDERR] root      294   1     5448   1112           0 7f040dcf19b7 S /system/bin/local_gps
[Chromedriver] [STDERR] root      295   1     8924   208            0 7efd86823dda S /system/bin/local_camera_back
[Chromedriver] [STDERR] root      306   1     18016  1572           0 7fdd39fc19b7 S /system/bin/netd
[Chromedriver] [STDERR] root      307   1     4240   228            0 00f7506ff3 S /system/bin/debuggerd
[Chromedriver] [STDERR] root      308   1     6132   464            0 7f7d19939bba S /system/bin/debuggerd64
[Chromedriver] [STDERR] root      309   1     6616   1200           0 7fb314cdd9b7 S /system/bin/rild
[Chromedriver] [STDERR] drm       310   1     16432  888            0 00f7402256 S /system/bin/drmserver
[Chromedriver] [STDERR] media     311   1     99548  4396           0 00f6f54256 S /system/bin/mediaserver
[Chromedriver] [STDERR] root      312   1     5828   532            0 7f50f6be3ad7 S /system/bin/installd
[Chromedriver] [STDERR] keystore  313   1     9924   676            0 7f0807a15d77 S /system/bin/keystore
[Chromedriver] [STDERR] root      315   1     1522668 22304          0 7f4f2fc85dba S zygote64
[Chromedriver] [STDERR] root      316   1     1510072 10160          0 00f7358350 S zygote
[Chromedriver] [STDERR] system    317   1     9332   1352           0 7f66ad9cad77 S /system/bin/gatekeeperd
[Chromedriver] [STDERR] root      318   1     5448   432            0 7fbb1ec59dba S /system/bin/powerbtnd
[Chromedriver] [STDERR] root      320   1     7608   768            0 7fc1d303e9b7 S /system/bin/opengl-gc
[Chromedriver] [STDERR] root      324   1     3632   144            0 00004b0d2a S /system/xbin/mu_bak
[Chromedriver] [STDERR] root      335   1     6900   424            0 7f350f0b5eba S /system/bin/nemuVM-nemu-service
[Chromedriver] [STDERR] system    709   315   1765492 63056          0 7f4f2fc85c3a S system_server
[Chromedriver] [STDERR] u0_a10    803   315   1616004 62000          0 7f4f2fc85c3a S com.android.systemui
[Chromedriver] [STDERR] u0_a34    890   315   1552728 24240          0 7f4f2fc85c3a S io.appium.settings
[Chromedriver] [STDERR] u0_a4     990   315   1553464 20448          0 7f4f2fc85c3a S android.process.media
[Chromedriver] [STDERR] wifi      1024  1     10632  704            0 7f5788718dda S /system/bin/wpa_supplicant
[Chromedriver] [STDERR] u0_a2     1030  315   1553980 26260          0 7f4f2fc85c3a S android.process.acore
[Chromedriver] [STDERR] u0_a1     1348  315   1548368 18352          0 7f4f2fc85c3a S com.android.providers.calendar
[Chromedriver] [STDERR] u0_a19    1893  315   1552096 21880          0 7f4f2fc85c3a S com.android.documentsui
[Chromedriver] [STDERR] u0_a3     1906  315   1537180 21564          0 7f4f2fc85c3a S com.android.defcontainer
[Chromedriver] [STDERR] u0_a5     1924  315   1548216 20116          0 7f4f2fc85c3a S com.android.externalstorage
[Chromedriver] [STDERR] root      12148 288   5772   1996           0 7fbc24bcfb5a S logcat
[Chromedriver] [STDERR] root      12198 288   1372180 31344          0 7f7020a1dec8 S app_process
[Chromedriver] [STDERR] u0_a35    12209 315   1566996 45680          0 7f4f2fc85c3a S io.appium.uiautomator2.server
[Chromedriver] [STDERR] u0_a14    12270 315   2175728 136220          0 7f4f2fc85d77 D com.android.browser
[Chromedriver] [STDERR] root      12333 288   5848   1660           0 7f43fcd73ad7 R ps
[debug] [Chromedriver] Webview version: 'Chrome/61.0.3163.98'
[Chromedriver] [STDERR] [2.651][DEBUG]: Sending adb command: host-serial:127.0.0.1:7555:forward:tcp:12922;localabstract:webview_devtools_remote_12270
[Chromedriver] [STDERR] [2.652][DEBUG]: DevTools request: http://127.0.0.1:12922/json/version
[Chromedriver] [STDERR] [2.659][DEBUG]: DevTools response: {
[Chromedriver] [STDERR]    "Android-Package": "com.android.browser",
[Chromedriver] [STDERR]    "Browser": "Chrome/61.0.3163.98",
[Chromedriver] [STDERR]    "Protocol-Version": "1.2",
[Chromedriver] [STDERR]    "User-Agent": "Mozilla/5.0 (Linux; Android 6.0.1; MuMu Build/V417IR; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36",
[Chromedriver] [STDERR]    "V8-Version": "6.1.534.39",
[Chromedriver] [STDERR]    "WebKit-Version": "537.36 (@c614090823f0480bda8ea6f6a13260edf591b115)"
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [2.659][DEBUG]: DevTools request: http://127.0.0.1:12922/json
[Chromedriver] [STDERR] [2.668][DEBUG]: DevTools response: [ {
[Chromedriver] [STDERR]    "description": "{\"attached\":true,\"empty\":false,\"height\":485,\"screenX\":0,\"screenY\":91,\"visible\":true,\"width\":1024}",
[Chromedriver] [STDERR]    "devtoolsFrontendUrl": "http://chrome-devtools-frontend.appspot.com/serve_rev/@c614090823f0480bda8ea6f6a13260edf591b115/inspector.html?ws=127.0.0.1:12922/devtools/page/dbd3ff34-fd36-404b-baa1-5005e6cf0091",
[Chromedriver] [STDERR]    "id": "dbd3ff34-fd36-404b-baa1-5005e6cf0091",
[Chromedriver] [STDERR]    "title": "mumu.163.com/mhome.html",
[Chromedriver] [STDERR]    "type": "page",
[Chromedriver] [STDERR]    "url": "http://mumu.163.com/mhome.html",
[Chromedriver] [STDERR]    "webSocketDebuggerUrl": "ws://127.0.0.1:12922/devtools/page/dbd3ff34-fd36-404b-baa1-5005e6cf0091"
[Chromedriver] [STDERR] } ]
[Chromedriver] [STDERR] [2.668][DEBUG]: DevTools request: http://127.0.0.1:12922/json
[Chromedriver] [STDERR] [2.672][DEBUG]: DevTools response: [ {
[Chromedriver] [STDERR]    "description": "{\"attached\":true,\"empty\":false,\"height\":485,\"screenX\":0,\"screenY\":91,\"visible\":true,\"width\":1024}",
[Chromedriver] [STDERR]    "devtoolsFrontendUrl": "http://chrome-devtools-frontend.appspot.com/serve_rev/@c614090823f0480bda8ea6f6a13260edf591b115/inspector.html?ws=127.0.0.1:12922/devtools/page/dbd3ff34-fd36-404b-baa1-5005e6cf0091",
[Chromedriver] [STDERR]    "id": "dbd3ff34-fd36-404b-baa1-5005e6cf0091",
[Chromedriver] [STDERR]    "title": "mumu.163.com/mhome.html",
[Chromedriver] [STDERR]    "type": "page",
[Chromedriver] [STDERR]    "url": "http://mumu.163.com/mhome.html",
[Chromedriver] [STDERR]    "webSocketDebuggerUrl": "ws://127.0.0.1:12922/devtools/page/dbd3ff34-fd36-404b-baa1-5005e6cf0091"
[Chromedriver] [STDERR] } ]
[Chromedriver] [STDERR] [2.680][DEBUG]: DEVTOOLS COMMAND Console.enable (id=1) {
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [2.680][DEBUG]: DEVTOOLS COMMAND DOM.getDocument (id=2) {
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [2.680][DEBUG]: DEVTOOLS COMMAND Runtime.enable (id=3) {
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [2.681][DEBUG]: DEVTOOLS COMMAND Page.enable (id=4) {
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [2.681][DEBUG]: DEVTOOLS COMMAND Page.enable (id=5) {
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [2.691][DEBUG]: DEVTOOLS RESPONSE Console.enable (id=1) {
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [2.692][DEBUG]: DEVTOOLS RESPONSE DOM.getDocument (id=2) {
[Chromedriver] [STDERR]    "root": {
[Chromedriver] [STDERR]       "backendNodeId": 2,
[Chromedriver] [STDERR]       "baseURL": "http://mumu.163.com/mhome.html",
[Chromedriver] [STDERR]       "childNodeCount": 2,
[Chromedriver] [STDERR]       "children": [ {
[Chromedriver] [STDERR]          "backendNodeId": 3,
[Chromedriver] [STDERR]          "localName": "",
[Chromedriver] [STDERR]          "nodeId": 2,
[Chromedriver] [STDERR]          "nodeName": "html",
[Chromedriver] [STDERR]          "nodeType": 10,
[Chromedriver] [STDERR]          "nodeValue": "",
[Chromedriver] [STDERR]          "parentId": 1,
[Chromedriver] [STDERR]          "publicId": "",
[Chromedriver] [STDERR]          "systemId": ""
[Chromedriver] [STDERR]       }, {
[Chromedriver] [STDERR]          "attributes": [  ],
[Chromedriver] [STDERR]          "backendNodeId": 4,
[Chromedriver] [STDERR]          "childNodeCount": 1,
[Chromedriver] [STDERR]          "children": [ {
[Chromedriver] [STDERR]             "attributes": [  ],
[Chromedriver] [STDERR]             "backendNodeId": 5,
[Chromedriver] [STDERR]             "childNodeCount": 21,
[Chromedriver] [STDERR]             "localName": "head",
[Chromedriver] [STDERR]             "nodeId": 4,
[Chromedriver] [STDERR]             "nodeName": "HEAD",
[Chromedriver] [STDERR]             "nodeType": 1,
[Chromedriver] [STDERR]             "nodeValue": "",
[Chromedriver] [STDERR]             "parentId": 3
[Chromedriver] [STDERR]          } ],
[Chromedriver] [STDERR]          "frameId": "12270.1",
[Chromedriver] [STDERR]          "localName": "html",
[Chromedriver] [STDERR]          "nodeId": 3,
[Chromedriver] [STDERR]          "nodeName": "HTML",
[Chromedriver] [STDERR]          "nodeType": 1,
[Chromedriver] [STDERR]          "nodeValue": "",
[Chromedriver] [STDERR]          "parentId": 1
[Chromedriver] [STDERR]       } ],
[Chromedriver] [STDERR]       "documentURL": "http://mumu.163.com/mhome.html",
[Chromedriver] [STDERR]       "localName": "",
[Chromedriver] [STDERR]       "nodeId": 1,
[Chromedriver] [STDERR]       "nodeName": "#document",
[Chromedriver] [STDERR]       "nodeType": 9,
[Chromedriver] [STDERR]       "nodeValue": "",
[Chromedriver] [STDERR]       "xmlVersion": ""
[Chromedriver] [STDERR]    }
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [2.692][DEBUG]: DEVTOOLS EVENT Runtime.executionContextCreated {
[Chromedriver] [STDERR]    "context": {
[Chromedriver] [STDERR]       "auxData": {
[Chromedriver] [STDERR]          "frameId": "12270.1",
[Chromedriver] [STDERR]          "isDefault": true
[Chromedriver] [STDERR]       },
[Chromedriver] [STDERR]       "id": 1,
[Chromedriver] [STDERR]       "name": "",
[Chromedriver] [STDERR]       "origin": "http://mumu.163.com"
[Chromedriver] [STDERR]    }
[Chromedriver] [STDERR] }
[Chromedriver] [STDERR] [2.692][DEBUG]: Sending adb command: host:transport:127.0.0.1:7555|shell:am force-stop com.android.browser
[Chromedriver] [STDERR] [3.483][DEBUG]: Received adb response:
[debug] [WD Proxy] Got response with status 200: {"sessionId":"39e0431b07c07c40f2eb2691ee33eba4","status":33,"value":{"message":"session not created exception\nfrom unknown error: Runtime.executionContextCreated has invalid 'context': {\"auxData\":{\"frameId\":\"12270.1\",\"isDefault\":true},\"id\":1,\"name\":\"\",\"origin\":\"http://mumu.163.com\"}\n  (Session info: chrome=61.0.3163.98)\n  (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64)"}}
[WD Proxy] Determined the downstream protocol as 'MJSONWP'
[debug] [MJSONWP] Matched JSONWP error code 33 to SessionNotCreatedError
[debug] [Chromedriver] SessionNotCreatedError: A new session could not be created. Details: session not created exception
[debug] [Chromedriver] from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"12270.1","isDefault":true},"id":1,"name":"","origin":"http://mumu.163.com"}
[debug] [Chromedriver]   (Session info: chrome=61.0.3163.98)
[debug] [Chromedriver]   (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64)
[debug] [Chromedriver]     at errorFromMJSONWPStatusCode (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:764:12)
[debug] [Chromedriver]     at ProxyRequestError.getActualError (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:661:14)
[debug] [Chromedriver]     at JWProxy.command (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:273:19)
[debug] [Chromedriver]     at runMicrotasks (<anonymous>)
[debug] [Chromedriver]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
[Chromedriver] [STDERR] [3.483][INFO]: RESPONSE InitSession session not created exception
[Chromedriver] [STDERR] from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"12270.1","isDefault":true},"id":1,"name":"","origin":"http://mumu.163.com"}
[Chromedriver] [STDERR]   (Session info: chrome=61.0.3163.98)
[Chromedriver] [STDERR] [3.483][DEBUG]: Log type 'driver' lost 0 entries on destruction
[Chromedriver] [STDERR] [3.483][DEBUG]: Log type 'browser' lost 0 entries on destruction
[Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [Chromedriver] Changed state to 'stopped'
[Chromedriver] A new session could not be created. Details: session not created exception
[Chromedriver] from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"12270.1","isDefault":true},"id":1,"name":"","origin":"http://mumu.163.com"}
[Chromedriver]   (Session info: chrome=61.0.3163.98)
[Chromedriver]   (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64)
[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://127.0.0.1:8200/wd/hub/session/e6d30db9-3408-4a98-80cb-c7299492726a] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"e6d30db9-3408-4a98-80cb-c7299492726a","value":null}
[debug] [UiAutomator2] Resetting IME to 'com.netease.nemu_vinput.nemu/com.android.inputmethodcommon.SoftKeyboard'
[debug] [ADB] Running 'D:\testtools\Android_sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell ime set com.netease.nemu_vinput.nemu/com.android.inputmethodcommon.SoftKeyboard'
[debug] [Instrumentation] .
[debug] [Instrumentation] Time: 8.05
[debug] [Instrumentation]
[debug] [Instrumentation] OK (1 test)
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running 'D:\testtools\Android_sdk\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 forward --remove tcp:8200'
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1659164966315 (15:09:26 GMT+0800 (GMT+08:00))
[debug] [W3C] Encountered internal error running command: Error: A new session could not be created. Details: session not created exception
[debug] [W3C] from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"12270.1","isDefault":true},"id":1,"name":"","origin":"http://mumu.163.com"}
[debug] [W3C]   (Session info: chrome=61.0.3163.98)
[debug] [W3C]   (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64)
[debug] [W3C]     at Object.errorAndThrow (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:94:35)
[debug] [W3C]     at Chromedriver.start (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-chromedriver\lib\chromedriver.js:540:11)
[debug] [W3C]     at AndroidUiautomator2Driver.setupNewChromedriver (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\lib\commands\context.js:440:3)
[debug] [W3C]     at AndroidUiautomator2Driver.startChromeSession (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\lib\commands\context.js:294:23)
[debug] [W3C]     at AndroidUiautomator2Driver.startUiAutomator2Session (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:420:7)
[debug] [W3C]     at AndroidUiautomator2Driver.createSession (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:224:7)
[debug] [W3C]     at AppiumDriver.createSession (C:\Users\Administrator\AppData\Roaming\npm\node_modules\appium\lib\appium.js:366:35)
[debug] [W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 12425 ms - 1425
[HTTP]

pycharm脚本那边有报什么错不

这个错误貌似是第一次遇到。用这个命令看下底层日志

adb logcat -s appium:*

另外在capability里打开 showChromedriverLog = true 开关

代码中指定下chromedriver的版本试下

$ adb logcat -s appium:*
--------- beginning of system
--------- beginning of main
08-02 20:29:34.342  1973  1987 I appium  : [AppiumUiAutomator2Server] Starting S
erver
08-02 20:29:35.349  1973  1987 I appium  : Starting MJPEG Server
08-02 20:29:35.369  1973  1987 I appium  : MJPEG Server started
08-02 20:29:35.371  1973  1989 I appium  : ServerSocket created on port 7810
08-02 20:29:35.397  1973  1987 I appium  : AndroidServer created on port 6790
08-02 20:29:35.397  1973  1987 I appium  : io.appium.uiautomator2.server started
08-02 20:29:35.880  1973  1994 I appium  : NewSession command
08-02 20:29:35.883  1973  1994 I appium  : Created the new session with SessionID: eb37c072-cb1e-424e-b3ae-2049b6bee7ec
08-02 20:29:35.885  1973  1994 I appium  : AppiumResponse: {"sessionId":"eb37c072-cb1e-424e-b3ae-2049b6bee7ec","value":{"capabilities
":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":fals
e,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"pl…
08-02 20:29:35.897  1973  1994 I appium  : channel read: GET /wd/hub/session/eb37c072-cb1e-424e-b3ae-2049b6bee7ec/appium/device/info
08-02 20:29:35.897  1973  1994 I appium  : GetDeviceInfo command
08-02 20:29:35.907  1973  1994 I appium  : AppiumResponse: {"sessionId":"eb37c072-cb1e-424e-b3ae-2049b6bee7ec","value":{"androidId":"
5dbbde02a543d450","apiVersion":"23","bluetooth":{"state":"OFF"},"brand":"Xiaomi","carrierName":"中国移动","displayDensity":192,"local
e":"zh_CN","manufacturer":"Xiaomi","model":"MI 6","networks":[{"capabilities":{"SSID":null,"linkD…
08-02 20:29:42.261  1973  1994 I appium  : channel read: DELETE /wd/hub/session/eb37c072-cb1e-424e-b3ae-2049b6bee7ec
08-02 20:29:42.262  1973  1994 I appium  : DeleteSession command
08-02 20:29:42.262  1973  1994 I appium  : Stopping uiautomator2 io.appium.uiautomator2.http io.appium.uiautomator2.server
08-02 20:29:42.265  1973  1994 I appium  : AppiumResponse: {"sessionId":"eb37c072-cb1e-424e-b3ae-2049b6bee7ec","value":null}

问题已经解决了,就是chrome和chromedriver的版本不匹配,61.0.3163.98chrome 不能用
2.20的,得用2.32的chromedriver版本