element-hq / element-hq/synapse
archlinux installation docs are grossly outdated
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#13363](https://github.com/matrix-org/synapse/issues/13363).
---
### Description
1. Install matrix via pip on linux
2. Install element client on home machine
3. Try to create an account via elements UI
Then the server response the following to the client:
```
status_code: 500, {"errcode":"M_UNKNOWN","error":"Internal server error"}
```
Looking at the error it seems the code attempts to run decode() on a str object...
### Homeserver
myurl.com
### Synapse Version
1.63.1
### Installation Method
pip (from PyPI)
### Platform
Rocky Linux 9
### Relevant log output
```shell
2022-07-22 12:21:01,577 - synapse.http.server - 183 - ERROR - POST-78 - Failed handle request via 'RegisterRestServlet':
Traceback (most recent call last):
File "/root/synapse/venv/lib/python3.10/site-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
result = current_context.run(gen.send, result)
StopIteration: True
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/synapse/venv/lib/python3.10/site-packages/synapse/rest/client/register.py", line 583, in on_POST
auth_result, params, session_id = await self.auth_handler.check_ui_auth(
File "/root/synapse/venv/lib/python3.10/site-packages/synapse/handlers/auth.py", line 551, in check_ui_auth
raise InteractiveAuthIncompleteError(
synapse.api.errors.InteractiveAuthIncompleteError: Interactive auth not yet complete
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/synapse/venv/lib/python3.10/site-packages/synapse/http/server.py", line 366, in _async_render_wrapper
callback_return = await self._async_render(request)
File "/root/synapse/venv/lib/python3.10/site-packages/synapse/http/server.py", line 572, in _async_render
callback_return = await raw_callback_return
File "/root/synapse/venv/lib/python3.10/site-packages/synapse/rest/client/_base.py", line 99, in wrapped
return await orig(*args, **kwargs)
File "/root/synapse/venv/lib/python3.10/site-packages/synapse/rest/client/register.py", line 600, in on_POST
password_hash = await self.auth_handler.hash(password)
File "/root/synapse/venv/lib/python3.10/site-packages/twisted/python/threadpool.py", line 244, in inContext
result = inContext.theWork() # type: ignore[attr-defined]
File "/root/synapse/venv/lib/python3.10/site-packages/twisted/python/threadpool.py", line 260, in
inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
File "/root/synapse/venv/lib/python3.10/site-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/root/synapse/venv/lib/python3.10/site-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/root/synapse/venv/lib/python3.10/site-packages/synapse/logging/context.py", line 970, in g
return f(*args, **kwargs)
File "/root/synapse/venv/lib/python3.10/site-packages/synapse/handlers/auth.py", line 1566, in _do_hash
).decode("ascii")
AttributeError: 'str' object has no attribute 'decode'
```
### Anything else that would be useful to know?
Registrations have worked fine and I have not made any changes on my end and now they stopped working, so i would assume error in synapse.
I had captcha enabled but already tested with it disabled (unsafe registrations enabled) and the error persists.
Contributor guide
Research direction
The title mentions outdated Arch Linux installation documentation, but the body reports a registration failure on Rocky Linux with Synapse 1.63.1. Start at synapse/rest/client/register.py and synapse/handlers/auth.py, especially _do_hash, and reproduce the registration flow; done means the reported AttributeError no longer occurs and registration completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100