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

AppImage and search of encrypted chats #46

Closed
benneti opened this issue Feb 18, 2021 · 25 comments
Closed

AppImage and search of encrypted chats #46

benneti opened this issue Feb 18, 2021 · 25 comments
Labels
build infrastructure encrypted room search Something is off with search in encrypted rooms help wanted Extra attention is needed

Comments

@benneti
Copy link

benneti commented Feb 18, 2021

Is it possible to enable search for encrypted chats in the appimage builds?
This would be really great, as these builds are the simplest way to get schildichat desktop on non Debian based linux distributions.

@su-ex
Copy link
Member

su-ex commented Feb 18, 2021

Does it work with Element? Last time I checked there was an issue for Element about that.

@su-ex su-ex added help wanted Extra attention is needed build infrastructure question Further information is requested labels Feb 18, 2021
@benneti
Copy link
Author

benneti commented Feb 19, 2021

The only semi useful bug report in element I saw was element-hq/element-web#14229 and I don't think element has an official appimage (yet).
I think what might be worth a try that I try to get the deb up and running in a virtuel env and check wether it works there and if it does it should be a packaging problem of the appimage (I guess).

@benneti
Copy link
Author

benneti commented Feb 19, 2021

after some further investigation I think that the problem is that it cannot find libsqlcipher.so (even if it is existing in the virtual environment), do you think it is possible to add sqlcipher to the appimage (if it is not already)

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

Indeed, a possible solution could be electron-userland/electron-builder#2732 (comment).

@benneti
Copy link
Author

benneti commented Feb 19, 2021

It could be, is there a way to tell element/schildichat desktop to provide additional debugging information or write to a log file?
Also if you add it to the package.json I am happy to try it!
EDIT: also maybe relevant, EventStore gets created but the events.db is empty

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

Seems adding libsqlcipher isn't enough, I don't know what else could potentially be missing.

@benneti
Copy link
Author

benneti commented Feb 19, 2021

could it be libsecret?
But I think for this library it makes sense to rely on the system.
EDIT: Do you have a link to the build, then I could try with libsecret in the environment and also according to taw00/element-rpm#41 (comment) the element code is a bit picky about the version

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

About debugging: Lunching from terminal and the devtools console is all I know about.
Link to AppImage with libsqlcipher: https://cloud.supercable.onl/s/5YEg2s558aEXQM7
For libsecret to rely on the system probably makes more sense indeed.

@benneti
Copy link
Author

benneti commented Feb 19, 2021

Ah ok thank you, it seems it was not the missing libsecret, also the appimage seems to not work with the devtools:

schildichat-desktop -- --devtools
Error: Cannot find module 'electron-devtools-installer'
Require stack:
- /nix/store/ihqz08m7mc134r2p2i56427lkzhcizj1-schildichat-desktop-1.7.20-sc1-extracted/resources/app.asar/src/electron-main.js
-
    at Module._resolveFilename (internal/modules/cjs/loader.js:961:15)
    at Function.o._resolveFilename (electron/js2c/browser_init.js:257:921)
    at Module._load (internal/modules/cjs/loader.js:844:27)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (internal/modules/cjs/loader.js:1023:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at App.<anonymous> (/nix/store/ihqz08m7mc134r2p2i56427lkzhcizj1-schildichat-desktop-1.7.20-sc1-extracted/resources/app.asar/src/electron-main.js:827:80) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/nix/store/ihqz08m7mc134r2p2i56427lkzhcizj1-schildichat-desktop-1.7.20-sc1-extracted/resources/app.asar/src/electron-main.js',
    undefined
  ]
}
No update_base_url is defined: auto update is disabled

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

I meant launching through ./SchildiChat....AppImage.
devtools from electron (Chromium) once it's open I meant (Ctrl+Shift+I or soemthing like that).

@benneti
Copy link
Author

benneti commented Feb 19, 2021

Ok this confirms the problem:

EventIndex: Error initializing the event index 
Object
message: "Error opening the database: SqlCipherError("Sqlcipher support is missing")"
__proto__: Object

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

Can you check libsqlcipher is included (the ./MyApp.AppImage --appimage-extract in the issue post I linked above at the end)?

@benneti
Copy link
Author

benneti commented Feb 19, 2021

it is there

appimagetool -l SchildiChat-1.7.21-sc1.AppImage | grep libsqlcipher                                                                     appimagekit
appimagetool, continuous build (commit ), build <local dev build> built on 2021-02-06 18:22:40 UTC
usr/lib/libsqlcipher.so.0

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

Then I have absolutely no clue what's missing.

@benneti
Copy link
Author

benneti commented Feb 19, 2021

Me neither

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

Maybe a naming or path issue. 🤔
However I don't know how to find out where it looks for that library.

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

Did you try clearing cache and maybe logout/login?
At least I had to do that with the Debian build (it didn't instantly pick that up after I noticed through this here that libsqlcipher wasn't listed as dependency for the deb 😅).

@benneti
Copy link
Author

benneti commented Feb 19, 2021

where does the deb expect the libraries maybe I can get this one to work in nixos 😅 ?

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

/usr/lib/x86_64-linux-gnu/libsqlcipher.so.0

@benneti
Copy link
Author

benneti commented Feb 19, 2021

I'll try to emulate this in my environment then.
Also could this at all be related to this:
DEPRECATED CONFIG OPTION: In the future, default_server_name will not be accepted. Please use default_server_config instead.
e. @ init.js:1

@su-ex
Copy link
Member

su-ex commented Feb 19, 2021

I don't think this is related.

@benneti
Copy link
Author

benneti commented Feb 19, 2021

Starting from

schildichat-desktop                     
Seshat unexpected error: Error: libsqlcipher.so.0: cannot open shared object file: No such file or directory
    at process.func [as dlopen] (electron/js2c/asar.js:140:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1196:18)
    at Object.func [as .node] (electron/js2c/asar.js:149:18)
    at Module.load (internal/modules/cjs/loader.js:981:32)
    at Module._load (internal/modules/cjs/loader.js:881:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (internal/modules/cjs/loader.js:1023:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/nix/store/r6600gbyx4s946kfws08xl413n2g2d5f-schildichat-desktop-1.7.20-sc1/share/schildichat-desktop/resources/app.asar/node_modules/matrix-seshat/lib/index.js:15:16)
    at Module._compile (internal/modules/cjs/loader.js:1145:30)
No update_base_url is defined: auto update is disabled
^C%                                 

I can get to

schildichat-desktop                     
No update_base_url is defined: auto update is disabled

but search still does not work even after completely purging my local configuration.

So it might after all not be related to the missing library per se, maybe its a version mismatch I don't know.

@su-ex su-ex removed the question Further information is requested label Mar 16, 2021
@su-ex
Copy link
Member

su-ex commented Jan 14, 2022

@benneti Is this still an issue for you? It seems it might work (now).
See here and subsequent messages: https://matrix.to/#/!eSTlitQAfqxWWEHMFD:matrix.org/$uqDJfF_yOHPgqGxOd7kMTicVW_Dx5CXrDRyFxrE4guI?via=supercable.onl&via=matrix.org&via=envs.net

@su-ex su-ex changed the title AppImage and search of encryptet chats AppImage and search of encrypted chats Jan 14, 2022
@benneti
Copy link
Author

benneti commented Jan 23, 2022

sorry for the late reply, I don't use the appimage anymore. So if someone has it working I think this can definitely be closed.
Also if it still matters I think by now this was the problem: sqlcipher/sqlcipher#385 i.e. that SQLite was loaded instead of SQLCipher .

@su-ex
Copy link
Member

su-ex commented Jan 23, 2022

This may be, this hit me a few times already.
Thanks for answering! If this is still an issue, this one might be reopened or a new one created.

@su-ex su-ex closed this as completed Jan 23, 2022
@su-ex su-ex added the encrypted room search Something is off with search in encrypted rooms label Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build infrastructure encrypted room search Something is off with search in encrypted rooms help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants