question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

archlinux installation docs are grossly outdated

See original GitHub issue

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

2022-07-22 12:21:01,577 - synapse.http.server - 183 - ERROR - POST-78 - Failed handle request via 'RegisterRestServlet': <XForwardedForRequest at 0x7f5f586d7430 method='POST' uri='/_matrix/client/r0/register' clientproto='HTTP/1.0' site='8008'>
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 <lambda>
    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.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
baboliviercommented, Jul 22, 2022

could you kindly suggest a way to recreate the signing key?

From your virtual environment:

python -m synapse.app.homeserver -c /path/to/homeserver.yaml --generate-keys
0reactions
sla-tecommented, Jul 25, 2022

That is interesting and definitely worth looking into, thanks for getting to the bottom of it and reporting back!

Sure thing, if it was me id tbh just add a tiny wrapper around that function that makes sure either always bytes or always string is returned and call that one from all other places… Then this should be under control xD… And a test would sure not hurt to include as its a quite central logical function, because its responsible for hashing passwords, without it login/register = dead

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation guide - ArchWiki - Arch Linux
This document is a guide for installing Arch Linux using the live system booted from an installation medium made from an official ...
Read more >
Installing OCRmyPDF - Read the Docs
The easiest way to install OCRmyPDF is to follow the steps for your operating system/platform. This version may be out of date, however....
Read more >
Guided Arch Linux Installer Is An Absolute Joke (Outdated)
Recently the Arch team decided to add a guided installer into the ISO, and it seems like everyone else is ignoring the fact...
Read more >
Arch Linux Installation Guide - Brian Caffey
You are probably using a 64-bit machine (although some old netbooks are 32-bit). The first obstacle is you will probably face with VirtualBox...
Read more >
Dual boot Arch Linux and Windows the right way - Medium
While my instructions have been updated to reflect this change, the screenshots will understandably show the “old way”. Remember to delete the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found