Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

v11.1.1

Operating System:

macOS 10.13.6

Last Known Working Electron version:

none

Expected Behavior

I follow the official document: https://www.electronjs.org/docs/api/web-contents#contentssetdevtoolswebcontentsdevtoolswebcontents to set devtools, I expect the devtools tool to be debugged.

Actual Behavior

The devtools is opened successfully, but nothing in the devtools, I can't do any debugging in the devtools view.

To Reproduce

This is the html code.

<html>
<head>
<style type="text/css">
* {
margin: 0;
}

#browser {
display: flex;
width: 500px;
height: 500px;
}

#devtools {
display: flex;
width: 500px;
height: 500px;
}
</style>
</head>
<body>
<div style="display: flex;height: 1000px;">
<webview id="browser" src="https://github.com"></webview>
<webview id="devtools" src="about:blank"></webview>
</div>
<script>
const { webContents } = electron.remote
const emittedOnce = (element, eventName) => new Promise(resolve => {
element.addEventListener(eventName, event => resolve(event), { once: true })
})
const browserView = document.getElementById('browser')
const devtoolsView = document.getElementById('devtools')
const browserReady = emittedOnce(browserView, 'dom-ready')
const devtoolsReady = emittedOnce(devtoolsView, 'dom-ready')
Promise.all([browserReady, devtoolsReady]).then(() => {
console.log('ready');
const browser = webContents.fromId(browserView.getWebContentsId())
const devtools = webContents.fromId(devtoolsView.getWebContentsId())
browser.setDevToolsWebContents(devtools)
browser.openDevTools()
})
console.log('start');
</script>
</body>
</html>

Screenshots

Additional Information

Issue 2:
Electron version: 1.7.7, 1.6.12

Operating system: macOS 10.13

We're getting several reports of a native crash on startup for the Slack app, when running the High Sierra beta. One in particular also tried the Trello Electron app and found it crashed in the same way:

Yesterday I install the Trello app from the Mac App Store and it acts like the Slack app, I’m getting the same error from Apple. Something with com.github.electron.framework at GetLoginItemSettings() function.

Process: Slack [21601]
Path: /Applications/Slack.app/Contents/MacOS/Slack
Identifier: com.tinyspeck.slackmacgap
Version: 2.8.0 (4320)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Slack [21601]
User ID: 501

Date/Time: 2017-09-18 23:43:10.229 +0200
OS Version: Mac OS X 10.13 (17A360a)
Report Version: 12
Anonymous UUID: BE4E1D94-B2A3-7F73-5F03-897E8B01F443

Sleep/Wake UUID: 03C2BD4F-42DF-48E7-BB65-85747C3FA58B

Time Awake Since Boot: 93000 seconds
Time Since Wake: 17000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000

Application Specific Information:
*** CFEqual() called with NULL first argument ***

Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fff3d06e73c CFEqual + 620
1 com.github.electron.framework 0x000000010d761856 0x10d53a000 + 2259030
2 com.github.electron.framework 0x000000010d7616f2 0x10d53a000 + 2258674
3 com.github.electron.framework 0x000000010d5d61e8 atom::Browser::GetLoginItemSettings(atom::Browser::LoginItemSettings const&) + 24
4 com.github.electron.framework 0x000000010d54688d atom::api::App::GetLoginItemSettings(mate::Arguments*) + 61
5 com.github.electron.framework 0x000000010d5512a9 0x10d53a000 + 94889
6 com.github.electron.framework 0x000000010d55126e 0x10d53a000 + 94830
7 com.github.electron.framework 0x000000010d551244 0x10d53a000 + 94788
8 com.github.electron.framework 0x000000010d55120f base::internal::Invoker<base::internal::BindState<atom::Browser::LoginItemSettings (atom::api::App::*)(mate::Arguments*)>, atom::Browser::LoginItemSettings (atom::api::App*, mate::Arguments*)>::Run(base::internal::BindStateBase*, atom::api::App*&&, mate::Arguments*&&) + 31
9 com.github.electron.framework 0x000000010d550f8f 0x10d53a000 + 94095
10 com.github.electron.framework 0x000000010d550c99 0x10d53a000 + 93337
11 com.github.electron.framework 0x000000010d550b4c mate::internal::Dispatcher<atom::Browser::LoginItemSettings (atom::api::App*, mate::Arguments*)>::DispatchToCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 124
12 libnode.dylib 0x0000000111a00d55 0x111805000 + 2080085
13 libnode.dylib 0x0000000111ab1d18 0x111805000 + 2805016
14 libnode.dylib 0x0000000111ab1271 0x111805000 + 2802289
15 ??? 0x000027bbb9e843a7 0 + 43687231374247
16 ??? 0x000027bbba429d8e 0 + 43687237295502
17 ??? 0x000027bbba429a84 0 + 43687237294724
18 ??? 0x000027bbb9e85cd5 0 + 43687231380693
19 ??? 0x000027bbb9f0915a 0 + 43687231918426
20 ??? 0x000027bbb9ef23f8 0 + 43687231824888
21 ??? 0x000027bbba3a3ff2 0 + 43687236747250
22 ??? 0x000027bbba3a3dea 0 + 43687236746730
23 ??? 0x000027bbba2f957b 0 + 43687236048251
24 ??? 0x000027bbba429822 0 + 43687237294114
25 ??? 0x000027bbba2f957b 0 + 43687236048251
26 ??? 0x000027bbba4042ea 0 + 43687237141226
27 ??? 0x000027bbba40419c 0 + 43687237140892
28 ??? 0x000027bbba2f957b 0 + 43687236048251
29 ??? 0x000027bbba42962b 0 + 43687237293611
30 ??? 0x000027bbba4286c4 0 + 43687237289668
31 ??? 0x000027bbb9e85cd5 0 + 43687231380693
32 ??? 0x000027bbb9ef1ac3 0 + 43687231822531
33 ??? 0x000027bbb9eb65c1 0 + 43687231579585
34 libnode.dylib 0x0000000111c7e4a5 0x111805000 + 4691109
35 libnode.dylib 0x0000000111c7e209 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) + 169
36 libnode.dylib 0x0000000111a1fd5b v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) + 459
37 libnode.dylib 0x00000001118df8f6 node::MakeCallback(node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*) + 726
38 libnode.dylib 0x00000001118dfe58 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*) + 104
39 libnode.dylib 0x00000001118dfdbf node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*) + 95
40 libnode.dylib 0x00000001118dfd30 node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, char const*, int, v8::Local<v8::Value>*) + 80
41 com.github.electron.framework 0x000000010d63375a mate::internal::CallMethodWithArgs(v8::Isolate*, v8::Local<v8::Object>, char const*, std::__1::vector<v8::Local<v8::Value>, std::__1::allocator<v8::Local<v8::Value> > >*) + 74
42 com.github.electron.framework 0x000000010d54c1a9 0x10d53a000 + 74153
43 com.github.electron.framework 0x000000010d5a81ab 0x10d53a000 + 450987
44 com.github.electron.framework 0x000000010d5a8114 0x10d53a000 + 450836
45 com.github.electron.framework 0x000000010d59f47d 0x10d53a000 + 414845
46 com.github.electron.framework 0x000000010d5a093e atom::api::WebContents::DocumentLoadedInFrame(content::RenderFrameHost*) + 62
47 com.github.electron.framework 0x000000010d5a0960 non-virtual thunk to atom::api::WebContents::DocumentLoadedInFrame(content::RenderFrameHost*) + 16
48 com.github.electron.framework 0x000000010dd4cc74 0x10d53a000 + 8465524
49 com.github.electron.framework 0x000000010dd4ca96 0x10d53a000 + 8465046
50 com.github.electron.framework 0x000000010dd4c146 0x10d53a000 + 8462662
51 com.github.electron.framework 0x000000010dbbb871 0x10d53a000 + 6822001
52 com.github.electron.framework 0x000000010e23f98b 0x10d53a000 + 13654411
53 com.github.electron.framework 0x000000010d79b351 0x10d53a000 + 2495313
54 com.github.electron.framework 0x000000010d76df26 0x10d53a000 + 2309926
55 com.github.electron.framework 0x000000010d76e1fc 0x10d53a000 + 2310652
56 com.github.electron.framework 0x000000010d76e543 0x10d53a000 + 2311491
57 com.github.electron.framework 0x000000010d77188d 0x10d53a000 + 2324621
58 com.github.electron.framework 0x000000010d72e73a 0x10d53a000 + 2049850
59 com.github.electron.framework 0x000000010d771304 0x10d53a000 + 2323204
60 com.apple.CoreFoundation 0x00007fff3d0f56c1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
61 com.apple.CoreFoundation 0x00007fff3d1af2cc __CFRunLoopDoSource0 + 108
62 com.apple.CoreFoundation 0x00007fff3d0d8160 __CFRunLoopDoSources0 + 208
63 com.apple.CoreFoundation 0x00007fff3d0d75dd __CFRunLoopRun + 1293
64 com.apple.CoreFoundation 0x00007fff3d0d6e43 CFRunLoopRunSpecific + 483
65 com.apple.HIToolbox 0x00007fff3c3f6866 RunCurrentEventLoopInMode + 286
66 com.apple.HIToolbox 0x00007fff3c3f65d6 ReceiveNextEventCommon + 613
67 com.apple.HIToolbox 0x00007fff3c3f6354 _BlockUntilNextEventMatchingListInModeWithFilter + 64
68 com.apple.AppKit 0x00007fff3a6f444f _DPSNextEvent + 2085
69 com.apple.AppKit 0x00007fff3ae89508 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044
70 com.apple.AppKit 0x00007fff3a6e925d -[NSApplication run] + 764
71 com.github.electron.framework 0x000000010d7720de 0x10d53a000 + 2326750
72 com.github.electron.framework 0x000000010d77174c 0x10d53a000 + 2324300
73 com.github.electron.framework 0x000000010d76dc8e 0x10d53a000 + 2309262
74 com.github.electron.framework 0x000000010d783653 0x10d53a000 + 2397779
75 com.github.electron.framework 0x000000010d9d387b 0x10d53a000 + 4823163
76 com.github.electron.framework 0x000000010d9d36d0 0x10d53a000 + 4822736
77 com.github.electron.framework 0x000000010d9d5e12 0x10d53a000 + 4832786
78 com.github.electron.framework 0x000000010d9cf7ac 0x10d53a000 + 4806572
79 com.github.electron.framework 0x000000010d93530d 0x10d53a000 + 4174605
80 com.github.electron.framework 0x000000010d934406 0x10d53a000 + 4170758
81 com.github.electron.framework 0x000000010d53bd07 AtomMain + 71
82 com.tinyspeck.slackmacgap 0x000000010cd38f26 main + 38
83 libdyld.dylib 0x00007fff645d0145 start + 1