This forces all Electron apps built with electron-installer-snap to be sandboxed, which causes automatic reviews to fail and also seems to make manual reviews fail. I tried forking electron-installer-snap and making it not add that stuff, but now it seems to be stuck Processing.../ when trying to push the build.
I’m unsure exactly what is correct to do here, but they seem to think browser-sandbox should be required for Electron apps for some reason.
While I do think we should resolve this issue for the wider Electron community, I also would like to request that I be added as a vetted publisher, so I can actually publish my app in the meantime.
Thanks so much in advance and I hope we can get this resolved!
@roadmr ah okay. Either way, we should figure out these Electron issues and/or I would like to request that we become a vetted publisher, but please do let me know when the upload queue is fixed. Perhaps some of the previous builds actually were going to work. I’ll have to try again.
I’m not familiar enough with electron-installer-snap to say how to adjust browserSandbox to false for your build, but can say that it is a bug in electron-installer-snap that it is setting this automatically since its use is restricted (see https://snapcraft.io/docs/browser-support-interface).
I can say that many people use electron-builder which defaults to not using allow-sandbox: true and they don’t face this problem. This certainly should be a fixable problem for electron-installer-snap (I suggest filing a bug with them).
In the meantime and in addition to the recommendation to set browserSandbox to false in your build, you may also need to strip the setuid bit from chrome-sandbox if electron-installer-snap is installing the setuid helper.
@jdstrand I forked electron-installer-snap and added the ability to set browserSandbox: false. This seems to get around the first issue, but as you mentioned I think we still have the chrome-sandbox issue.
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. security-snap-v2_squashfs_repack_checksum What does this mean?
found errors in file output: unusual mode 'rwsr-xr-x' for entry './swach/chrome-sandbox' security-snap-v2_squashfs_files
The store was unable to accept this snap.
- found errors in file output: unusual mode 'rwsr-xr-x' for entry './swach/chrome-sandbox'
- 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.
The first command will unpack the squash onto your system, and since you are not root the setuid bit is stripped. The second reconstructs the snap using the provided directory.
Do the unsquashfs and snapcraft pack commands overwrite the existing .snap file or does it create a new one and there would be two that exist? I was wondering if perhaps it is modifying a new one, but the old one is still broken or something.
Ah, yep, I just had to change the snapcraft push path to snapcraft push ./*.snap --release stable and it passed review now! Thanks everyone for your help.
@jdstrand so now my app is in the Snap Store, but it doesn’t seem to run anymore. Perhaps it did need the sandbox? I’m unsure how to debug why the app doesn’t work. Any suggestions? It’s called Swach, if you want to try to install and run it.
@ogra I don’t know what you mean. How would I do that? I need it to start up like a normal app for people downloading it. It’s an Electron app, and it runs when I package it as .deb. I am not familiar with what I need to do to setup the correct plugs and such for Snap.
The app never appears to launch though. I do not know how to debug the issue. I do know it works great when I build and install a .deb so I imagine it is missing something. Any ideas how to proceed?