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

Traceback #27

Open
markvdb opened this issue Feb 11, 2021 · 0 comments
Open

Traceback #27

markvdb opened this issue Feb 11, 2021 · 0 comments

Comments

@markvdb
Copy link

markvdb commented Feb 11, 2021

Hello,

I bumped into the below Traceback when matrix-archive barfed out on my wrong input (wrong e2e room keys password probably). You might want to make sure a more informative error message is emitted.

Kind regards,

Mark

P.S. Thank you for your work on matrix-archive. I really appreciate it!

./matrix-archive.py 
Enter URL of your homeserver: [https://matrix-client.matrix.org] 
Enter your full user ID: [@user:matrix.org] @my_user_id:matrix.org
Password: 
Enter full path to room E2E keys: [element-keys.txt] /path_to_my_keys/element-keys.txt
Room keys password: 
Importing keys. This may take a while...
Traceback (most recent call last):
  File "/home/mark/.local/lib/python3.9/site-packages/nio/crypto/olm_machine.py", line 2129, in import_keys_static
    data = decrypt_and_read(infile, passphrase)
  File "/home/mark/.local/lib/python3.9/site-packages/nio/crypto/key_export.py", line 70, in decrypt_and_read
    return decrypt(encrypted_data[len(HEADER) : -len(FOOTER)], passphrase)
  File "/home/mark/.local/lib/python3.9/site-packages/nio/crypto/key_export.py", line 133, in decrypt
    raise ValueError("HMAC check failed for encrypted payload.")
ValueError: HMAC check failed for encrypted payload.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mark/matrix-archive/./matrix-archive.py", line 369, in main
    client = await create_client()
  File "/home/mark/matrix-archive/./matrix-archive.py", line 198, in create_client
    await client.import_keys(room_keys_path, room_keys_password)
  File "/home/mark/.local/lib/python3.9/site-packages/nio/client/async_client.py", line 1947, in import_keys
    sessions = await loop.run_in_executor(None, import_keys)
  File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/mark/.local/lib/python3.9/site-packages/nio/crypto/olm_machine.py", line 2131, in import_keys_static
    raise EncryptionError(e)
nio.exceptions.EncryptionError: HMAC check failed for encrypted payload.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mark/matrix-archive/./matrix-archive.py", line 401, in 
    asyncio.get_event_loop().run_until_complete(main())
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/mark/matrix-archive/./matrix-archive.py", line 391, in main
    await client.logout()
UnboundLocalError: local variable 'client' referenced before assignment
Unclosed client session
client_session: 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant