elanthia-online / lich-5

A GTK3 and modernized version of Lich 4
12 stars 22 forks source link

Connect hangs trying to get character list on Ruby 3.2.1 on Windows. #290

Closed vtcifer closed 1 year ago

vtcifer commented 1 year ago

Fresh built environment Using Ruby 3.2.1 x64

When filling in account name + password it just hangs at "working..."

Debug log shows the following (with data redacted):

2023-02-10 06:05:58: info: Lich 5.6.2
2023-02-10 06:05:58: info: Ruby 3.2.1
2023-02-10 06:05:58: info: x64-mingw-ucrt
2023-02-10 06:05:59: info: no force-mode info given
2023-02-10 06:06:07: error in Gtk.queue: undefined method `=~' for [{:game_code=>"DR", :game_name=>"DragonRealms", :char_code=>"<REDACTED>", :char_name=>"<REDACTED>"}, {:game_code=>"DRT", :game_name=>"DragonRealms Prime Test", :char_code=>"<REDACTED>", :char_name=>"<REDACTED>"}, {:game_code=>"GST", :game_name=>"GemStone IV Prime Test", :char_code=>"C", :char_name=>"0"}, {:game_code=>"GST", :game_name=>"GemStone IV Prime Test", :char_code=>"100", :char_name=>"0"}]:Array
    G:/My Drive/lichswarm/lib/gui-manual-login.rb:121:in `block (2 levels) in <top (required)>'
    G:/My Drive/lichswarm/lib/gtk.rb:101:in `block in queue'
    C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/gobject-introspection-4.1.1/lib/gobject-introspection/loader.rb:686:in `invoke'
    C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/gobject-introspection-4.1.1/lib/gobject-introspection/loader.rb:686:in `invoke'
    C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/gobject-introspection-4.1.1/lib/gobject-introspection/loader.rb:112:in `main'
    G:/My Drive/lichswarm/lich.rbw:5209:in `<main>'

I'll try stepping back ruby versions (3.1, 3.0 etc), but installing and building gems on windows is a pain so it'll take me some time.

MahtraDR commented 1 year ago

Nice! I don't normally test windows stuff.

I am mostly sure I know what the issue is. Can fix tomorrow.

vtcifer commented 1 year ago

Works with 3.1.3, environ details attached.

environ-details-3_1_3.txt

MahtraDR commented 1 year ago

It's because login_info is an array, and ruby 3.2 has very strict comparisons. It's very late here, but if you can test changing line 121 in from

if login_info =~ /error/i

to

if login_info.to_s =~ /error/i

That should solve it.

vtcifer commented 1 year ago

It's because login_info is an array, and ruby 3.2 has very strict comparisons. It's very late here, but if you can test changing line 121 in from

if login_info =~ /error/i

to

if login_info.to_s =~ /error/i

That should solve it.

Will try to get that later today, thanks for the quick check.

vtcifer commented 1 year ago

That should solve it.

Confirmed, fixed it.

ondreian commented 1 year ago

I think the larger issue here is the Lich is swallowing errors that should bubble up to stderr. It makes debugging/dev very hard.

On Fri, Feb 10, 2023 at 9:35 AM Derek Hoffmann @.***> wrote:

That should solve it.

Confirmed, fixed it.

— Reply to this email directly, view it on GitHub https://github.com/elanthia-online/lich-5/issues/290#issuecomment-1426058577, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIKHAWIEUTCTFZIK3EHWQLWWZU6RANCNFSM6AAAAAAUXVOVV4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MahtraDR commented 1 year ago

I think the larger issue here is the Lich is swallowing errors that should bubble up to stderr. It makes debugging/dev very hard.

I don't disagree, but that's a much larger issue too. It's a standard troubleshooting aspect to look at the logs in temp for us, which does mitigate much.