question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Building snap with stage packages on CI (question)

See original GitHub issue
  • Version: 22.5.1
  • Electron Version: 8.2.3
  • Electron Type (current, beta, nightly): current
  • Target: Linux (Snap)

My application is configured to build and publish snaps with an additional stage package configured as follows:

"snap": {
      "stagePackages": [
        "default",
        "libglu1-mesa"
      ]
}

The Multi Platform Build docs page states that the following commands must be run to allow this to work:

sudo snap install snapcraft --classic
sudo snap install multipass --beta --classic

thus my Travis CI configuration looks like this:

addons:
      snaps:
        - name: snapcraft
          confinement: classic
        - name: multipass
          confinement: classic
          channel: beta

However, when running a build, I receive the following error:

Setting target machine to 'amd64'
Launching a VM.
launch failed: multipass socket access denied
Please check that you have read/write permissions to '/var/snap/multipass/common/multipass_socket'
An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.

Snapcraft’s documentation seems to suggest that using the --destructive-mode flag would bypass the need for multipass entirely and resolve the issue, however to the best of my knowledge there isn’t an option to do this with electron-builder. I would be grateful for any insight into this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
adam-lynchcommented, Aug 10, 2020

While looking into another issue, I discovered export SNAP_DESTRUCTIVE_MODE="true" disables multipass too

1reaction
khrjcommented, Aug 9, 2020

Hi, I was stuck with the same issue about 2 days ago. You can set

export SNAPCRAFT_BUILD_ENVIRONMENT=host

and remove the multipass snap completely

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build and staging dependencies | Snapcraft documentation
Build and staging dependencies · Package types · Package and snap names · Identifying missing packages · Removing stage package duplication · Your...
Read more >
Multi Stage Pipelines in Snap CI. The Continuous Delivery book ...
In Snap CI, the deployment pipeline can be modeled as a series of custom build stages. Each stage consists of a set of...
Read more >
Use any Docker-based CI/CD to build your Snap Packages
How to use GitHub Actions or any other CI/CD based on Docker Containers to build Snap Packages for the Snap Store with Snapcraft....
Read more >
What's the proper order of stages in a CI build?
It is usually best to break the tests up into smaller quicker to run test sets (even if that means running two or...
Read more >
npm ci can only install packages with an ... - Stack Overflow
Something between npm version 8 and 8.5 seemed to be breaking the build in the same way as you in GitHub Actions. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found