Skip to content

Commit 1d4b96b

Browse files
committed
Disable sandbox
1 parent 3799101 commit 1d4b96b

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.github/workflows/build.yml

+9
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,17 @@ jobs:
3535
run: npm run build
3636

3737
- name: Build Electron app
38+
if: matrix.os != 'ubuntu-latest'
39+
run: npm run electron-build
40+
env:
41+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Build Electron app (Linux)
44+
if: matrix.os == 'ubuntu-latest'
45+
shell: bash
3846
run: |
3947
npm run electron-build
48+
rm -f dist/linux-unpacked/chrome-sandbox
4049
env:
4150
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4251

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)