element-hq / element-desktop

A glossy Matrix collaboration client for desktop.
https://element.io
GNU Affero General Public License v3.0
1.15k stars 261 forks source link

libsqlcipher1 support #1520

Open neochine opened 8 months ago

neochine commented 8 months ago

Steps to reproduce

libsqlcipher.so.0 Seshat unexpected error: Error: libsqlcipher.so.0: cannot open shared object file: No such file or directory at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:2238) at Module._extensions..node (node:internal/modules/cjs/loader:1356:18) at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2465) at Module.load (node:internal/modules/cjs/loader:1126:32) at Module._load (node:internal/modules/cjs/loader:967:12) at l._load (node:electron/js2c/asar_bundle:2:13642) at Module.require (node:internal/modules/cjs/loader:1150:19) at require (node:internal/modules/cjs/helpers:119:18) at Object. (/opt/Element/resources/app.asar/node_modules/matrix-seshat/index.js:16:22) at Module._compile (node:internal/modules/cjs/loader:1271:14) { code: 'ERR_DLOPEN_FAILED' } /root/.config/Element exists: no /root/.config/Riot exists: no Starting auto update with base URL: https://packages.element.io/desktop/update/ Auto update not supported on this platform Fetching translation json for locale: en_EN Resetting the UI components after locale change [101764:0219/185556.590530:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service. [101764:0219/185556.722120:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service. [101764:0219/185556.787840:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service. ^C[101764:0219/185556.839146:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service. sudo apt-get install libsqlcipher0 Reading package lists... Done Building dependency tree... Done Reading state information... Done Package libsqlcipher0 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'libsqlcipher0' has no installation candidate

Outcome

Run normally. It produces blank screen

Operating system

Debian (kali linux)

Application version

Latest today

How did you install the app?

From element website. 1990 sudo wget -O /usr/share/keyrings/element-io-archive-keyring.gpg https://packages.element.io/debian/element-io-archive-keyring.gpg 1991 ‍ 1992 echo "deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main" | sudo tee /etc/apt/sources.list.d/element-io.list 1993 sudo apt update 1994 sudo apt install element-desktop

Homeserver

No response

Will you send logs?

Yes

t3chguy commented 8 months ago

Cannot reproduce the blank screen.

image image After setting up a keyring passphrase: image

The libsqlcipher error is due to Kali not installing recommended packages by default. libsqlcipher is a recommended dependency, not all vendors have it available. Without libsqlcipher seshat will not function and you will not have encrypted search.

neochine commented 7 months ago

image I am running i3wm on xfce. Yours looks gnome. Maybe its keyring related? image I see this popping up in side bar. Clicking green element gives me this image

t3chguy commented 7 months ago

You can use Ctrl+Shift+I on that blank page to see what is the underlying error in the renderer process

neochine commented 7 months ago

image image

t3chguy commented 7 months ago

Anything earlier in the stdout?

https://private-user-images.githubusercontent.com/150173528/308981717-3f280137-45df-4d12-baa1-ff1d165b7a1c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDkyMjI1MjMsIm5iZiI6MTcwOTIyMjIyMywicGF0aCI6Ii8xNTAxNzM1MjgvMzA4OTgxNzE3LTNmMjgwMTM3LTQ1ZGYtNGQxMi1iYWExLWZmMWQxNjViN2ExYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDIyOVQxNTU3MDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01NWFjZWQ3ZTBhMjJjMzJkZDZkMTNiOWI4MDY1ZDEyZDBiYWIwODM1MGQzNzJiYmEwZmZlMjFmMzgzMDNmNjAwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.wHqaqnQ_WDcNuBMH36gj40S5IJCcXn4c-4vRHTnVKJw

neochine commented 7 months ago

Seshat unexpected error: Error: libsqlcipher.so.0: cannot open shared object file: No such file or directory
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:2238)
    at Module._extensions..node (node:internal/modules/cjs/loader:1356:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2465)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at Module._load (node:internal/modules/cjs/loader:967:12)
    at l._load (node:electron/js2c/asar_bundle:2:13642)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/opt/Element/resources/app.asar/node_modules/matrix-seshat/index.js:16:22)
    at Module._compile (node:internal/modules/cjs/loader:1271:14) {
  code: 'ERR_DLOPEN_FAILED'
}
/root/.config/Element exists: no
/root/.config/Riot exists: no
Starting auto update with base URL: https://packages.element.io/desktop/update/
Auto update not supported on this platform
Fetching translation json for locale: en_EN
Resetting the UI components after locale change
[164950:0229/215021.752643:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215021.857453:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215021.936105:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.061972:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.120543:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
^[[A^[[A^[[A[164950:0229/215022.178757:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.227897:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.281881:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.330425:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.378005:ERROR:network_service_instance_impl.cc(601)] Network se                                                                                     rvice crashed, restarting service.                                                                                                                                     
[164950:0229/215022.438228:ERROR:network_service_instance_impl.cc(601)] Network se                                                                                     rvice crashed, restarting service.
[164950:0229/215022.502585:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.548774:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.601632:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.650584:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.698302:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.749326:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.798158:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.846191:ERROR:network_service_instance_impl.cc(601)] Network service crashed, restarting service.
[164950:0229/215022.894616:ERROR:network_service_instance_impl.cc(601)] Network s```
t3chguy commented 7 months ago

This seems like an upstream Electron issue which is specific to your environment

neochine commented 7 months ago

Is there a way to debug? I am trying npm install electron -g or try to upgrade it. Discord is also electron based afaik and it works alright

neochine commented 7 months ago

I am also running it on root. So all chromium based/node based application including discord, element-desktop requires --no-sandbox. Is there any root check or sandboxing thats potentially causing this?

t3chguy commented 7 months ago

I am also running it on root. So all chromium based/node based application including discord, element-desktop requires --no-sandbox. Is there any root check or sandboxing thats potentially causing this?

Possibly, but it'd be within Electron, not the app code

bblacher commented 6 months ago

@neochine are you still experiencing this? I had the same issue but it was fixed with the upgrade to electron29.

neochine commented 6 months ago

I will try updating to Electron29 and retrying!

bblacher commented 6 months ago

@neochine Did that solve your issue?

neochine commented 6 months ago

Not really, launching element-desktop after updating electron still shows same blank screen. I guess the issue can be closed though given its not element related but electron related. I am using web element for now electron --version --no-sandbox v29.3.0

@bblacher This also doesnt work

  /usr/local/lib/node_modules/electron/dist/electron --no-sandbox /usr/bin/element-desktop
App threw an error during load
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for /opt/Element/element-desktop
    at new NodeError (node:internal/errors:406:5)
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:100:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:143:36)
    at defaultLoad (node:internal/modules/esm/load:119:20)
    at ModuleLoader.load (node:internal/modules/esm/loader:396:13)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:56)
    at new ModuleJob (node:internal/modules/esm/module_job:65:26)
    at #createModuleJob (node:internal/modules/esm/loader:290:17)
    at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:248:34)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:229:17)
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for /opt/Element/element-desktop
    at new NodeError (node:internal/errors:406:5)
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:100:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:143:36)
    at defaultLoad (node:internal/modules/esm/load:119:20)
    at ModuleLoader.load (node:internal/modules/esm/loader:396:13)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:56)
    at new ModuleJob (node:internal/modules/esm/module_job:65:26)
    at #createModuleJob (node:internal/modules/esm/loader:290:17)
    at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:248:34)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:229:17)
bblacher commented 6 months ago

Are you running element desktop as root?

neochine commented 6 months ago

Yes. I use mostly root user so I need --no-sandbox. Discord & Session is electron based and works fine

DarkmatterUAE commented 5 months ago

The libsqlcipher error is due to Kali not installing recommended packages by default. libsqlcipher is a recommended dependency, not all vendors have it available. Without libsqlcipher seshat will not function and you will not have encrypted search.

No it's not. The root problem is, Debian renamed package libsqlcipher0 to libsqlcipher1 in Debian testing, and Kali Linux is based on Debian testing. Without package named libsqlcipher0 to install, the recommended package is not installed.

You need to install libsqlcipher1 to provide that shared library file.

In a terminal window, apt install libsqlcipher0 returns "libsqlcipher0 has no installation candidate", and searching "libsqlcipher" resulted in a similarly-named "libsqlcipher1" which is the original "libsqlcipher0" package required by element-desktop

Currently I recommend that package element-desktop's recommended packages being modified to either libsqlcipher0 (can be satisfied if installing on Debian stable) or libsqlcipher1 (can be satisfied if installing on Debian testing and its derivatives) so they will be installed either way.

Also why is this a "recommended" package? If element-desktop depends on that it should be set as a dependency that must be satisfied IMO.

neochine commented 5 months ago

The issue seems to be unrelated to libsqlcipher I think. Its needed for only encrypted search as the dev said. Perhaps opening new issue to fulfill libsqlcipher problems (moving it from recommended to required?). Regardless, not sure why element seems to be producing blank screen given I have run few electron based apps with no issue.