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

"SCHEME_DOMAIN_PORT is not defined" failures due to HTTP 500 all over websockets/ #10457

Closed
foolip opened this issue Apr 13, 2018 · 15 comments
Closed
Assignees
Labels
infra priority:urgent type:bug websockets wptrunner The automated test runner, commonly called through ./wpt run

Comments

@foolip
Copy link
Member

foolip commented Apr 13, 2018

As found in #1695 (comment), lots of tsets under websockets/ are failing. For example:
https://wpt.fyi/websockets/binary

In Chrome devtools I see "Failed to load resource: the server responded with a status of 500 (Internal Server Error)" so something pretty odd is happening here.

@foolip foolip changed the title "SCHEME_DOMAIN_PORT is not defined" failures to do HTTP 500 all over websockets/ "SCHEME_DOMAIN_PORT is not defined" failures due to HTTP 500 all over websockets/ Apr 13, 2018
@foolip
Copy link
Member Author

foolip commented Apr 13, 2018

@jugglinmike, not sure if this will come up in your investigation, but a widespread failure like this is pretty easy to justify the time spending to fix...

@zcorpan
Copy link
Member

zcorpan commented Apr 17, 2018

I'm assuming that a 500 can happen if there's no port defined for wss. constants.js contains:

var PORT_SSL = "{{ports[wss][0]}}";

https://wptserve.readthedocs.io/en/latest/pipes.html#sub

@zcorpan
Copy link
Member

zcorpan commented Apr 17, 2018

config.default.json (read by tools/wptserve/wptserve/config.py) has:

 "ports":{"http":[8000, "auto"],
          "https":[8443],
          "ws":["auto"],
          "wss":["auto"]},

I don't know what isn't working, though...

@gsnedders
Copy link
Member

Labelling this as roadmap and not urgent on the assumption that this has been broken a while.

@gsnedders
Copy link
Member

 0:37.96 WARNING list index out of range
Traceback (most recent call last):
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/server.py", line 256, in handle_one_request
    handler(request, response)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py", line 151, in __call__
    response = wrap_pipeline(path, request, response)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py", line 117, in wrap_pipeline
    response = pipeline(request, response)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 34, in __call__
    response = func(request, response, *args)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 127, in inner
    return f(request, response, *arg_values)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 363, in sub
    new_content = template(request, content, escape_type=escape_type)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 440, in template
    new_content = template_regexp.sub(config_replacement, content)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 425, in config_replacement
    value = value[item[1]]
IndexError: list index out of range

 0:37.99 WARNING list index out of range
Traceback (most recent call last):
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/server.py", line 256, in handle_one_request
    handler(request, response)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py", line 151, in __call__
    response = wrap_pipeline(path, request, response)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py", line 117, in wrap_pipeline
    response = pipeline(request, response)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 34, in __call__
    response = func(request, response, *args)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 127, in inner
    return f(request, response, *arg_values)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 363, in sub
    new_content = template(request, content, escape_type=escape_type)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 440, in template
    new_content = template_regexp.sub(config_replacement, content)
  File "/Users/gsnedders/Documents/other-projects/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py", line 425, in config_replacement
    value = value[item[1]]
IndexError: list index out of range

@gsnedders
Copy link
Member

More breakage from bfef1f2 (#10231) it would seem.

@gsnedders
Copy link
Member

So not broken for so long, and my fault…

@gsnedders
Copy link
Member

@zcorpan constants.js seems to be fine.

@gsnedders
Copy link
Member

OK, so it is /websockets/constants.js?pipe=sub that is failing with 500 (which makes sense in the case of 001.html). This is wptrunner specific, seemingly, so presumably our override config is broken.

@gsnedders gsnedders added the wptrunner The automated test runner, commonly called through ./wpt run label Apr 17, 2018
@gsnedders
Copy link
Member

The bug here is:

        config.ports = {
            "http": [8000, 8001],
            "https": [8443],
            "ws": [8888]
        }

in environment.py.

@jgraham
Copy link
Contributor

jgraham commented Apr 19, 2018

I need to fix this to unbreak a gecko sync, so there will be a patch soon.

@alijuma
Copy link
Contributor

alijuma commented Apr 23, 2018

Pinging for an update since this is marked Priority:urgent.

@foolip
Copy link
Member Author

foolip commented Apr 23, 2018

Assigning to @jgraham as the urgency is on part of Gecko sync.

@gsnedders
Copy link
Member

I reviewed a patch last week by @jgraham. Should we not fix it upstream soon, even if the Gecko sync doesn't land?

@gsnedders
Copy link
Member

fixed in #10557 (which sadly didn't link here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra priority:urgent type:bug websockets wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

No branches or pull requests

5 participants