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

Installing signal-desktop from yarn offline cache yields missing dependencies #6886

Closed
2 tasks done
skykanin opened this issue May 22, 2024 · 4 comments
Closed
2 tasks done

Comments

@skykanin
Copy link

skykanin commented May 22, 2024

Using a supported version?

  • I have searched searched open and closed issues for duplicates.
  • I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.

Overall summary

I'm attempting to package the signal desktop app for the nix package manager on linux. In that context I need to be able to install signal-desktop from yarn using an offline cache since you don't have internet access when building a package through nix. However, when I do this the resulting binary crashes with an exception Error: Cannot find module '../../build/linux/libringrtc-x64.node'. I can see from the build result that @signalapp/ringrtc is missing from the app.asar archive that gets built even though the package exists in the offline cache. However when building signal-desktop without an offline cache @signalapp/ringrtc isn't missing from app.asar.

Steps to reproduce

$ git clone https://github.com/signalapp/Signal-Desktop
$ cd Signal-Desktop
$ mkdir cache
$ yarn config --offline set yarn-offline-mirror cache
$ yarn install
$ rm -rf node_modules
$ yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts
$ # To run the next script with --offline remove 'build:dns-fallback' from 'generate' script in the package.json file
$ yarn --offline run generate
$ yarn --offline run build:esbuild:prod
$ yarn --offline run build:release \
      -- --linux dir \
      --config.npmRebuild=false
$ ls -l release/linux-unpacked/resources/app.asar.unpacked/node_modules/@signalapp # missing deps
drwxr-xr-x 3 skykanin users 4096 May 19 14:21 libsignal-client
$ ./release/linux-unpacked/signal-desktop # crashes with error linked below

Expected result

Expected ./release/linux-unpacked/signal-desktop to run without crashing.

Actual result

signal-desktop crashes with Error: Cannot find module '../../build/linux/libringrtc-x64.node'

Signal version

7.5.1

Operating system

NixOS 24.05.20240427.58a1abd (Uakari): "x86_64-linux"

@ayumi-signal
Copy link
Contributor

Hi, sorry this is happening for you and thanks for the issue. We don't have a good workflow for this condition so it will be hard to support but we'll do our best.

Installing libringrtc might require a connection -- can you check the output of some of commands (maybe yarn install) to see if there's any errors related to downloading?

@skykanin
Copy link
Author

skykanin commented May 23, 2024

Hi, sorry this is happening for you and thanks for the issue. We don't have a good workflow for this condition so it will be hard to support but we'll do our best.

Installing libringrtc might require a connection -- can you check the output of some of commands (maybe yarn install) to see if there's any errors related to downloading?

yes, I do see an error when running yarn install --offline, I thought it was unrelated, but maybe it's not. I'm not super familiar with the electron toolchain. I would've thought libringrtc is just installed like any other npm package, but maybe that's not the case?

@brjsp
Copy link

brjsp commented Jun 28, 2024

Yarn offline cache is hopelessly broken since it makes it impossible to patch dependencies.

You can start with the vendor script we use at openSUSE to see how it can be done.

@scottnonnenberg-signal
Copy link
Contributor

I'm gonna close this, as it's not a bug in the product itself, or even a goal of our development workflows. Feel free to continue talking about it here or in the forums: https://community.signalusers.org/c/beta-feedback/25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants