Skip to content

Commit

Permalink
fix(electron): disable sandbox to make electron-log work (#1143)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue authored Oct 10, 2022
1 parent a193966 commit 749560f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-ducks-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rino.app/electron": patch
---

Fix a desktop app crash.
5 changes: 5 additions & 0 deletions packages/electron-main/src/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ export async function createWindow() {
webPreferences: {
preload: preloadEntry,

// Disable sandbox until we `electron-log` can be used in the
// preload script when sandbox is enable. See also
// https://github.com/megahertz/electron-log/issues/267
sandbox: false,

// I need to disable web security in dev mode to load local image files
// https://stackoverflow.com/a/50319258/9426588
webSecurity: !env.IS_DEV,
Expand Down

0 comments on commit 749560f

Please sign in to comment.