Open twg-group opened 4 years ago
Hi, maybe session had already closed when you tried to request info? We'll try to repeat your case.
Hi there. I've experienced same issue on two latest versions 0.5.0 and 0.4.0 while trying to run my appium tests. Everything seems to be working fine from ver. 0.3.0 to 0.3.2 tho. When upgrading to recent versions jsonwire-grid drops session after my appium node responds with:
[debug] [W3C (334de6e6)] Responding to client with driver.createSession() result: {
"capabilities": {
"platform": "LINUX",
"webStorageEnabled": false,
"takesScreenshot": true,
"javascriptEnabled": true,
"databaseEnabled": false,
"networkConnectionEnabled": true,
"locationContextEnabled": false,
"warnings": {},
"desired": {
"platformName": "Android",
"deviceName": "Mi MIX 2S",
"platformVersion": "10",
"orientation": "PORTRAIT",
"language": "en",
"locale": "US",
"automationName": "UiAutomator2",
"app": "path/to/apk",
"noReset": false,
"newCommandTimeout": 240,
"udid": "5334679f"
},
"platformName": "Android",
"deviceName": "5334679f",
"platformVersion": "10",
"orientation": "PORTRAIT",
"language": "en",
"locale": "US",
"automationName": "UiAutomator2",
"app": "path/to/apk",
"noReset": false,
"newCommandTimeout": 240,
"udid": "5334679f",
"deviceUDID": "5334679f",
"appPackage": "com.package.name",
"deviceApiLevel": 29,
"deviceScreenSize": "1080x2160",
"deviceScreenDensity": 440
}
}
At the same time jsonwire-grid debug log looks like
INFO[0042] register SessionID: 08bc8615-69cc-4c94-a9d4-15108ecc31e1 on node 127.0.0.1:4727
ERRO[0042] Panic: net/http: abort Handler
goroutine 88 [running]:
runtime/debug.Stack(0xc00059b5b8, 0x1fb53e0, 0xc000032dc0)
/usr/local/opt/go/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/qa-dev/jsonwire-grid/middleware.(*Wrap).Do.func1.1(0xc00000fc60)
/Users/mapodtserkovskiy/gopath/src/github.com/qa-dev/jsonwire-grid/middleware/wrap.go:32 +0x57
panic(0x1fb53e0, 0xc000032dc0)
/usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2
net/http/httputil.(*ReverseProxy).ServeHTTP(0xc0000d0410, 0x239d7e0, 0xc000338de0, 0xc00060c700)
/usr/local/opt/go/libexec/src/net/http/httputil/reverseproxy.go:299 +0x14c9
github.com/qa-dev/jsonwire-grid/handlers.(*CreateSession).tryCreateSession(0xc00000fce0, 0xc00060c700, 0xc000523a70, 0x13, 0xc0001aed90, 0x1)
/Users/mapodtserkovskiy/gopath/src/github.com/qa-dev/jsonwire-grid/handlers/createSession.go:92 +0x395
github.com/qa-dev/jsonwire-grid/handlers.(*CreateSession).ServeHTTP(0xc00000fce0, 0x23a37a0, 0xc000248380, 0xc00060c700)
/Users/mapodtserkovskiy/gopath/src/github.com/qa-dev/jsonwire-grid/handlers/createSession.go:60 +0x3f0
github.com/qa-dev/jsonwire-grid/middleware.(*Wrap).Do.func1(0x23a37a0, 0xc000248380, 0xc00060c700)
/Users/mapodtserkovskiy/gopath/src/github.com/qa-dev/jsonwire-grid/middleware/wrap.go:36 +0x9a
net/http.HandlerFunc.ServeHTTP(0xc00000fd00, 0x23a37a0, 0xc000248380, 0xc00060c700)
/usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44
net/http.(*ServeMux).ServeHTTP(0x2e66900, 0x23a37a0, 0xc000248380, 0xc00060c700)
/usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd
net/http.serverHandler.ServeHTTP(0xc0006142a0, 0x23a37a0, 0xc000248380, 0xc00060c700)
/usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4
net/http.(*conn).serve(0xc00014f900, 0x23a7ea0, 0xc0001330c0)
/usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875
created by net/http.(*Server).Serve
/usr/local/opt/go/libexec/src/net/http/server.go:2927 +0x38e component=middlewareWrap
INFO[0042] requested session with params: {"capabilities":{"alwaysMatch":{"platformName":"Android","deviceName":"Mi MIX 2S","platformVersion":"10","orientation":"PORTRAIT","language":"en","locale":"US","automationName":"UiAutomator2","app":"/Users/yaroslavmaistrenkov/Documents/native-app-automation-tests/apps/FavoritComUa_v.1.76.6.apk","noReset":false,"newCommandTimeout":24000,"udid":"5334679f"},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"Android","deviceName":"Mi MIX 2S","platformVersion":"10","orientation":"PORTRAIT","language":"en","locale":"US","automationName":"UiAutomator2","app":"/Users/yaroslavmaistrenkov/Documents/native-app-automation-tests/apps/FavoritComUa_v.1.76.6.apk","noReset":false,"newCommandTimeout":24000,"udid":"5334679f"}}
ERRO[0042] reserve node in storage, storage: node not found
ERRO[0042] Can't reserve available node, strategy: not found available nodes
and if we go to grid/status we see:
{
"node_list": [
{
"key": "127.0.0.1:4727",
"type": "persistent",
"address": "127.0.0.1:4727",
"status": "busy",
"session_id": "08bc8615-69cc-4c94-a9d4-15108ecc31e1",
"updated": 1599490545,
"registered": 1599490516,
"capabilities_list": [
{
"deviceName": "Mi MIX 2S",
"maxInstances": 1,
"platform": "ANDROID",
"platformName": "Android",
"platformVersion": "10"
}
]
}
],
"config": {
"logger": {
"level": "debug"
},
"db": {
"implementation": "local",
"connection": ""
},
"grid": {
"client_type": "selenium",
"port": 4444,
"strategy_list": [
{
"params": null,
"type": "persistent",
"limit": 0,
"node_list": null
}
],
"busy_node_duration": "15m",
"reserved_node_duration": "5m"
}
}
}
Hello! I try to start a session on nodes, a grid with a basic config, but I get an error ...
But the session starts and displays in "/grid/status"
But when requesting "/grid/session/info?sessionid=4b8f95d6cb9cb32f0a962146e229af3e" again, errors ...
What am I doing wrong?
using selenium-server-standalone-3.141.59.jar as node