matoom/frostbite

lich connection issue with Mac OS Catalina

Closed this issue · 22 comments

Am running Mac os Catalina and have lich working via avalon- fully functional there. Ruby version is 2.6.6.

Frostbite runs without lich just fine. Other front ends work fine.

However, using the script settings to set up lich, it returns the below error

--- Open "/usr/bin/ruby /Users/lich/lich.rbw --dragonrealms --frostbite"

--- Lich process exited with code 0

Connecting ...

  • Unable to connect to server. Please check your internet connection and try again later. [10:19 pm]

Tried equally with terminal to have it run lich and then connect through frostbite, same issue.

I have frostbite and lich working on two other Macs and the only difference I can see is that those two run mojave and this one with the issue runs Catalina. Any help would be very much appreciated!

Lich process exited with code 0

This pretty explicitly indicates that Lich stopped working. It's kind of difficult to diagnose Lich issues but there might be some additional details when you run this exact same command in terminal.

/usr/bin/ruby /Users/lich/lich.rbw --dragonrealms --frostbite

If this command runs in terminal it's possible that the operating system is blocking any background processes being executed (i would not rule that out but not sure either).

If not then right off there's a few things that have to be taken into consideration.

It runs with Avalon but there's actually an unofficial fork of Lich that added the "--frostbite" flag. There's no frostbite option in the original Lich. Which version of Lich are you using?

This is the updated version:
https://github.com/rcuhljr/dr-lich

To be honest i've looked into this and i'm no Lich expert but i'm not sure if the frostbite flag is even needed at all.

You could try changing the Lich arguments from the scripts settings into this instead:

--dragonrealms --stormfront -g $host:$port

There's also a few known issues that some users have run into in the past.

This is something to consider as well:
https://www.reddit.com/r/dragonrealms/comments/55souh/lich_on_mac_now_none_of_my_fes_work/

One more thing.

Try running Lich in terminal and don't check the Lich option in Frostbite when you connect. Just connect as you would without using Lich. If you check the Lich option it runs a second Lich instance which could cause some issues potentially.

Lich process exited with code 0

This pretty explicitly indicates that Lich stopped working. It's kind of difficult to diagnose Lich issues but there might be some additional details when you run this exact same command in terminal.

/usr/bin/ruby /Users/lich/lich.rbw --dragonrealms --frostbite

If this command runs in terminal it's possible that the operating system is blocking any background processes being executed (i would not rule that out but not sure either).

This command ran in terminal

If not then right off there's a few things that have to be taken into consideration.

It runs with Avalon but there's actually an unofficial fork of Lich that added the "--frostbite" flag. There's no frostbite option in the original Lich. Which version of Lich are you using?

**__LICH_VERSION = '4.6.52'_

This is the updated version:
https://github.com/rcuhljr/dr-lich

To be honest i've looked into this and i'm no Lich expert but i'm not sure if the frostbite flag is even needed at all.

You could try changing the Lich arguments from the scripts settings into this instead:

--dragonrealms --stormfront -g $host:$port

this didn't change anything unfortunately

One more thing.

Try running Lich in terminal and don't check the Lich option in Frostbite when you connect. Just connect as you would without using Lich. If you check the Lich option it runs a second Lich instance which could cause some issues potentially.

**__**Is that this command in terminal?
sudo ruby ~/Desktop/lich/lich.rbw --dragonrealms --frostbite

if so, I can run this and it will wait for the connection. Then I run frostbite (with run lich not/not checked) and same problem happens**_**

worth noting that frostbite works fine connecting without lich at all, and ive already done the lich fork to dr stuff and first time setup via Avalon - also have checked host files, those look fine

would the new security settings of MacOS Catalina be blocking something?

http://www.macosxautomation.com/automator/security.html

I'm not getting any prompts to provide frostbite access but thought I'd throw it out there

The version (4.6.52) you posted earlier isn't correct but did you say you tried with both versions?

It could be some kind of a new security feature but if you run it in terminal there's no special treatment for Frostbite, it's Lich that's essentially hijacking the connection via the hosts proxy. I don't know why it would be any different than Avalon.

I think it's worth mentioning that i looked into the rcuhljr forked Lich and there seems to be a lot of references to Ruby versions 2.0 to 2.2.

KEEP_SAFE = RUBY_VERSION =~ /^2.[012]./

I'm not entirely sure if 2.6 is actually supported?

The version (4.6.52) you posted earlier isn't correct but did you say you tried with both versions?

**The lich version is what is written in the lich.rbw file - tried to paste a snapshot below - it's also the same lich version posted in the zip file here https://lichproject.org/download.html - i tried the pre DR fork version and after I did the dependency install/dr fork - is there some other version of lich I should be using? **

Screen Shot 2020-05-07 at 9 51 35 PM

It could be some kind of a new security feature but if you run it in terminal there's no special treatment for Frostbite, it's Lich that's essentially hijacking the connection via the hosts proxy. I don't know why it would be any different than Avalon.

I think it's worth mentioning that i looked into the rcuhljr forked Lich and there seems to be a lot of references to Ruby versions 2.0 to 2.2.

KEEP_SAFE = RUBY_VERSION =~ /^2.[012]./

I'm not entirely sure if 2.6 is actually supported?

I could try to downgrade ruby, but wouldn't Avalon not run with lich if ruby was the issue? Just curious. Happy to try it if you think that's the issue.

Ok, i see, i don't think that version supports the --frostbite option. It's not the DR fork, it's the rcuhljr fork that you need.

You literally have to download this version of lich:
https://github.com/rcuhljr/dr-lich/blob/master/lich.rbw

# Based on Lich 4.6.49
LICH_VERSION = '4.12.1f'
TESTING = false
KEEP_SAFE = RUBY_VERSION =~ /^2\.[012]\./

To be honest i don't know exactly what's different in this version but this was specifically created for genie and frostbite users.

Install instructions can be found here: https://github.com/rcuhljr/dr-lich

By download you mean replace the lich.rbw file in the lich install from here
https://lichproject.org/download.html

with the lich.rbw file from here:
https://github.com/rcuhljr/dr-lich

Right?

After doing that, should I run the first time setup again from here:?
https://github.com/rpherbig/dr-scripts/wiki/First-Time-Setup

Issue I'm having now is that I can't get terminal to launch the 4.14 lich.rbw (the version from the rcuhljr site) that will open Avalon so I can do the first-time setup again.

I really don't know but my best guess is that you don't have to run the first time setup again. As far as i know this version only adds the --genie/--frostbite options to the script.

Ok, I replaced the lich.rbw file with the 4.14 version from rcuhljr but am still getting the error:

--- Open "/usr/local/Cellar/ruby@2.6/2.6.6_1/bin/ruby /Users/user/Desktop/lich/lich.rbw --dragonrealms --frostbite"

--- Lich process exited with code 1

Connecting ...

  • Unable to connect to server. Please check your internet connection and try again later. [7:58 am]

Tried it without the arguments "--dragonrealms --frostbite" etc, same result

--- Open "/usr/local/Cellar/ruby@2.6/2.6.6_1/bin/ruby /Users/user/Desktop/lich/lich.rbw --dragonrealms --stormfront -g dr.simutronics.net:11024"

--- Lich process exited with code 1

Connecting ...

  • Unable to connect to server. Please check your internet connection and try again later. [8:01 am]

--- Open "/usr/local/Cellar/ruby@2.6/2.6.6_1/bin/ruby /Users/user/Desktop/lich/lich.rbw --dragonrealms --frostbite -g dr.simutronics.net:11024"

--- Lich process exited with code 1

Connecting ...

  • Unable to connect to server. Please check your internet connection and try again later. [8:01 am]

I think you're better off experimenting from the terminal. This doesn't relay any underlying errors coming from lich. It's probably crashing but there's no way to know the exact cause.

I tried setting up lich on a clean linux vm with ruby 2.7. I only download lich.rbw, installed 2 gems and that was it. I was already able to run it and connect.

Also looking at the latest mac os guide, they're saying it doesn't work with 2.6+ on mac osx.

With Mac Mojave and Catalina, Ruby 2.6 and 2.7, and changes to various gems used to support the game, the old script does not work.

https://gswiki.play.net/Mac_Installation_-_Lich_(software)

I really have no idea but looking at the install instructions this looks like a huge clusterfuck tbh.

I wanna say that linux comes with a another set of issues but at least ruby 2.7 and other lich dependencies seem to more or less functional (i did get a few warnings thrown at me but at least managed to set up a connection).

Linux vm was just a convenient way to set up a clean environment for a fresh installation. I was just trying to see if lich actually runs with ruby versions 2.6 and up but apparently looking at these mac install instructions it's probably the old ruby gems that are causing problems.

This should be pretty apparent if you run lich in terminal, you should probably try that first.

I've been trying to set up a Catalina vm as well since i don't want to update my actual build machine but this seems to be another hopeless cause.

what should i try via terminal? i've run lich through it and tried to connect frostbite without the run lich box to no avail.

i think last ditch effort is to downgrade ruby to 2.2.5 which IS working on another mac i have, albeit using Mojave not Catalina.

If you want to try to teamviewer on my setup with Catalina, happy to try that as well.

No i get that but what's the exact error you're getting? You only gave me the error codes through frostbite, not using the terminal directly.

The way Lich works both code 0 and code 1 can be bad.

You've shown me both

--- Lich process exited with code 0
--- Lich process exited with code 1

  • code 0 means that it exited the main loop before you were even able to connect;
  • code 1 means that it crashed before you were able to connect

I'm guessing the first one was because you were using the wrong version of lich and since there was no "--frostbite" option it just exited the main loop. The second one using rcuhljr lich, try that and see what kind of error it produces in terminal?

Ok, so i gave it another try and managed to get Catalina vm installed. After going through a rigorous installation process to set up the required gems i think it's pretty safe to say that lich just doesn't work under mac os/ruby 2.6. Did you say you managed to run it with Avalon?

To be honest i'm really out of my element here, maybe you can get in contact with someone who is more familiar and more involved with lich that can give you better instructions.

A plain simple install is not going to cut it, here's my install logs:

https://pastebin.com/EmDJqLMu

Successfully installed gtk2-3.4.2
Parsing documentation for gtk2-3.4.2
Installing ri documentation for gtk2-3.4.2
Done installing documentation for gtk2 after 1 seconds
1 gem installed
matoom@matooms-iMac lich % sudo ./lich.rbw --dragonrealms --frostbite
(null)-WARNING **: Failed to load shared library 'libatk-1.0.0.dylib' referenced by the typelib: dlopen(libatk-1.0.0.dylib, 0x0009): relative file paths not allowed 'libatk-1.0.0.dylib'

Last night Doug the lich Oracle got it working on my system. It's MacOS Catalina with Ruby 2.6.6 and that rhulcjr version of lich for frostbite. Actually works logging in via the script settings - so all good now. If there's some sort of log I can provide that helps troubleshoot with others, I'd happily pass that on. Not exactly sure what we fixed/what the specific problem was...

Ok, that's good to hear but i have no idea, at least we know it's possible.