Skip to content

Commit fadf50c

Browse files
committed
More abort testing
1 parent ab1a20c commit fadf50c

File tree

6 files changed

+78
-0
lines changed

6 files changed

+78
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"method": "minidump",
3+
"namespacedData": {
4+
"initialScope": {
5+
"release":"[email protected]",
6+
"user": {
7+
"username": "some_user"
8+
}
9+
}
10+
},
11+
"sentryKey": "37f8a2ee37c0409d8970bc7559c7c7e4",
12+
"appId": "277345",
13+
"data": {
14+
"event_id": "{{id}}",
15+
"timestamp": 0
16+
},
17+
"attachments": [ { "attachment_type": "event.minidump" } ]
18+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "native-electron-renderer-abort",
3+
"version": "1.0.0",
4+
"main": "src/main.js",
5+
"dependencies": {
6+
"@sentry/electron": "3.0.0",
7+
"sadness-generator": "0.0.2"
8+
}
9+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
description: Native Renderer Abort
2+
category: Native (Electron Uploader)
3+
command: yarn
4+
condition: usesCrashpad && version.major >= 8
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
</head>
6+
<body>
7+
<script>
8+
const { init } = require('@sentry/electron');
9+
const { raiseAbort } = require('sadness-generator');
10+
11+
init({
12+
debug: true,
13+
});
14+
15+
setTimeout(() => {
16+
raiseAbort();
17+
}, 500);
18+
</script>
19+
</body>
20+
</html>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const path = require('path');
2+
3+
const { app, BrowserWindow } = require('electron');
4+
const { init, Integrations } = require('@sentry/electron');
5+
6+
app.commandLine.appendSwitch('enable-crashpad');
7+
8+
init({
9+
dsn: '__DSN__',
10+
debug: true,
11+
autoSessionTracking: false,
12+
integrations: [new Integrations.ElectronMinidump()],
13+
initialScope: { user: { username: 'some_user' } },
14+
onFatalError: () => {},
15+
});
16+
17+
app.on('ready', () => {
18+
const mainWindow = new BrowserWindow({
19+
show: false,
20+
webPreferences: {
21+
nodeIntegration: true,
22+
contextIsolation: false,
23+
},
24+
});
25+
26+
mainWindow.loadFile(path.join(__dirname, 'index.html'));
27+
});

0 commit comments

Comments
 (0)