Skip to content

server.login consistently crashes on the first attempt #39

Open

Description

@Biep

One other issue I often run into is when logging in. It happens, but upon retrying all works well.

biep@Puk-1:~$ irb
irb(main):001> require 'matrix_sdk'
=> true
irb(main):002> server = MatrixSdk::Client.new 'https://server.old'
=> #<MatrixSdk::Client:0x00007c90d2ce2c70 ...>
irb(main):003> server.login 'user', 'Password'
/var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/room.rb:985:in `sort': comparison of String with nil failed (ArgumentError)
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/room.rb:985:in `handle_room_canonical_alias'
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/room.rb:1032:in `put_state_event'
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/client.rb:618:in `handle_state'
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/client.rb:667:in `block (2 levels) in handle_sync_response'
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/client.rb:661:in `each'
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/client.rb:661:in `block in handle_sync_response'
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/client.rb:644:in `each'
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/client.rb:644:in `handle_sync_response'
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/client.rb:551:in `sync'
	from /var/lib/gems/3.3.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/client.rb:293:in `login'
	from (irb):3:in `<main>'
	from <internal:kernel>:187:in `loop'
	from /var/lib/gems/3.3.0/gems/irb-1.15.2/exe/irb:9:in `<top (required)>'
	from /usr/local/bin/irb:25:in `load'
	from /usr/local/bin/irb:25:in `<main>'
irb(main):004> server.login 'user', 'Password'
=> true
irb(main):005> 

Originally posted by @Biep in #37

Very consistently, this always and only happens upon the first attempt to login. Subsequent attempts, at the same or another server, run smoothly.

Activity

  1. changed the title [-]server.login crashes the first time[/-] [+]server.login consistently crashes on the first attempt[/+] on Apr 30, 2025
  2. Biep commented on May 7, 2025

    @Biep
    Author

    This, of course, is the same bug as #36. For some reason I completely forgot I had already reported it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions