Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not work selenoid.exe with docker on Windows #1102

Open
theproshin opened this issue May 12, 2021 · 1 comment
Open

Do not work selenoid.exe with docker on Windows #1102

theproshin opened this issue May 12, 2021 · 1 comment
Labels

Comments

@theproshin
Copy link

ERROR http: panic serving 127.0.0.1:55358: runtime error: index out of range [0] with length 0

Env:
Windows 10
selenoid_windows_amd64.exe 1.10.3
docker desktop 3.3.2
selenoid-ui_windows_amd64.exe 1.10.3

Step to reproduce:

  1. Create c:\selenoid and download selenoid_windows_amd64.exe and selenoid-ui_windows_amd64.exe from releases page
  2. Create browsers.json
{
    "chrome": {
        "default": "90.0",
        "versions": {
            "90.0": {
                "image": "selenoid/chrome:90.0",
                "port": "4444",
                "path": "/"
                
            }
        }
    }
  1. docker pull selenoid/chrome:90.0
  2. start selenoid:
    selenoid_windows_amd64.exe -conf browsers.json
  3. start selenoid-ui for create manual session
    selenoid-ui_windows_amd64.exe

Log after create manual session

2021/05/12 11:47:24 [-] [INIT] [Loading configuration files...]
2021/05/12 11:47:24 [-] [INIT] [Loaded configuration from browsers.json]
2021/05/12 11:47:24 [-] [INIT] [Video Dir: C:\selenoid\video]
2021/05/12 11:47:24 [-] [INIT] [Your Docker API version is 1.41]
2021/05/12 11:47:24 [-] [INIT] [Timezone: Local]
2021/05/12 11:47:24 [-] [INIT] [Listening on :4444]
2021/05/12 11:48:06 [-] [NEW_REQUEST] [unknown] [127.0.0.1]
2021/05/12 11:48:06 [-] [NEW_REQUEST_ACCEPTED] [unknown] [127.0.0.1]
2021/05/12 11:48:06 [0] [LOCATING_SERVICE] [chrome] []
2021/05/12 11:48:06 [-] [DEFAULT_VERSION] [Using default version: 90.0]
2021/05/12 11:48:06 [0] [USING_DOCKER] [chrome] [90.0]
2021/05/12 11:48:06 [0] [CREATING_CONTAINER] [selenoid/chrome:90.0]
2021/05/12 11:48:06 [0] [STARTING_CONTAINER] [selenoid/chrome:90.0] [f20fbd316c3405b68e35a3a06ae2b34d48efcef8ed02d19d7a3bcaf2b9db8df1]
2021/05/12 11:48:08 [0] [CONTAINER_STARTED] [selenoid/chrome:90.0] [f20fbd316c3405b68e35a3a06ae2b34d48efcef8ed02d19d7a3bcaf2b9db8df1] [2.35s]
2021/05/12 11:48:08 http: panic serving 127.0.0.1:55358: runtime error: index out of range [0] with length 0
goroutine 9 [running]:
net/http.(*conn).serve.func1(0xc000308d20)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:1824 +0x153
panic(0x5ef2c0, 0xc000333e78)
/opt/hostedtoolcache/go/1.16.2/x64/src/runtime/panic.go:971 +0x49a
github.com/aerokube/selenoid/service.getHostPort.func3(0xc000329e10, 0x4, 0xc0003528a8, 0x8, 0xc00049be38, 0x6c54e0)
/home/runner/work/selenoid/selenoid/service/docker.go:441 +0x198
github.com/aerokube/selenoid/service.getHostPort(0x0, 0x0, 0x0, 0x0, 0x0, 0x62313b, 0x7, 0x0, 0x0, 0x6fc23ac00, ...)
/home/runner/work/selenoid/selenoid/service/docker.go:450 +0x174
github.com/aerokube/selenoid/service.(*Docker).StartWithCancel(0xc000360000, 0xc0003527b4, 0x6, 0x0)
/home/runner/work/selenoid/selenoid/service/docker.go:197 +0x1938
main.create(0x6c8960, 0xc00032a0e0, 0xc000163600)
/home/runner/work/selenoid/selenoid/selenoid.go:193 +0x9ed
net/http.HandlerFunc.ServeHTTP(...)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:2069
github.com/aerokube/selenoid/protect.(*Queue).Protect.func1(0x6c8960, 0xc00032a0e0, 0xc000163600)
/home/runner/work/selenoid/selenoid/protect/queue.go:76 +0x4af
net/http.HandlerFunc.ServeHTTP(...)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:2069
github.com/aerokube/selenoid/protect.(*Queue).Check.func1(0x6c8960, 0xc00032a0e0, 0xc000163600)
/home/runner/work/selenoid/selenoid/protect/queue.go:53 +0x93
net/http.HandlerFunc.ServeHTTP(...)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:2069
github.com/aerokube/selenoid/protect.(*Queue).Try.func1(0x6c8960, 0xc00032a0e0, 0xc000163600)
/home/runner/work/selenoid/selenoid/protect/queue.go:35 +0xcd
net/http.HandlerFunc.ServeHTTP(...)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:2069
main.post.func1(0x6c8960, 0xc00032a0e0, 0xc000163600)
/home/runner/work/selenoid/selenoid/main.go:258 +0xa2
net/http.HandlerFunc.ServeHTTP(0xc0002cdd60, 0x6c8960, 0xc00032a0e0, 0xc000163600)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:2069 +0x4b
net/http.(*ServeMux).ServeHTTP(0xc0002f6cc0, 0x6c8960, 0xc00032a0e0, 0xc000163600)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:2448 +0x1b7
main.handler.func1(0x6c8960, 0xc00032a0e0, 0xc000163600)
/home/runner/work/selenoid/selenoid/main.go:329 +0x1cd
net/http.HandlerFunc.ServeHTTP(0x646580, 0x6c8960, 0xc00032a0e0, 0xc000163600)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:2069 +0x4b
net/http.(*ServeMux).ServeHTTP(0xc00041e080, 0x6c8960, 0xc00032a0e0, 0xc000163600)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:2448 +0x1b7
net/http.serverHandler.ServeHTTP(0xc00043c000, 0x6c8960, 0xc00032a0e0, 0xc000163600)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:2887 +0xaa
net/http.(*conn).serve(0xc000308d20, 0x6c9da0, 0xc0002f6b80)
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:1952 +0x8cd
created by net/http.(*Server).Serve
/opt/hostedtoolcache/go/1.16.2/x64/src/net/http/server.go:3013 +0x3b8

@vania-pooh vania-pooh added the bug label May 12, 2021
@vania-pooh vania-pooh added this to the 1.10.4 milestone May 12, 2021
@vania-pooh
Copy link
Member

@theproshin is it possible to get docker inspect of browser container?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants