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

Stuck on syncing with SSS #3300

Closed
clokep opened this issue Sep 18, 2024 · 6 comments · Fixed by element-hq/synapse#17727
Closed

Stuck on syncing with SSS #3300

clokep opened this issue Sep 18, 2024 · 6 comments · Fixed by element-hq/synapse#17727
Labels

Comments

@clokep
Copy link

clokep commented Sep 18, 2024

Steps to reproduce

  1. Opened the application
  2. Saw the "Syncing..." icon
  3. Nothing updated

I attempted to "clear cache" to see if that would fix it. After the app restarted my avatar was no longer there and it was still stuck in a syncing/broken state.

Eventually my avatar appeared, but nothing else?

Outcome

What did you expect?

The app to update with new messages

What happened instead?

The app was stuck on syncing.

Your phone model

iPhone 14

Operating system version

iOS 18 (although it was happening yesterday with 17.x)

Application version

1.81 (123)

Homeserver

matrix.org

Will you send logs?

Yes

@clokep
Copy link
Author

clokep commented Sep 18, 2024

I submitted logs both before and after clearing cache. Can do so again if it is helpful.

@kegsay
Copy link

kegsay commented Sep 18, 2024

  File "/home/synapse/src/synapse/handlers/sliding_sync/room_lists.py", line 1882, in sort_rooms
    await self.store.bulk_get_last_event_pos_in_room_before_stream_ordering(
  File "/home/synapse/src/synapse/storage/databases/main/stream.py", line 1472, in bulk_get_last_event_pos_in_room_before_stream_ordering
    if stream <= min_token:
       ^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'NoneType' and 'int'

which means stream was None.

..becase this is setting a None value.

devonh pushed a commit to element-hq/synapse that referenced this issue Sep 18, 2024
…ooms (#17727)

Fixes element-hq/element-x-ios#3300

Some rooms are missing from `sliding_sync_joined_rooms`. When this
happens, the first call will succeed, but any subsequent calls for this
room ID will cause the cache to return `None` for the room ID, rather
than not having the key at all. This then causes the `<=` check to
throw.

Root cause: #17726

### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [ ] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [ ] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
@clokep
Copy link
Author

clokep commented Sep 18, 2024

Thanks for fixing this so quickly!

@devonh
Copy link
Member

devonh commented Sep 18, 2024

Thanks for fixing this so quickly!

It might be a little bit before we get this deployed on matrix.org. But I'm hoping to do that today. 🤞

@clokep
Copy link
Author

clokep commented Sep 19, 2024

This seems to still be happening to me. (From @wrjlewis pinging me this morning I'm assuming we were hoping that element-hq/synapse#17727 would be the full fix and that it was deployed.) I did another clear cache and submitted logs.

@ara4n ara4n reopened this Sep 19, 2024
@clokep
Copy link
Author

clokep commented Sep 19, 2024

Looks like updating to v1.8.2 fixed this for me? Anyway, stuff is working again. 🎉

@clokep clokep closed this as completed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants