Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Error while loading shared libraries: libssl.so.1.1 #4470

Closed
ozgunozerk opened this issue Jun 25, 2022 · 5 comments
Closed

[bug] Error while loading shared libraries: libssl.so.1.1 #4470

ozgunozerk opened this issue Jun 25, 2022 · 5 comments

Comments

@ozgunozerk
Copy link

ozgunozerk commented Jun 25, 2022

Describe the bug

The tauri app does not work on some Linux machines, complaining:
Error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

I managed to work my way around via adding openssl with vendored feature enabled in cargo.toml. However, it felt weird. Could there be a bug on the tauri side? It feels like I shouldn't even have to do this. My application does not need OpenSSL (there weren't any entry for openssl in cargo.toml, and it is working in macos&windows, and most of the linux machines).

I'm distributing the application as .deb.
For building the executable, I'm using tauri/actions v0.3

This bug does not happen in my Ubuntu 22.04 (it is able to run it), but I heard about it only for some other Ubuntu machines
(including 22.04). Also, it is reproducable with Docker, using ubuntu:latest.

Our application is subspace-desktop, here is the link to the repo: https://github.com/subspace/subspace-desktop

Reproduction

No response

Expected behavior

No response

Platform and versions

Environment
  › OS: Mac OS 12.3.1 X64
  › Node.js: 16.11.0
  › npm: 8.0.0
  › pnpm: Not installed!
  › yarn: 1.22.19
  › rustup: 1.24.3
  › rustc: 1.60.0-nightly
  › cargo: 1.60.0-nightly
  › Rust toolchain: nightly-2022-02-15-aarch64-apple-darwin 

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.7
  › @tauri-apps/api [NPM]: 1.0.0-rc.5
  › tauri [RUST]: 1.0.0-rc.11,
  › tauri-build [RUST]: 1.0.0-rc.9,
  › tao [RUST]: 0.8.4,
  › wry [RUST]: 0.16.2,

App
  › build-type: bundle
  › CSP: default-src https tauri 'self'; img-src 'self'; object-src 'none'; connect-src ws://localhost:9947/; script-src 'wasm-unsafe-eval' 'unsafe-eval' 'self'
  › distDir: ../dist/pwa
  › devPath: http://localhost:3009/
  › framework: Vue.js (Quasar)
  › bundler: Webpack

App directory structure
  ├─ dist
  ├─ node_modules
  ├─ .quasar
  ├─ src-pwa
  ├─ docs
  ├─ public
  ├─ .github
  ├─ src-tauri
  ├─ .git
  ├─ .vscode
  ├─ .idea
  └─ src

Stack trace

No response

Additional context

build target was ubuntu-latest

@amrbashir amrbashir changed the title [bug] [bug] Error while loading shared libraries: libssl.so.1.1 Jun 25, 2022
@ozgunozerk
Copy link
Author

ozgunozerk commented Jun 25, 2022

With @FabianLars' suggestion, I got rid of the allowlist, and the error is no longer there.
My allowlist was like that:

"allowlist": {
      "all": true,
      "fs": {
        "all": true,
        "scope": ["$HOME/*"]
      },
      "shell": {
        "all": true,
        "execute": true,
        "open": "[/subspace\\-desktop/]",
        "scope": [
          {
            "name": "run-osascript",
            "cmd": "osascript",
            "args": true
          }
        ]
      }
    },

However, I believe this is only for debugging the issue. I need the allowlist :D

@envis10n
Copy link

I'm having the same problem. Went to test my build on a live session of 22.04 and it has the same error. I don't have anything in my allow list though, so I'm not sure what the issue actually is.

This was also built using GitHub Actions (ubuntu-latest), so maybe it's a problem with that? It seemed to work fine when building locally.

@FabianLars
Copy link
Member

For reference here is the related discord thread: https://discord.com/channels/616186924390023171/990276501872181319

tldr: Ubuntu 2204 switched from openssl1.1 to openssl3.0 and they are not compatible with each other. The problem here is that if you built you app on an older version than 2204 (which you should), it won't run correctly on distros/distro-versions with openssl@v3.
This is only an issue if you use tauri's http apis (as in: you have it on your allowlist) or if you have the updater enabled.

We basically have 2 ways to go here:

  1. Switch to rustls, this should be a problem audit wise and it doesn't cover all of openssl, so this may introduce new problems.
  2. vendor openssl (=include it with the app), problems with that are:
    1. attohttpc doesn't have that option yet (the alternative reqwest client does)
    2. bigger bundle size
    3. it needs more build dependencies (namingly perl, the rest of the deps should be covered by tauri's deps)
    4. The app's ssl library doesn't get security updates (this is pretty huge for openssl)

@ozgunozerk
Copy link
Author

I ended up using the vendored version of openssl in cargo toml.
Feel free to keep this issue open/closed guys as you wish (I don't know the plans of tauri on this issue). Thanks for the wonderful support.

@Hashmozy
Copy link

So far you need a Linux standard base (LSB) to run some third party programs. Jus after installing LSB on your Linux everything should be ok to fix the problem.
Sudo apt install lsb

FlysoftBeta added a commit to Flysoft-Studio/magenta that referenced this issue Dec 2, 2022
FlysoftBeta added a commit to Flysoft-Studio/magenta that referenced this issue Dec 2, 2022
SommerEngineering added a commit to SommerEngineering/AI-Studio that referenced this issue Jun 11, 2024
SommerEngineering added a commit to SommerEngineering/AI-Studio that referenced this issue Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@envis10n @FabianLars @ozgunozerk @amrbashir @Hashmozy and others