Skip to content

Commit 18af0d7

Browse files
committed
Disable sandbox
1 parent 3799101 commit 18af0d7

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.github/workflows/build.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ jobs:
3636

3737
- name: Build Electron app
3838
run: |
39-
npm run electron-build
39+
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
40+
npm run electron-build
41+
# Remove chrome-sandbox as we're running with --no-sandbox
42+
rm -f dist/linux-unpacked/chrome-sandbox
43+
else
44+
npm run electron-build
45+
fi
4046
env:
4147
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4248

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@
9090
"linux": {
9191
"target": ["deb", "tar.gz"],
9292
"category": "Development",
93-
"maintainer": "Drivechain <support@drivechain.info>"
93+
"maintainer": "Drivechain <support@drivechain.info>",
94+
"asarUnpack": ["**/chrome-sandbox"],
95+
"executableName": "drivechain-launcher",
96+
"executableArgs": ["--no-sandbox"]
9497
},
9598
"win": {
9699
"target": "nsis"

public/electron.js

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ function createWindow() {
4242
contextIsolation: true,
4343
nodeIntegration: false,
4444
preload: path.join(__dirname, "preload.js"),
45+
sandbox: false
4546
},
4647
});
4748
mainWindow.loadURL(
@@ -514,6 +515,9 @@ async function initialize() {
514515
}
515516
}
516517

518+
// Disable sandbox
519+
app.commandLine.appendSwitch('no-sandbox');
520+
517521
app.whenReady().then(initialize);
518522

519523
let isShuttingDown = false;

0 commit comments

Comments
 (0)