owlbear-rodeo / kenku-fm

Online tabletop audio sharing for Discord
https://www.kenku.fm
GNU General Public License v3.0
189 stars 32 forks source link

[severus] Linux Mint 21.1 JavaScript Error using AMD64 *.deb (Version 1.3.1/2 Only) #82

Closed cas206 closed 1 year ago

cas206 commented 1 year ago

Describe the bug Starting as kenku-fm from the command line gives an error. The process hangs until killed.

A JavaScript error occurred in the main process Uncaught Exception: Error: libssl.so.1.1: cannot open shared object file: No such file or directory at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1810) at Module._extensions..node (node:internal/modules/cjs/loader:1205:18) at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1810) at Module.load (node:internal/modules/cjs/loader:988:32) at Module._load (node:internal/modules/cjs/loader:829:12) at c._load (node:electron/js2c/asar_bundle:5:13339) at Module.require (node:internal/modules/cjs/loader:1012:19) at require (node:internal/modules/cjs/helpers:102:18) at 85109 (/usr/lib/kenku-fm/resources/app/.webpack/main/index.js:2:58) at __webpack_require__ (/usr/lib/kenku-fm/resources/app/.webpack/main/index.js:14:517194)

To Reproduce 1) Install kenku-fm_1.3.2_amd64.deb with dpkg. 2) Run kenku-fm at command line.

Expected behavior Normal Kenku-FM behavior

Screenshots N/A

Desktop (please complete the following information):

Additional context I was running version 1.2.2 with no errors (except sound quit since I last used it a week ago). I tested an install and run of prior versions, 1.2.4, and 1.3.0. These install and run without error. It's just version 1.3.2 that gives the JavaScript startup error.

nthouliss commented 1 year ago

Have you also tested 1.3.1?

lanice commented 1 year ago

I've had the same issue (Ubuntu 22.04). Tried 1.3.2, wouldn't start. Installed 1.3.1, same issue. Installed 1.3.0, it works. So I'm on 1.3.0 at the moment.

cas206 commented 1 year ago

For some reason my eyes glazed over and missed seeing the 1.3.1 Release. I tried it, also, and as the prior commenter noted, it also had the same error.

cas206 commented 1 year ago

I did a find on my system for libssl.so.1.1. Found a version of it that shipped with Sublime Text editor. I copied it over to /usr/lib/kenku-fm/ and the next error was for libcrypto.so.1.1. So I copied that over from Sublime Text editor to /usr/lib/kenku-fm/. Kenku-FM now starts without error.

nthouliss commented 1 year ago

1.3.1 onwards changed how we evaluate certificates because of an issue with Windows (#77).

In terms of functionality, you're not missing anything between 1.3.0 and 1.3.2, so stick with it for now. We'll see what we need to do to patch it out without affecting Windows as well. It may take us some time. Good thing is we can reproduce this on our end.

ion201 commented 1 year ago

On Arch linux, I just added openssl-1.1 as a dependency for this release.

It looks like there's a similar, libssl1.1 package in Ubuntu 18 and 20 which could be required by this app.

Lim-Dul commented 1 year ago

OK, so, the problem is that Ubuntu and its downstream distros like Mint removed OpenSSL 1.1.1 support starting with 22.04 and use OpenSSL 3 now. The issue is that the rust-openssl bindings don't detect the OpenSSL version on Ubuntu et al correctly. There's a ton of talk about it on the https://github.com/sfackler/rust-openssl/issues?q=is%3Aissue+is%3Aopen+openssl GitHub.

Anyways, until this is resolved, all I can offer is a work-around, with which I managed to run KenkuFM on Ubuntu 22.04 LTS. Adapted from an answer here: https://stackoverflow.com/questions/72133316/libssl-so-1-1-cannot-open-shared-object-file-no-such-file-or-directory

Use the following commands in order:

sudo apt update && sudo apt install build-essential
wget https://www.openssl.org/source/openssl-1.1.1t.tar.gz
tar -zxvf openssl-1.1.1t.tar.gz
cd openssl-1.1.1t
./config && make && make test
mkdir -p $HOME/opt/lib
cp libcrypto.so.1.1 $HOME/opt/lib/
cp libssl.so.1.1 $HOME/opt/lib/

echo export LD_LIBRARY_PATH=$HOME/opt/lib:$LD_LIBRARY_PATH >> $HOME/.bashrc

Now running KenkuFM 1.3.2 from the terminal should work.

Alternative (at least using the way KenkuFM is installed on Ubuntu) to run it normally, copy the two libraries directly into its folder:

sudo cp libcrypto.so.1.1 /usr/lib/kenku-fm
sudo cp libssl.so.1.1 /usr/lib/kenku-fm

image image

nthouliss commented 1 year ago

We've published a release candidate package, it was running successfully without needed to get OpenSSL 1.1 installed on our test but it'd still be nice to have it double-checked by ya'll.

https://github.com/owlbear-rodeo/kenku-fm/releases/tag/v1.3.3-rc

lanice commented 1 year ago

Just tested it, works for me (Ubuntu 22.04)!

Lim-Dul commented 1 year ago

Confirmed fixed in KenkuFM 1.3.3-rc on Ubuntu 22.04 and Fedora 36 without OpenSSL 1.1. See lsb_release -a for both systems and no libssl.so.1.1 via find on screenshots. Not testing Mint since it is a descendant of Ubuntu anyways. image image

P.S. Also ran from source to check whether the build process complained about not finding OpenSSL on Ubuntu 22.04. Would be weird if it did, but of course it didn't. ;) image

cas206 commented 1 year ago

Tested Linux Mint and it works.

nthouliss commented 1 year ago

This should no longer be an issue for v1.4.0 (which reverts changes between v1.3.0 and v1.3.2)

I'm going to leave this open as we'll be tracking it as part of our experimental version

lanice commented 1 year ago

Just out of curiosity, v1.3.0 introduced the new Rust audio pipeline, which is also being reverted in v1.4.0? Are there too many issue with that, or why is that being removed?

Lim-Dul commented 1 year ago

Just out of curiosity, v1.3.0 introduced the new Rust audio pipeline, which is also being reverted in v1.4.0? Are there too many issue with that, or why is that being removed?

Unfortunately yes. As is often the case with major changes, it works perfectly fine for some users in certain setups but there seems to be a not insignificant number of people for whom KenkuFM completely broke... :(

See this announcement on Discord: https://discord.com/channels/795808973743194152/892066860575637584/1090459114833985577

As well as Issues: #85 #88 in addition to this one.

lanice commented 1 year ago

Got it, yes that makes sense. Glad to read that there will be an experimental version continuing the new pipeline!

nthouliss commented 1 year ago

This should be fixed as part of our experimental release, you can find it in our releases page or at https://www.kenku.fm/experimental