Closed Bug 1696523 Opened 4 years ago Closed 4 years ago

Many websocket mochitests fail on Windows when run with py3

Categories

(Testing :: Mochitest, defect)

Default
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1696024

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

After bug 1696024, websocket mochitests pass on linux and osx under py3, but (apparently different) failures persist under Windows.

https://treeherder.mozilla.org/logviewer?job_id=331968487&repo=try

Note that most failures seem to follow:

could not open connection to the real server

https://searchfox.org/mozilla-central/rev/002023eb262be9db3479142355e1675645d52d52/testing/mochitest/ssltunnel/ssltunnel.cpp#850

See Also: → 1696024
Assignee: nobody → whole.grains
Blocks: 1696529

I collected the websocket logs here:
https://treeherder.mozilla.org/jobs?repo=try&revision=2c0c4e942cf356109d1c26e30780a8c9c550dd52
which yielded:

[2021-03-04 22:15:38,382] [CRITICAL] root: mod_pywebsocket: 'charmap' codec can't decode byte 0x81 in position 2265: character maps to <undefined>
[2021-03-04 22:15:38,384] [CRITICAL] root: mod_pywebsocket: Traceback (most recent call last):
  File "pywebsocket3\mod_pywebsocket\standalone.py", line 472, in _main
    server = WebSocketServer(options)
  File "pywebsocket3\mod_pywebsocket\websocket_server.py", line 92, in __init__
    options.allow_handlers_outside_root_dir)
  File "pywebsocket3\mod_pywebsocket\dispatch.py", line 209, in __init__
    allow_handlers_outside_root_dir)
  File "pywebsocket3\mod_pywebsocket\dispatch.py", line 373, in _source_handler_files_in_dir
    handler_suite = _source_handler_file(handler_file.read())
  File "c:\mozilla-build\python3\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2265: character maps to <undefined>

Further debugging showed that pywebsocket3 was blowing up when reading the unicode characters in the handler file at:
https://searchfox.org/mozilla-central/rev/6a2fc29e9c69deba4798c18d445b92df7adcbcc7/dom/websocket/tests/file_websocket_wsh.py#66

I'll roll that one line change into bug 1696024.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
See Also: 1696024
You need to log in before you can comment on or make changes to this bug.