Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions test/e2e/test-apps/native-sentry/renderer-abort/event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"method": "envelope",
"sentryKey": "37f8a2ee37c0409d8970bc7559c7c7e4",
"appId": "277345",
"data": {
"sdk": {
"name": "sentry.javascript.electron",
"packages": [
{
"name": "npm:@sentry/electron",
"version": "{{version}}"
}
],
"version": "{{version}}"
},
"contexts": {
"app": {
"app_name": "native-sentry-renderer-abort",
"app_version": "1.0.0",
"app_start_time": "{{time}}"
},
"browser": {
"name": "Chrome"
},
"chrome": {
"name": "Chrome",
"type": "runtime",
"version": "{{version}}"
},
"device": {
"arch": "{{arch}}",
"family": "Desktop",
"memory_size": 0,
"free_memory": 0,
"processor_count": 0,
"processor_frequency": 0,
"cpu_description": "{{cpu}}",
"screen_resolution":"{{screen}}",
"screen_density": 1,
"language": "{{language}}"
},
"node": {
"name": "Node",
"type": "runtime",
"version": "{{version}}"
},
"os": {
"name": "{{platform}}",
"version": "{{version}}"
},
"runtime": {
"name": "Electron",
"version": "{{version}}"
},
"electron": {
"crashed_url": "app:///src/index.html"
}
},
"release": "[email protected]",
"environment": "development",
"user": {
"ip_address": "{{auto}}"
},
"event_id": "{{id}}",
"timestamp": 0,
"breadcrumbs": [],
"tags": {
"event.environment": "native",
"event.origin": "electron",
"event.process": "renderer",
"event_type": "native"
}
},
"attachments": [ { "attachment_type": "event.minidump" } ]
}
9 changes: 9 additions & 0 deletions test/e2e/test-apps/native-sentry/renderer-abort/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "native-sentry-renderer-abort",
"version": "1.0.0",
"main": "src/main.js",
"dependencies": {
"@sentry/electron": "3.0.0",
"sadness-generator": "0.0.2"
}
}
4 changes: 4 additions & 0 deletions test/e2e/test-apps/native-sentry/renderer-abort/recipe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
description: Native Renderer Abort
category: Native (Sentry Uploader)
condition: usesCrashpad && version.major >= 8
command: yarn
20 changes: 20 additions & 0 deletions test/e2e/test-apps/native-sentry/renderer-abort/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
</head>
<body>
<script>
const { init } = require('@sentry/electron');
const { raiseAbort } = require('sadness-generator');

init({
debug: true,
});

setTimeout(() => {
raiseAbort();
}, 500);
</script>
</body>
</html>
25 changes: 25 additions & 0 deletions test/e2e/test-apps/native-sentry/renderer-abort/src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const path = require('path');

const { app, BrowserWindow } = require('electron');
const { init } = require('@sentry/electron');

app.commandLine.appendSwitch('enable-crashpad');

init({
dsn: '__DSN__',
debug: true,
autoSessionTracking: false,
onFatalError: () => {},
});

app.on('ready', () => {
const mainWindow = new BrowserWindow({
show: false,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
},
});

mainWindow.loadFile(path.join(__dirname, 'index.html'));
});