Skip to content

Commit

Permalink
fix: Disable native handler for MAS builds (#67)
Browse files Browse the repository at this point in the history
* fix: Disable native handler for MAS builds

* doc: Add a disclaimer for MAS builds
  • Loading branch information
jan-auer authored Apr 17, 2018
1 parent cd034c7 commit 8a23eef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/native.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ renderers crashes. To do so, the SDK needs to upload those files once the
application restarts (or immediately for renderer crashes). All event meta data
including user information and breadcrumbs are included in these uploads.

Due to restrictions of macOS app sandboxing, native crashes cannot be collected
in Mac App Store builds. In this case, native crash handling will be disabled,
regardless of the ``enableNative`` setting.

.. admonition:: A Word on Data Privacy

Minidumps are memory dumps of the process at the moment it crashes. As such,
Expand Down
7 changes: 7 additions & 0 deletions src/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,13 @@ export class ElectronBackend implements Backend {
return false;
}

// Mac AppStore builds cannot run the crash reporter due to the sandboxing
// requirements. In this case, we prevent enabling native crashes entirely.
// https://electronjs.org/docs/tutorial/mac-app-store-submission-guide#limitations-of-mas-build
if (process.mas) {
return false;
}

return this.frontend.getOptions().enableNative !== false;
}

Expand Down

0 comments on commit 8a23eef

Please sign in to comment.