AM2R-Community-Developers / AM2RLauncher

Host respository for the AM2RLauncher.
GNU General Public License v3.0
343 stars 19 forks source link

Linux: Error when clicking "Download" button #40

Closed Leshuguita closed 1 year ago

Leshuguita commented 1 year ago

Describe the bug Just installed it, following the instructions from https://github.com/AM2R-Community-Developers/AM2RLauncher/wiki/Installation-Process#arch-linux, and an error pops up when clicking the Download button, saying "The type initializer for 'Libgit2Sharp.Core.NativeMethods' threw an exception"

Platform

Additional context Add any other context about the problem here.

Log file AM2RLauncher.log

Miepee commented 1 year ago

When was the last time you -Syud? If it wasn't some time recently, can you try to -Syu, reboot, and see if it still happens? Also, from where did you get the launcher? The release on github, some aur package (if yes, which) or from flathub?

Leshuguita commented 1 year ago

I'd last -Syud yesterday, before installing everyting. Still happens after another -Syu and a reboot, with both the am2rlauncher and am2rlauncher-git packages

Miepee commented 1 year ago

Hm, need to check later whether I can replicate. In the meantime, would you be able to test the following: Clone the Repo, and modify the following line in AM2RLauncher.csproj

-     <PackageReference Include="LibGit2Sharp" Version="0.26.2" />
+     <PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0182 " />

Then try to compile it (instructions should be both in the Wiki, as well as in the PKGBUILD of am2rlauncher-git)

Leshuguita commented 1 year ago

Still not working, but different error: "could not load ssl libraries" Logs: AM2RLauncher.log

Miepee commented 1 year ago

That sounds like https://github.com/libgit2/libgit2sharp/issues/2003 According to the thread there, using 0.27.0-preview-0182 should fix it. What if for compiling, instead of using -r ubuntu.18.04-x64, you use -r ubuntu.20.04-x64?

(A workaround would probably be to install libssl-compat or however its called, but non-arch distros don't offer those, so it'd be nice to find a proper workaround that works on all linux distros instead of just arch)

Leshuguita commented 1 year ago

Didn't work either, same error. It managed to start the download after installing the openssl-1.1 package, though I do not know if that's option on other distros

Miepee commented 1 year ago

It probably is, but I wouldn't rely on it. I guess something that can be tried as well is to just check all the 0.27 preview packages here and see if any one of them works? (and obviously remove openssl-1.1 before attempting) https://www.nuget.org/packages/LibGit2Sharp/#versions-body-tab

rehtlaw commented 1 year ago

any updates on this? the error still persists

Miepee commented 1 year ago

As this is an upstream issue, the error will persist until it's fixed upstream. Updates will more likely be found in the linked libgit2sharp issue from above than here.

Miepee commented 1 year ago

@rehtlaw @Leshuguita I've updated to the newest libgit2sharp release, can you pull down the artifacts and see if the error persists? (https://github.com/AM2R-Community-Developers/AM2RLauncher/actions/runs/4667573051)

Leshuguita commented 1 year ago

Nope, it works now!

Miepee commented 1 year ago

Nope, it works now!

Do you have openssl-1.1 installed? If yes, can you please remove it and try without it again?

rehtlaw commented 1 year ago

I made sure to delete openssl-1.1 before, and it also works for me.

Miepee commented 1 year ago

Thank you! If anyone still has that error, feel free to reopen this issue.

Issue (hopefully) fixed due to c86dee019dbc86ff3d9ba8ccab706537289a2e1d

jjhen99 commented 1 month ago

Hello,

I am also trying to install AM2R on Linux Mint and I am getting the same error. I have added a photo the error.

AM2R Error 2

Edit: I've also found the log file, here it is: AM2RLauncher.log

jjhen99 commented 1 month ago

I've cloned the repo and changed the libgit2sharp dependency to v0.29.0 like here in my pull request. I then ran dotnet publish AM2RLauncher.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -c release -r ubuntu.18.04-x64 --no-self-contained -o LinuxBuild in AM2RLauncher-main/AM2RLauncher .

I then get the following error:

"/home/jj/Documents/AM2RLauncher-main/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs(268,64): error CS0117: 'CloneOptions' does not contain a definition for 'OnTransferProgress' [/home/jj/Documents/AM2RLauncher-main/AM2RLauncher/AM2RLauncher/AM2RLauncher.csproj]"

I've tried the same using -r ubuntu.20.04-x64 instead but I get the same error.

jjhen99 commented 1 month ago

I've cloned the repo and changed the libgit2sharp dependency to v0.29.0 like here in my pull request. I then ran dotnet publish AM2RLauncher.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -c release -r ubuntu.18.04-x64 --no-self-contained -o LinuxBuild in AM2RLauncher-main/AM2RLauncher .

I then get the following error:

"/home/jj/Documents/AM2RLauncher-main/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs(268,64): error CS0117: 'CloneOptions' does not contain a definition for 'OnTransferProgress' [/home/jj/Documents/AM2RLauncher-main/AM2RLauncher/AM2RLauncher/AM2RLauncher.csproj]"

I've tried the same using -r ubuntu.20.04-x64 instead but I get the same error.

Never mind, I changed the dependency back to version 0.27.2 and it seems to be compiling fine. However, when I try to run AM2RLauncher in the LinuxBuild folder it doesn't seem to be running. Any advice on this?

Miepee commented 1 month ago

Not unless I can see any log info.

jjhen99 commented 1 month ago

I've actually switched to the flatpak version and I am trying to solve some issues with that at the moment, but here is the log file when I run AM2RLauncher in the LinuxBuild folder if you would like to take a look anyway. AM2RLauncher.log