cordova-electron icon indicating copy to clipboard operation
cordova-electron copied to clipboard

Broken snap packages

Open buu700 opened this issue 4 years ago • 1 comments

Bug Report

Problem

What is expected to happen?

Submitting the generated package to the Snap store should succeed.

What does actually happen?

Preparing to push 'cyph.snap'.
After pushing, an attempt will be made to release to 'stable'
Generating delta for 'cyph.snap'.
Pushing 'cyph.snap.xdelta3' [=========================================================================================================================================] 100%
Processing...|
Error while processing...
The store was unable to accept this snap.
  - checksums do not match. Please ensure the snap is created with either 'snapcraft pack <DIR>' (using snapcraft >= 2.38) or 'mksquashfs <dir> <snap> -noappend -comp xz -all-root -no-xattrs -no-fragments'. If using electron-builder, please upgrade to latest stable (>= 20.14.7). See https://forum.snapcraft.io/t/automated-reviews-and-snapcraft-2-38/4982/17 for details.
  - found errors in file output: unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework -> Versions/Current/Electron Framework', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Libraries -> Versions/Current/Libraries', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Resources -> Versions/Current/Resources', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/Current -> A', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Headers -> Versions/Current/Headers', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Mantle -> Versions/Current/Mantle', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Modules -> Versions/Current/Modules', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Resources -> Versions/Current/Resources', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Mantle.framework/Versions/Current -> A', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Headers -> Versions/Current/Headers', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Modules -> Versions/Current/Modules', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/ReactiveCocoa -> Versions/Current/ReactiveCocoa', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Resources -> Versions/Current/Resources', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current -> A', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Headers -> Versions/Current/Headers', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Modules -> Versions/Current/Modules', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Resources -> Versions/Current/Resources', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Squirrel -> Versions/Current/Squirrel', unusual mode 'rwxr-xr-x' for symlink './resources/app.asar.unpacked/node_modules/electron/dist/Electron.app/Contents/Frameworks/Squirrel.framework/Versions/Current -> A'

Information

Message from Canonical's manual review:

Note that the problem seems to be that there are many symlinks in the snap that have unusual permissions of 0755. If you adjust these to use the normal 0777 permissions, your snap will likely pass automated review.

Manually running chmod -R 777 . before building has no effect.

Command or Code

cordova build electron ; snapcraft push --release=stable platforms/electron/build/*.snap

Environment, Platform, Device

macOS 10.14.6

Version information

Cordova 9.0.0

Checklist

  • [X] I searched for existing GitHub issues
  • [X] I updated all Cordova tooling to most recent version
  • [X] I included all the necessary information above

buu700 avatar Sep 28 '19 01:09 buu700

Update: doing the Linux build from a Linux environment (actually just within a Docker container) resolved this issue. Seems that either cordova-electron or Electron itself should consider doing the same by default, similarly to how Windows builds are handled with Parallels.

buu700 avatar Feb 18 '20 03:02 buu700