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

Snapcraft failed due to wrong base #24

Closed
andrefedev opened this issue May 12, 2019 · 10 comments
Closed

Snapcraft failed due to wrong base #24

andrefedev opened this issue May 12, 2019 · 10 comments
Labels

Comments

@andrefedev
Copy link

Please describe your issue:

Config, note already install @electron-forge/maker-snap.

"config": {
  "forge": {
    "packagerConfig": {},
    "makers": [
      {
        "name": "@electron-forge/maker-snap",
        "config": {
          "name": "testing"
        }
      },
      {
        "name": "@electron-forge/maker-deb",
        "config": {}
      }
    ]
  }
}

Console output when you run electron-packager with the environment variable DEBUG='electron-forge:*'. Please include the stack trace if one exists.

> electron-forge make

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: snap, deb
⠋ Making for target: snap - On platform: linux - For arch: x64The browser-sandbox feature will trigger a manual review in the Snap store.
⠇ Making for target: snap - On platform: linux - For arch: x64Cloning into '/tmp/electron-snap-118146s11f3JFNyOr/parts/desktop-gtk3/src'...
⠸ Making for target: snap - On platform: linux - For arch: x64remote: Enumerating objects: 33, done.        
remote: Counting objects: 100% (33/33), done.        
remote: Compressing objects: 100% (23/23), done.        h: x64remote: Compressing objects:  30% (7/23)           
remote: Total 1334 (delta 11), reused 23 (delta 9), pack-reused 1301        
Receiving objects: 100% (1334/1334), 241.65 KiB | 4.74 MiB/s, done.
Resolving deltas: 100% (690/690), done.
⠸ Making for target: snap - On platform: linux - For arch: x64Snapcraft failed (2)
Re-run with the environment variable DEBUG=electron-installer-snap:snapcraft for details.
✖ Making for target: snap - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: snap
Exited with status 2
Error: Exited with status 2
    at closeArgsToError (/home/andres/testing/node_modules/cross-spawn-promise/lib/index.js:12:17)
    at ChildProcess.closeArgsToError (/home/andres/testing/node_modules/cross-spawn-promise/lib/index.js:66:21)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

npm ERR! Linux 4.15.0-1030-gcp
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "make"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! testing@1.0.0 make: `electron-forge make`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the testing@1.0.0 make script 'electron-forge make'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the testing package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron-forge make
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs testing
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls testing
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/andres/testing/npm-debug.log

What command line arguments are you passing? Alternatively, if you are using the API, what
parameters are you passing to the snap() function?

npm run make

@welcome
Copy link

welcome bot commented May 12, 2019

👋 Thanks for opening your first issue here! If you have a question about using electron-installer-snap, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@andrefedev andrefedev changed the title An unhandled error has occurred inside Forge (Snap) An unhandled error has occurred inside Forge May 12, 2019
@malept
Copy link
Member

malept commented May 12, 2019

There's not enough information here to help you out. Here's the error extracted from your output:

Snapcraft failed (2)
Re-run with the environment variable DEBUG=electron-installer-snap:snapcraft for details.

Can you please follow the instructions here to see why snapcraft is failing?

@malept malept changed the title (Snap) An unhandled error has occurred inside Forge Snapcraft failed with exit code 2 May 12, 2019
@andrefedev
Copy link
Author

andrefedev commented May 12, 2019

@malept Please reproduce the following steps:

System Info: Linux testing 4.15.0-1030-gcp #32-Ubuntu SMP Wed Apr 10 10:27:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

npm install -g @electron-forge/cli@beta
electron-forge init testing
npm install --save-dev @electron-forge/maker-snap

Add the following config in package.json

"config": {
  "forge": {
    "packagerConfig": {},
    "makers": [
      {
        "name": "@electron-forge/maker-snap",
        "config": {
          "name": "testing"
        }
      }
    ]
  }
}

Now let's try to execute make with DEBUG=electron-installer-snap:snapcraft

npm run make

Console output

$ npm run make
> testing@1.0.0 make /home/andres/testing
> electron-forge make
> electron-forge make

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: snap, deb
⠋ Making for target: snap - On platform: linux - For arch: x64The browser-sandbox feature will trigger a manual review in the Snap store.
⠙ Making for target: snap - On platform: linux - For arch: x64  electron-installer-snap:snapcraft Running '/snap/bin/snapcraft snap --target-arch=amd64 --output=/home/andres/testing/out/make/snap/testing_1.0.0_amd64.snap' in /tmp/electron-snap-22743g3Et3ySZbQ4N +0ms
⠼ Making for target: snap - On platform: linux - For arch: x64Setting target machine to 'amd64'
Hit http://us-central1.gce.archive.ubuntu.com/ubuntu bionic InRelease                                                                                        
Get:1 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                    
Get:2 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                                                                  
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                                                                  
Hit http://archive.canonical.com/ubuntu bionic InRelease                                                                                                     
Fetched 252 kB in 0s (0 B/s)                                                                                                                                 
⠹ Making for target: snap - On platform: linux - For arch: x64Pulling desktop-gtk3 
⠇ Making for target: snap - On platform: linux - For arch: x64Cloning into '/tmp/electron-snap-22743g3Et3ySZbQ4N/parts/desktop-gtk3/src'...
⠹ Making for target: snap - On platform: linux - For arch: x64remote: Enumerating objects: 33, done.        
remote: Counting objects: 100% (33/33), done.        
remote: Compressing objects: 100% (23/23), done.        
remote: Total 1334 (delta 11), reused 23 (delta 9), pack-reused 1301        cts:   4% (54/1334)   
Receiving objects: 100% (1334/1334), 241.65 KiB | 5.03 MiB/s, done.
Resolving deltas: 100% (690/690), done.
⠇ Making for target: snap - On platform: linux - For arch: x64'testing' has dependencies that need to be staged: desktop-gtk3
Skipping pull desktop-gtk3 (already ran)
⠸ Making for target: snap - On platform: linux - For arch: x64Building desktop-gtk3 
⠏ Making for target: snap - On platform: linux - For arch: x64make FLAVOR=gtk3 -j1
⠋ Making for target: snap - On platform: linux - For arch: x64gcc -Wall -O2 -o bindtextdomain.so -fPIC -shared ./../src/bindtextdomain.c -ldl
⠙ Making for target: snap - On platform: linux - For arch: x64make FLAVOR=gtk3 install DESTDIR=/tmp/electron-snap-22743g3Et3ySZbQ4N/parts/desktop-gtk3/install
install -D -m755 desktop-launch "/tmp/electron-snap-22743g3Et3ySZbQ4N/parts/desktop-gtk3/install"/bin/desktop-launch
install -D -m644 flavor-select "/tmp/electron-snap-22743g3Et3ySZbQ4N/parts/desktop-gtk3/install"/
install -D -m644 bindtextdomain.so "/tmp/electron-snap-22743g3Et3ySZbQ4N/parts/desktop-gtk3/install"/lib/bindtextdomain.so
⠙ Making for target: snap - On platform: linux - For arch: x64Staging desktop-gtk3 
Hit http://us-central1.gce.archive.ubuntu.com/ubuntu bionic InRelease                                                                                        
Get:1 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                    
Get:2 http://us-central1.gce.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                                                                  
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                                                                  
Hit http://archive.canonical.com/ubuntu bionic InRelease                                                                                                     
Fetched 252 kB in 0s (0 B/s)                                                                                                                                 
⠏ Making for target: snap - On platform: linux - For arch: x64Pulling testing 
⠙ Making for target: snap - On platform: linux - For arch: x64Skipping build desktop-gtk3 (already ran)
⠹ Making for target: snap - On platform: linux - For arch: x64Building testing 
⠙ Making for target: snap - On platform: linux - For arch: x64Skipping stage desktop-gtk3 (already ran)
Staging testing 
⠸ Making for target: snap - On platform: linux - For arch: x64Priming desktop-gtk3 
⠋ Making for target: snap - On platform: linux - For arch: x64The linker version '2.23' used by the base 'core' is incompatible with files in this snap:
    /tmp/electron-snap-22743g3Et3ySZbQ4N/prime/lib/x86_64-linux-gnu/libbsd.so.0.8.7 (2.25)
    /tmp/electron-snap-22743g3Et3ySZbQ4N/prime/lib/x86_64-linux-gnu/libexpat.so.1.6.7 (2.25)
    /tmp/electron-snap-22743g3Et3ySZbQ4N/prime/usr/lib/x86_64-linux-gnu/libexpatw.so.1.6.7 (2.25)
    /tmp/electron-snap-22743g3Et3ySZbQ4N/prime/usr/lib/x86_64-linux-gnu/libgnutls.so.30.14.10 (2.25)
    /tmp/electron-snap-22743g3Et3ySZbQ4N/prime/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2.2 (2.27)
    /tmp/electron-snap-22743g3Et3ySZbQ4N/prime/usr/lib/x86_64-linux-gnu/libp11-kit.so.0.3.0 (2.26)
⠴ Making for target: snap - On platform: linux - For arch: x64Snapcraft failed (2)
✖ Making for target: snap - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: snap
Exited with status 2
Error: Exited with status 2
    at closeArgsToError (/home/andres/testing/node_modules/cross-spawn-promise/lib/index.js:12:17)
    at ChildProcess.closeArgsToError (/home/andres/testing/node_modules/cross-spawn-promise/lib/index.js:66:21)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

npm ERR! Linux 4.15.0-1030-gcp
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "make"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! testing@1.0.0 make: `electron-forge make`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the testing@1.0.0 make script 'electron-forge make'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the testing package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron-forge make
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs testing
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls testing
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/andres/testing/npm-debug.log

@malept
Copy link
Member

malept commented May 12, 2019

That looks like the npm-debug.log output, not the console output.

@andrefedev
Copy link
Author

andrefedev commented May 12, 2019

That looks like the npm-debug.log output, not the console output.

I'm sorry, I just updated. It does not show anything different. What else can I do?

@malept
Copy link
Member

malept commented May 12, 2019

Run export DEBUG=electron-installer-snap:snapcraft and then npm run make.

@andrefedev
Copy link
Author

Run export DEBUG=electron-installer-snap:snapcraft and then npm run make.

Yes, please, check again

@malept
Copy link
Member

malept commented May 12, 2019

What version of Ubuntu is this?

@andrefedev
Copy link
Author

What version of Ubuntu is this?

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

@malept malept changed the title Snapcraft failed with exit code 2 Snapcraft failed due to wrong base May 12, 2019
@malept
Copy link
Member

malept commented May 12, 2019

In the config for maker-snap, set the snap config 'base': 'core18' (corresponding to Ubuntu 18.04), which was added to Snapcraft in 3.0: https://snapcraft.io/blog/make-your-snap-development-faster

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

No branches or pull requests

2 participants