slack-matrix-migration
slack-matrix-migration copied to clipboard
Import creates channels but fails to import any messages
Running matrix-synapse from Debian - 1.40.0+buster1.
I've followed the instructions posted here on github. When I attempt to import a sample slack.zip, I see:
...
ERROR! Received 500 Internal Server Error
ERROR while registering room 'name'
Migrating messages to rooms. This may take a while...
Migrating messages to DMs. This may take a while...
Kicking imported users from rooms. This may take a while...
Traceback (most recent call last):
File "/home/user/src/slack-matrix-migration/migrate.py", line 809, in <module>
main()
File "/home/user/src/slack-matrix-migration/migrate.py", line 804, in main
tick = 1/len(roomLUT)
ZeroDivisionError: division by zero
And in the Synapse homeserver log (I've anonymized the server and usernames):
2021-08-12 18:29:52,258 - synapse.handlers.message - 512 - INFO - POST-455- Failed to get profile information for @name:matrix.example.com: 401: Invalid signature for server example.com with key ed25519:a_zbSe: Unable to verify signature for example.com: <class 'nacl.exceptions.BadSignatureError'> Signature was forged or corrupt
2021-08-12 18:29:52,288 - synapse.http.server - 91 - ERROR - POST-455- Failed handle request via 'RoomCreateRestServlet': <XForwardedForRequest at 0x7f462064ec70 method='POST' uri='/_matrix/client/r0/createRoom?user_id=@user:example.com' clientproto='HTTP/1.0' site='8008'>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/synapse/http/server.py", line 252, in _async_render_wrapper
callback_return = await self._async_render(request)
File "/usr/lib/python3/dist-packages/synapse/http/server.py", line 430, in _async_render
callback_return = await raw_callback_return
File "/usr/lib/python3/dist-packages/synapse/rest/client/v1/room.py", line 82, in on_POST
info, _ = await self._room_creation_handler.create_room(
File "/usr/lib/python3/dist-packages/synapse/handlers/room.py", line 799, in create_room
) = await self.room_member_handler.update_membership_locked(
File "/usr/lib/python3/dist-packages/synapse/handlers/room_member.py", line 602, in update_membership_locked
return await self._local_membership_update(
File "/usr/lib/python3/dist-packages/synapse/handlers/room_member.py", line 240, in _local_membership_update
result_event = await self.event_creation_handler.handle_new_client_event(
File "/usr/lib/python3/dist-packages/synapse/util/metrics.py", line 92, in measured_func
r = await func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/synapse/handlers/message.py", line 974, in handle_new_client_event
event = await self.persist_and_notify_client_event(
File "/usr/lib/python3/dist-packages/synapse/handlers/message.py", line 1162, in persist_and_notify_client_event
content = await self._do_send_invite(destination, pdu, room_version)
return await self.transport_layer.send_invite_v2(
response = await self.client.put_json(
response = await self._send_request_with_optional_trailing_slash(
response = await self._send_request(request, **send_request_args)
raise exc
synapse.api.errors.HttpResponseException: 401: Unauthorized
Any suggestions for how to troubleshoot?
Update: I tried this again with a fresh docker image with synapse preinstalled, to rule out anything unusual about my setup. It still behaves the same way -- creates channels, but does not import any messages, but I don't see the python exceptions above in my log file. The migration script shows:
ERROR! Received 502 Bad Gateway
ERROR while registering room 'room-name'
For each room. But it also reports "Migrating messages to rooms. This may take a while..." without an error. No messages are in fact migrated.