status
stringclasses
1 value
repo_name
stringlengths
9
24
repo_url
stringlengths
28
43
issue_id
int64
1
104k
updated_files
stringlengths
8
1.76k
title
stringlengths
4
369
body
stringlengths
0
254k
issue_url
stringlengths
37
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
timestamp[ns, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
closed
electron/electron
https://github.com/electron/electron
37,772
["patches/node/.patches", "patches/node/fix_increase_concurrency_in_v8platform_postjob.patch", "patches/v8/.patches", "patches/v8/revert_wasm_simplify_compilejstowasmwrapperjob.patch"]
chore: remove Simplify CompileJSToWasmWrapperJob revert patch
- 4347597: [wasm] Simplify CompileJSToWasmWrapperJob | https://chromium-review.googlesource.com/c/v8/v8/+/4347597 was reverted in #37701 because it caused many failures to the node tests, eg: https://app.circleci.com/pipelines/github/electron/electron/67031/workflows/eaedbe8d-2f77-47f0-a729-840ceed6c411/jobs/1475853. We should remove the patch as a followup to #37701.
https://github.com/electron/electron/issues/37772
https://github.com/electron/electron/pull/37782
601217218759d088f12680a428fead8c8b26a5e0
ef657bdc9d28a38321509e636f2f928cb6c2d981
2023-03-31T00:08:41Z
c++
2023-04-01T12:47:54Z
closed
electron/electron
https://github.com/electron/electron
37,761
["shell/browser/api/electron_api_web_contents_mac.mm"]
[Bug]: After entering and exiting full screen, app can't quit
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.2.0 ### What operating system are you using? macOS ### Operating System Version macOS Ventura 13.2 (22D49) ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior 1. Clone the quick start project 2. Start the project and hit `Fn+F` twice (enter and exit full screen) The app should be able to quit. ### Actual Behavior The app can't quit. ### Testcase Gist URL https://github.com/electron/electron-quick-start ### Additional Information The following is logged in the Terminal: ``` 2023-03-30 09:06:20.327 Electron[66185:406517] not in fullscreen state 2023-03-30 09:06:22.768 Electron[66185:406517] not in fullscreen state ``` This feels high priority.
https://github.com/electron/electron/issues/37761
https://github.com/electron/electron/pull/37803
e9d5c3517cf3a6090826d7e8ca91c2d059a7caca
3f42040a1b46f3c3bb338730f30f793ceadee386
2023-03-30T06:04:04Z
c++
2023-04-04T13:16:59Z
closed
electron/electron
https://github.com/electron/electron
37,737
["lib/browser/api/web-contents.ts", "shell/browser/web_contents_preferences.cc", "spec/api-browser-window-spec.ts", "spec/guest-window-manager-spec.ts", "spec/lib/screen-helpers.ts"]
[Bug]: setWindowOpenHandler changes default stylesheet for plain text files in dark theme
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version >=22.0.0 ### What operating system are you using? Windows ### Operating System Version Windows 10 Enterprise 22H2 ### What arch are you using? x64 ### Last Known Working Electron version 21 ### Expected Behavior Click on the link to open the plain text file in a new window. Text should be readable, e.g. white text on dark background. ### Actual Behavior Text is not readable. It's white text on white background. This seems to only happen if there is a `setWindowOpenHandler`. If you comment out that line, a dark background is applied. ### Testcase Gist URL https://gist.github.com/ajafff/8d9e8eb8cc0a7ec2297f2445c54f5526 ### Additional Information _No response_
https://github.com/electron/electron/issues/37737
https://github.com/electron/electron/pull/36914
d95f9d2c636775946717a95fefee1ada51524a79
a26343f3e084028b920a7ea44e6b221350e3546c
2023-03-28T10:17:49Z
c++
2023-05-02T21:44:34Z
closed
electron/electron
https://github.com/electron/electron
37,642
["shell/browser/api/electron_api_browser_view.cc", "shell/browser/api/electron_api_browser_view.h", "spec/api-browser-view-spec.ts"]
[Bug]: BrowserWindow.removeBrowserView will crash the app if the browserView is destroyed
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.4 ### What operating system are you using? macOS ### Operating System Version 13.0 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior BrowserWindow.removeBrowserView should remove the browserView regardless of whether browserView is destroyed or not. ### Actual Behavior The app will exit with code SIGSEGV. ### Testcase Gist URL ```Javascript const {app, BrowserWindow, BrowserView} = require('electron') const path = require('path') async function createWindow () { // Create the browser window. const mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { preload: path.join(__dirname, 'preload.js') } }) const view = new BrowserView({ preload: path.join(__dirname, 'preload.js') }); view.webContents.on('destroyed', () => { mainWindow.removeBrowserView(view) }); mainWindow.addBrowserView(view); view.setBounds({x:0, y:0, width:300, height:300}); // and load the index.html of the app. await mainWindow.loadFile('index.html') await view.webContents.loadFile('index.html') view.webContents.close(); // Open the DevTools. // mainWindow.webContents.openDevTools() } // This method will be called when Electron has finished // initialization and is ready to create browser windows. // Some APIs can only be used after this event occurs. app.whenReady().then(() => { createWindow() app.on('activate', function () { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. if (BrowserWindow.getAllWindows().length === 0) createWindow() }) }) // Quit when all windows are closed, except on macOS. There, it's common // for applications and their menu bar to stay active until the user quits // explicitly with Cmd + Q. app.on('window-all-closed', function () { if (process.platform !== 'darwin') app.quit() }) ``` ### Additional Information _No response_
https://github.com/electron/electron/issues/37642
https://github.com/electron/electron/pull/38842
ce6fe040feefe326a557132fb81137097d4a39c1
a00a25376d339ba78c4a1efbae2de05fd534332e
2023-03-22T03:57:18Z
c++
2023-06-21T19:20:54Z
closed
electron/electron
https://github.com/electron/electron
37,628
["shell/browser/ui/cocoa/electron_ns_window.mm"]
[Bug]: BrowserWindows.on('swipe') doesn't trigger when swiping on BrowserViews
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.4 ### What operating system are you using? macOS ### Operating System Version macOS Ventura 13.2.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version 22.3.3 ### Expected Behavior ```js const win = new BrowserWindow({ width: 800, height: 600 }) const view = new BrowserView(); win.setBrowserView(view); view.setBounds({ x: 0, y: 0, width: 300, height: 300 }); view.webContents.loadURL('https://electronjs.org'); win.on('swipe', (e, direction) => { console.log('swipe', direction); }); ``` `BrowserWindow.on('swipe')` should be called whenever users swipe anywhere in the window (inside or outside of the `BrowserView` WebContents). ### Actual Behavior `BrowserWindow.on('swipe')` is only called when swiping inside the `BrowserWindow` WebContents (outside of the `BrowserView`, not when swiping inside the `BrowserView`. ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/37628
https://github.com/electron/electron/pull/37946
f03315ad4d16d0d066f7c3f8a35ab06d297fb440
fceeb64e7c835868bec48442cfb4c7450bddf959
2023-03-21T00:56:00Z
c++
2023-04-13T09:28:22Z
closed
electron/electron
https://github.com/electron/electron
37,568
["shell/browser/api/electron_api_cookies.cc", "spec/api-net-spec.ts", "spec/api-session-spec.ts"]
[Bug]: Cookie is not set from parition when domain is present
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.0.0 ### What operating system are you using? macOS ### Operating System Version macOS Venture 13.0.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior The following code when a valid session cookie is set in the rederer throws the following error. I am able to set a cookie when no domain is present. ``` (node:52646) UnhandledPromiseRejectionWarning: Error: Failed to parse cookie ``` ```typescript const createWindow = async (): Promise<void> => { console.log(); const partitionSession = session.fromPartition("persist:federated"); const sessionCookie = store.get("__session"); if (sessionCookie) { await partitionSession.cookies.set(sessionCookie); } // Create the browser window. mainWindow = new BrowserWindow({ height: 600, width: 800, webPreferences: { preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY, /** * The next two items are not normally set and required * because of our nodejs usage */ nodeIntegration: true, contextIsolation: false, partition: "persist:federated", session: partitionSession, }, }); // and load the index.html of the app. mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY); // Open the DevTools. mainWindow.webContents.openDevTools(); const cookies = mainWindow.webContents.session.cookies; cookies.on("changed", (event, cookie, cause, removed) => { if (cookie.name === "__session") store.set("__session", { url: "http://localhost:3000", name: cookie.name, value: cookie.value, domain: cookie.domain, path: cookie.path, secure: cookie.secure, httpOnly: cookie.httpOnly, sameSite: cookie.sameSite, }); }); }; ``` ### Actual Behavior A cookie should be set when the domain option is present. ### Testcase Gist URL https://gist.github.com/8ee681e77bbcf7603642532fc27b0334 ### Additional Information _No response_
https://github.com/electron/electron/issues/37568
https://github.com/electron/electron/pull/37586
48d0b09ad932aabc91ef072c862f3489202e40fd
b8f970c1c710c7e43cff6770fa845b96445cdaf8
2023-03-13T17:16:17Z
c++
2023-03-16T12:48:14Z
closed
electron/electron
https://github.com/electron/electron
37,565
["shell/browser/api/message_port.cc", "spec/api-ipc-spec.ts"]
[Bug]: Crash when attempting to transfer binary data objects through `MessagePortMain`
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.3 ### What operating system are you using? macOS ### Operating System Version Ventura 13.2.1 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior Currently, `MessagePortMain` only supports transfer of other `MessagePortMain` instances. Attempting to transfer an object through `MessagePortMain` which the API doesn't support should safely error. ### Actual Behavior The API correctly errors when attempting to transfer a variety of unsupported objects. However, when attempting to transfer an `ArrayBuffer` or a `TypedArray`, the main process immediately segfaults. If the main process owns the channel's other port (i.e. it owns both ports) and the `app` `ready` event has been fired, then the main process logs the following message before it crashes: ``` [3841:0313/201342.125729:ERROR:child_thread_impl.cc(234)] Invalid PlatformChannel receive right ``` If a renderer owns the other port, or the `ready` event has not yet been fired, the segfault still occurs, but no message is logged. It seems reasonable to assume that it's breaking specifically on binary data, but it's possible that it also breaks on other kinds of objects I have not tested. Note that if the other port is owned by a renderer, the segfault doesn't occur if the renderer attempts to transfer an `ArrayBuffer` or `TypedArray` back to the main process. It only occurs if `MessagePortMain` instigates the transfer. In case it's of interest, I do not appear to get any crash report dumped when trying to use `crashReporter`. ### Testcase Gist URL https://gist.github.com/ed433ab70e6d3862675af9b1c2731f10 ### Additional Information Note that this issue is **not** about whether the API *should* support transfer of `ArrayBuffer`. This issue is just about the fact that given it currently doesn't, it should error instead of crashing. Ping @nornagon
https://github.com/electron/electron/issues/37565
https://github.com/electron/electron/pull/37585
1e106c8aa41b18b02ade44a54e6bd558d725fc37
b27e4cae21547e7ddf3a6199d5bed0e621d4eee6
2023-03-13T11:23:34Z
c++
2023-03-27T17:56:55Z
closed
electron/electron
https://github.com/electron/electron
37,560
["docs/api/app.md", "shell/browser/api/electron_api_app.cc", "shell/browser/browser.h", "shell/browser/browser_mac.mm", "shell/common/platform_util.h", "shell/common/platform_util_mac.mm", "spec/api-app-spec.ts"]
[Bug]: Open at login with setLoginItemSettings in MAS build is not working
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 16.0.6 ### What operating system are you using? macOS ### Operating System Version Version 13.2 (22D49) ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior Setting app to open at login with setLoginItemSettings api should work both locally and with MAS build. Locally the app is added to login items but when i build it for MAS this doesn't work. ### Actual Behavior Setting app to open at login with setLoginItemSettings api works locally but doesn't work in MAS build. In MAS build the app is not added to login items. <img width="477" alt="image" src="https://user-images.githubusercontent.com/17458685/224576455-a9145dfc-7121-4097-9fe4-a472f0c2ead4.png"> ### Testcase Gist URL _No response_ ### Additional Information According to docs https://www.electronjs.org/docs/latest/api/app#appsetloginitemsettingssettings-macos-windows setting login item in MAS build should work by using the following API ```js app.setLoginItemSettings({ openAtLogin: openAtLogin, }) ``` In the docs on limitations of MAS build there is no mention of any limitation of using above API https://www.electronjs.org/docs/latest/tutorial/mac-app-store-submission-guide#limitations-of-mas-build Here is possible related issue and PRs: - https://github.com/electron/electron/issues/7312 - https://github.com/electron/electron/pull/11144 - https://github.com/electron/electron/pull/10856
https://github.com/electron/electron/issues/37560
https://github.com/electron/electron/pull/37244
6d0d350e138494cd68dd3d4fa73b2719da4575bf
f7b1c75c72a8dcab4157408f92bd3771606d8029
2023-03-12T22:11:32Z
c++
2023-10-16T16:25:11Z
closed
electron/electron
https://github.com/electron/electron
37,515
["shell/browser/api/electron_api_web_contents.cc"]
[Bug]: app drag regions capture clicks on windows with frame
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.1 ### What operating system are you using? Windows ### Operating System Version Windows 10 22H2 ### What arch are you using? x64 ### Last Known Working Electron version 22.2.1 ### Expected Behavior WebContents containing `-webkit-app-region: drag` should not be draggable or capture clicks when a window includes a frame. ### Actual Behavior WebContents containing `-webkit-app-region: drag` captures clicks and is not draggable when window includes a frame. ### Testcase Gist URL https://gist.github.com/samuelmaddock/ce68e2160f80c576bbf0bc3a8809363d ### Additional Information This likely isn't a bug, but rather a change in Chromium that might need to be documented in our release notes. @MarshallOfSound mentioned that `-webkit-app-region` was recently implemented for non-frameless windows in Chrome, likely leading to this change of behavior.
https://github.com/electron/electron/issues/37515
https://github.com/electron/electron/pull/37594
b72f81ab5b79bd86856bd46ad99a540fa082a4de
4c6092e151b070db2b87358761db83b99be511a5
2023-03-06T23:01:15Z
c++
2023-03-28T14:52:28Z
closed
electron/electron
https://github.com/electron/electron
37,504
["shell/renderer/api/electron_api_context_bridge.cc"]
[Bug]: native iterators don't survive the contextbridge, but Symbol.iterator does
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.0 ### What operating system are you using? Windows ### Operating System Version Windows 10 Pro Version 10.0.19044 Build 19044 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior We expected native iterables to survive the contextbridge, because custom iterable implementations do. preload ```js contextBridge.exposeInMainWorld("test_api", { iterate(iterable) { const values = []; for (const item of iterable) { values.push(item); } return values; } }); ``` renderer ```js function* generate() { for (const i of [1, 2, 3]) { yield i; } } const iterable = generate(); const result = window.test_api.iterate(iterable); ``` ### Actual Behavior ## Full example See the full working example including test cases [here](https://github.com/MareikeTaeubner/mcve-contextbridge-symbols) ## What we try to do We try to invoke a function `iterate` defined in the preload script with a parameter that is an iterator from the renderer process: ```js contextBridge.exposeInMainWorld("test_api", { iterate(iterable) { const values = []; for (const item of iterable) { values.push(item); } return values; } }); ``` ## What we see If we call this function with a native iterable from the renderer process, it will fail with `Error: iterable is not iterable`: ```js function* generate() { for (const i of [1, 2, 3]) { yield i; } } const iterable = generate(); const result = window.test_api.iterate(iterable); ``` However, if we implement the iterable ourselves, it will work. We see that, contrary to what the [documentation](https://www.electronjs.org/docs/latest/api/context-bridge#parameter--error--return-type-support) says, the `Symbol.iterator` survives. ```js const values = [1, 2, 3]; let index = 0; const iterable = { [Symbol.iterator]: function () { return { next() { if (index >= values.length) { return { done: true }; } else { return { value: values[index++] }; } }, }; }, }; const result = window.test_api.iterate(iterable); ``` ### Testcase Gist URL [test sample as electron fiddle gist](https://gist.github.com/7f45335a82bdd797c439b9067ca723b4) ### Additional Information _No response_
https://github.com/electron/electron/issues/37504
https://github.com/electron/electron/pull/37593
b27e4cae21547e7ddf3a6199d5bed0e621d4eee6
97b19a794676217de1bf1756f003fe7515b8c040
2023-03-06T12:55:35Z
c++
2023-03-28T00:36:55Z
closed
electron/electron
https://github.com/electron/electron
37,495
["docs/api/app.md"]
[Bug]: Window showing on 'open-url' with preventDefault()
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 21.3.3 ### What operating system are you using? macOS ### Operating System Version macOS Monterey ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior The window should not show up. ### Actual Behavior The window shows up. ### Testcase Gist URL https://gist.github.com/vothvovo/00b6932c52d49c2ecf42853bd5db778a ### Additional Information You have to build the gist to test it because otherwise the custom uri schema won't register.
https://github.com/electron/electron/issues/37495
https://github.com/electron/electron/pull/37564
3b69a542fbb1a84a3d2b531a152f18e9e88b1666
e480cb7103df6702d0364cf76d1f20724efc49dc
2023-03-04T13:08:55Z
c++
2023-03-14T13:17:28Z
closed
electron/electron
https://github.com/electron/electron
37,487
["shell/browser/native_window_mac.mm"]
[Bug]: Restoring dock icon after creating multiple overlay windows creates duplicates
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.1, 24.0.0-alpha.7, 25.0.0-nightly.20230302 ### What operating system are you using? macOS ### Operating System Version macOS Ventura 13.2 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior Creating several windows with `visibleOnFullScreen: true` and calling `app.dock.show()` should only show one icon in the dock. ### Actual Behavior Creating several windows with `visibleOnFullScreen: true` and calling `app.dock.show()` has a timing issue: it allows multiple dock icons to appear and detach, surviving even after you close the application. <img width="552" alt="screenshot: duplicate dock icons" src="https://user-images.githubusercontent.com/10053423/222592340-f68f4ecd-1ccd-4553-9540-245e2ac6de4a.png"> _These don't go away when you quit the app._ ### Testcase Gist URL https://gist.github.com/PsychoLlama/fcb2790372b6e4957beac9be7e543d3d ### Additional Information I'm not very good with native code, but I think I've tracked it down. It appears to be similar to the bug described in `DockHide`: https://github.com/electron/electron/blob/ed7b5c44a2c7bfd57a44a04891452e967f07dd8e/shell/browser/browser_mac.mm#L426-L434 The mechanism for hiding the dock is here: https://github.com/electron/electron/blob/ed7b5c44a2c7bfd57a44a04891452e967f07dd8e/shell/browser/browser_mac.mm#L440-L444 It's pretty much the same implementation in `win.setVisibleOnAllWorkspaces`: https://github.com/electron/electron/blob/ed7b5c44a2c7bfd57a44a04891452e967f07dd8e/shell/browser/native_window_mac.mm#L1291-L1292 `dock.hide()` avoids the bug by aborting if you call it within 1 second of calling `dock.show()`. Since `SetVisibleOnAllWorkspaces` doesn't have a guard, calling `dock.show()` can result in the same bug, creating an orphan dock icon for almost every window. --- Use case: We need to draw over windows we don't own, so we create a transparent overlay for each display. It's applied to every macOS space and has to render on top of fullscreen windows too: ```typescript win.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true, }) ``` Calling that method implicitly hides the dock icon (I understand that's an unavoidable behavior), but we can restore it with `app.dock.show()`. I called that method after creating an overlay. That's where I ran into the bug. If you have more than one display, we'll create multiple windows and call `dock.show()` multiple times, creating a race condition on the macOS APIs and generating duplicate dock icons.
https://github.com/electron/electron/issues/37487
https://github.com/electron/electron/pull/37599
7ed3c7a359c78c725ba02eaf5edd28968e356a32
eb613ef3d474f374874e5494a57bb06639811bdd
2023-03-03T00:54:47Z
c++
2023-03-20T14:30:49Z
closed
electron/electron
https://github.com/electron/electron
37,476
["shell/browser/ui/cocoa/electron_ns_window.mm", "spec/api-browser-window-spec.ts"]
[Bug]: BrowserWindow.previewFile causes window to not update (appearing frozen)
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.1, 24.0.0-alpha.6, 25.0.0-nightly-20230301 ### What operating system are you using? macOS ### Operating System Version macOS 13.2.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version n/a ### Expected Behavior When using `BrowserWindow.previewFile` and then choosing to open the file from QuickLook, the `BrowserWindow` content should update/respond normally. ### Actual Behavior When using `BrowserWindow.previewFile` and then choosing to open the file from QuickLook, the `BrowserWindow` content stops updating visually. The window isn't completely frozen though, as javascript is still running and clicking on the page initiates event handlers. Timers seem to fire more slowly, however. ### Testcase Gist URL https://gist.github.com/a15492e41ae5c4dacb1152c35bea5cc1 ### Additional Information The [testcase fiddle](https://gist.github.com/a15492e41ae5c4dacb1152c35bea5cc1) updates a button's text to a random string every 10 milliseconds, queries the button's text, and prints it to the console. This video shows that after opening a .log file in Console.app via `BrowserWindow.previewFile`, the button text stops visually updating in the window, but it does update as shown in the devtools console. And clicking on the button causes a console message to be logged as well. https://www.loom.com/share/4fbd0f43c61b47f3ab00acf64d2a196f This test case uses Console.app, but we have users also reporting this issue for opening .pdf files in Acrobat Pro. It doesn't reproduce for me with .txt files opening TextEdit. Reproducing the bug also seems to require that the window not be in the default position. It might also require moving the other application window (Console.app) after it's opened.
https://github.com/electron/electron/issues/37476
https://github.com/electron/electron/pull/37530
e480cb7103df6702d0364cf76d1f20724efc49dc
bf1cc1aeb2a55a07d8ed794df1e6a630221bd69a
2023-03-02T23:41:22Z
c++
2023-03-14T13:41:34Z
closed
electron/electron
https://github.com/electron/electron
37,465
["docs/tutorial/accessibility.md", "shell/browser/mac/electron_application.mm"]
[Bug]: `AXManualAccessibility` attribute can't be set (`kAXErrorAttributeUnsupported`)
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.1 (Electron Fiddle), 22.0.2 (demo app launched from Fiddle), 23.1.0 (Element), 19.1.9 (VS Code) ### What operating system are you using? macOS ### Operating System Version macOS Catalina 10.15.7 ### What arch are you using? x64 ### Last Known Working Electron version unknown ### Expected Behavior As described [in the Electron docs](https://www.electronjs.org/docs/latest/tutorial/accessibility/#macos), it should be possible to set the `AXManualAccessibility` attribute[^axma] of an Electron-based application through the Accessibility API, to force Electron/Chromium to build the full tree of accessibility info. [^axma]: Added in #10305. The private `AXEnhancedUserInterface` attribute (used by VoiceOver) also causes Electron/Chromium to build the full a11y tree, but has some unwanted side effects. ### Actual Behavior Attempting to set `AXManualAccessibility` always results in an error (`kAXErrorAttributeUnsupported` or its equivalent), as if the attribute doesn't exist. I can replicate this in Swift, AppleScript (GUI scripting through the System Events app), and [Hammerspoon](https://github.com/Hammerspoon/hammerspoon) (through [the `hs.axuielement` module](https://www.hammerspoon.org/docs/hs.axuielement.html)). UIElementInspector also doesn't list it as an existing attribute. ### Testcase Gist URL _No response_ ### Additional Information I believe this is a continuation of #30644, which was auto-closed as stale. I haven't included a test case gist because this happens with _any_ Electron app I try - from the default code that Fiddle opens with, all the way up to VS Code. I can see in electron_application.mm [where it checks if that attribute is what's being set](https://github.com/electron/electron/blob/9b20b3a722a7b807c161813cf2b616e74aee660d/shell/browser/mac/electron_application.mm#L182), but I don't see any code that tells the Accessibility API that that attribute actually _exists_ to be set. It looks to me like fixing that would involve overriding [the `accessibilityAttributeNames` method](https://developer.apple.com/documentation/objectivec/nsobject/1525181-accessibilityattributenames?language=objc) ([example here](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Accessibility/cocoaAXSupportingAttributes/cocoaAXSupportAttributes.html)). That method is from a deprecated informal protocol that suggests the `NSAccessibility` protocol instead, but: a) `NSAccessibility` doesn't seem to have any replacement for `accessibilityAttributeNames` - the new protocol doesn't seem to support custom attributes (or custom anything, really). b) `accessibilitySetValue:forAttribute:` - which Electron is already overriding - is also part of that deprecated informal protocol, and also doesn't seem to have a replacement. #### Examples of various ways I've tried setting the attribute: <details> <summary>Swift example</summary> ```swift #!/usr/bin/swift import Cocoa let name = CommandLine.arguments.count >= 2 ? CommandLine.arguments[1] : "Electron" let pid = NSWorkspace.shared.runningApplications.first(where: {$0.localizedName == name})!.processIdentifier let axApp = AXUIElementCreateApplication(pid) let error = AXUIElementSetAttributeValue(axApp, "AXManualAccessibility" as CFString, true as CFTypeRef) dump(error.rawValue) // (couldn't get Swift to return the error value's name outside the REPL, so I'm using the rawValue) // should be 0 // actually returns -25205 (AXError.attributeUnsupported) ``` </details> <details> <summary>AppleScript example</summary> ```applescript #!/usr/bin/osascript -- Note: you'll probably have to run this from Script Editor. -- Running in the terminal will give the error "Not authorized to send Apple events to System Events." on run argv if (count argv) ≥ 1 then set appName to first item of argv else set appName to "Electron" end if tell application "System Events" tell application process appName set value of attribute "AXManualAccessibility" to true end tell end tell end run ``` </details> <details> <summary>Hammerspoon (Lua) example</summary> ```lua -- paste this into Hammerspoon console -- (all at once - if you run the lines separately, the locals will disappear between lines) local appName = 'Electron' -- or whatever local app = hs.application.get(appName) local axApp = hs.axuielement.applicationElement(app) return axApp:setAttributeValue('AXManualAccessibility', true) -- returns: -- nil Attribute is not supported by target -- you can also do: -- axApp.AXManualAccessibility = true -- but that just fails silently ``` </details>
https://github.com/electron/electron/issues/37465
https://github.com/electron/electron/pull/38102
a0a44f07dda3562bcd7039e0270eae32be7549d6
f35b9b3f06663e657a2f3b36cc021cf4b109ab26
2023-03-01T21:51:06Z
c++
2023-04-26T17:41:56Z
closed
electron/electron
https://github.com/electron/electron
37,463
["patches/chromium/desktop_media_list.patch", "shell/browser/api/electron_api_desktop_capturer.cc", "shell/browser/api/electron_api_desktop_capturer.h"]
[Bug]: DesktopCapturer doesn't work in Ubuntu 22.04.2 LTS
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.1 ### What operating system are you using? Ubuntu ### Operating System Version 22.04.2 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior Get access to screens for capture recording using desktopCapturer in electron Api ### Actual Behavior There are difficulties to report the problem because no specific error is received in the terminal, only the message below ```bash tiago@tghpereira:~/Área de Trabalho/electron/test$ yarn start yarn run v1.22.19 $ electron . /home/tiago/Área de Trabalho/electron/test/node_modules/electron/dist/electron exited with signal SIGSEGV error Command failed with exit code 1. ``` I followed the official Electronjs documentation step by step and tried several approaches mentioned in forums to find ways to solve the problem, but without success. Please help us with this issue which is greatly affecting many packages. ### Testcase Gist URL https://gist.github.com/68498fa7437a78b9daf435f3413c9a43 ### Additional Information _No response_
https://github.com/electron/electron/issues/37463
https://github.com/electron/electron/pull/38833
3e3152008ff569632e0b36d53ac9a24fae515709
905e41bbddd72f4d19c294b430d1a7c282e22a5d
2023-03-01T16:20:13Z
c++
2023-07-11T08:21:11Z
closed
electron/electron
https://github.com/electron/electron
37,436
["docs/api/web-contents.md", "docs/fiddles/features/web-bluetooth/index.html", "docs/fiddles/features/web-bluetooth/main.js", "docs/fiddles/features/web-bluetooth/preload.js", "docs/fiddles/features/web-bluetooth/renderer.js", "shell/browser/lib/bluetooth_chooser.cc", "shell/browser/lib/bluetooth_chooser.h"]
[Bug]: How can I cancel a bluetooth request?
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23 ### What operating system are you using? Windows ### Operating System Version win10 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior navigator.bluetooth.requestDevice return null after a while, if there is no device found. ### Actual Behavior navigator.bluetooth.requestDevice always bolck if there is no device ### Testcase Gist URL https://gist.github.com/a5d16943212179f7c033d5bd70531404 _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/37436
https://github.com/electron/electron/pull/37601
42e7cd9b3f3e16d07f162716b4f1346e32004aec
6a6908c4c887c5f685f5e172ff01afc02ebcbc65
2023-02-28T12:13:57Z
c++
2023-03-27T13:31:15Z
closed
electron/electron
https://github.com/electron/electron
37,424
["shell/browser/api/electron_api_web_contents.cc", "spec/api-web-contents-spec.ts"]
[Bug]: takeHeapSnapshot is always throwing an error
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.2 ### What operating system are you using? macOS ### Operating System Version macOS 12.5 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior `process.takeHeapSnapshot(path)` and `window.webContents.takeHeapSnapshot(path)` should generate a heap snapshot at the given path. ### Actual Behavior `Error: takeHeapSnapshot failed` is returned. ### Testcase Gist URL https://gist.github.com/0302cbfbd787648265b60efe85b7c3d7 ### Additional Information This provides a minimum reproducible gist, same issue as https://github.com/electron/electron/issues/28758
https://github.com/electron/electron/issues/37424
https://github.com/electron/electron/pull/37434
8f2917db0169c81d293db7e32902252612ac68f5
9b20b3a722a7b807c161813cf2b616e74aee660d
2023-02-27T14:55:15Z
c++
2023-03-01T15:50:36Z
closed
electron/electron
https://github.com/electron/electron
37,419
["shell/browser/api/electron_api_browser_view.cc", "shell/browser/api/electron_api_browser_window.cc", "shell/browser/api/electron_api_web_contents.cc", "spec/api-browser-view-spec.ts"]
[Bug]: Electron will crash when I call BrowserView.destroy().
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.0 ### What operating system are you using? Windows ### Operating System Version Windows 11 22H2 22621.1265 ### What arch are you using? x64 ### Last Known Working Electron version 21.4.2 ### Expected Behavior Electron will not exit and browserView will close. ### Actual Behavior Electron exited with code 3221225477. ### Testcase Gist URL _No response_ ### Additional Information I publish fiddle to github failed. /(ㄒoㄒ)/~~ main.js ``` // Modules to control application life and create native browser window const { app, BrowserWindow, BrowserView, ipcMain, dialog } = require('electron') const path = require('path') function createWindow() { // Create the browser window. const mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: false, contextIsolation: true, preload: path.join(__dirname, 'preload.js') } }) // and load the index.html of the app. mainWindow.loadFile('index.html') const mainView = new BrowserView({ webPreferences: { nodeIntegration: false, contextIsolation: true, } }) mainView.webContents.loadURL('https://boardmix.cn/app/') mainWindow.setBrowserView(mainView); const windowBounds = mainWindow.getContentBounds(); const viewWidth = windowBounds.width - 2; const viewHeight = windowBounds.height - 200 - 1; mainView.setBounds({ x: 1, y: 200, width: viewWidth, height: viewHeight }); ipcMain.on('close', () => { if (!mainView.webContents || mainView.webContents.isDestroyed()) { dialog.showMessageBox({message: 'webContents is destroyed'}) } else { mainView.webContents.destroy(); } }) // Open the DevTools. // mainWindow.webContents.openDevTools() } // This method will be called when Electron has finished // initialization and is ready to create browser windows. // Some APIs can only be used after this event occurs. app.whenReady().then(() => { createWindow() app.on('activate', function () { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. if (BrowserWindow.getAllWindows().length === 0) createWindow() }) }) // Quit when all windows are closed, except on macOS. There, it's common // for applications and their menu bar to stay active until the user quits // explicitly with Cmd + Q. app.on('window-all-closed', function () { if (process.platform !== 'darwin') app.quit() }) // In this file you can include the rest of your app's specific main process // code. You can also put them in separate files and require them here. ``` renderer.js ``` document.querySelector('h1').addEventListener('click', () => { desktopManagerApi.close(); }) ``` preload.js ``` const { contextBridge, ipcRenderer } = require('electron') contextBridge.exposeInMainWorld('desktopManagerApi', { close() { ipcRenderer.send('close') } }); ``` But, if i call `webContents.close()`, the `destroyed` event not be emitted. `webContents.isDestroyed()` is false.
https://github.com/electron/electron/issues/37419
https://github.com/electron/electron/pull/37420
8fb0f430301578ba94b175f0b097fb2752f5ddf9
5e25d23794a4b3b1bda35c79fcc1b2fdd787ad69
2023-02-27T08:07:17Z
c++
2023-03-01T10:35:06Z
closed
electron/electron
https://github.com/electron/electron
37,417
["patches/node/.patches", "patches/node/lib_fix_broadcastchannel_initialization_location.patch"]
[Bug]: BroadcastChannel support broken in version 23
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.1 ### What operating system are you using? macOS ### Operating System Version Montery 12.6.3 ### What arch are you using? x64 ### Last Known Working Electron version 22.3.1. Stops working in 23.0.0. ### Expected Behavior Setting up a new BroadcastChannel() in two BrowserWindows with `{ contextIsolation: false }` shall work and communicated events to each other. ### Actual Behavior BrowserChannels do not communicate between BrowserWindows when contextIsolation is false. ### Testcase Gist URL [Repro](https://gist.github.com/dfahlander/cb9dfccd6e32101843800feade72049c) Notes to repro: 1. Run it with Electron 22 2. Move the browser window so you see the other browser window behind 3. Click Post message button and see how messages arrive on the other window 4. Run it with Electron 23 5. Repeat step 2 and 3 but now messages aren't propagated to the other window. ### Additional Information It seems as the BroadcastChannel we see in a window, is the NodeJS version of BroadcastChannel and not the DOM version because it has the `unref()` method that is unique to Node's version. I don't know if this could be the reason why it does not work as in Electron version 22, where BroadcastChannel is absent in the node thread but present and working fine within BrowserWindows.
https://github.com/electron/electron/issues/37417
https://github.com/electron/electron/pull/37421
2e03bdb9b624c24646b5104ce972e0800f622683
87f2a1d572a78c41da293eeb467966f76da7ba9d
2023-02-26T23:39:10Z
c++
2023-02-28T22:26:37Z
closed
electron/electron
https://github.com/electron/electron
37,414
["shell/browser/ui/cocoa/electron_ns_window.mm"]
[Bug]: Frameless window is not draggable when running MAS build
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.1 ### What operating system are you using? macOS ### Operating System Version macOS Big Sur ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version 22.3.1 ### Expected Behavior Window should be draggable. ### Actual Behavior Window is not draggable. ### Testcase Gist URL https://gist.github.com/1387d3e19cbf2717cd21bbf3befaf159 ### Additional Information To be noted, dragging works as expected on standard Electron builds but consistently fails when using Mac Apple Store builds (>= v23). @nornagon I understand you've been working on some related issues recently, please let me know if this is a known/fixed issue and I'll close this one, thanks!
https://github.com/electron/electron/issues/37414
https://github.com/electron/electron/pull/37466
692876c73740d039ac840c91c719f7e9cf3b7e76
76c825d6193e6da540b64190ff2d2298d53da5ea
2023-02-26T00:16:38Z
c++
2023-03-02T19:21:51Z
closed
electron/electron
https://github.com/electron/electron
37,404
["patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch", "shell/common/node_bindings.cc", "shell/common/node_bindings.h", "shell/renderer/electron_renderer_client.cc", "shell/renderer/web_worker_observer.cc", "spec/chromium-spec.ts"]
[Bug]: proxyquire can't load modules after window.open method is called
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.0.0 ### What operating system are you using? Windows ### Operating System Version Windows 11, Version22H2, OS Build 22621.1265 ### What arch are you using? x64 ### Last Known Working Electron version 22.3.1 ### Expected Behavior proxyquire should load modules as it does with electron version 22.3.1. ### Actual Behavior Attempt to use proxyquire in tests with electron of version 23 an higher leads to the following error message: ``` TypeError: Script methods can only be called on script instances. at Script.runInThisContext (node:vm:129:12) at Object.runInThisContext (node:vm:313:38) at wrapSafe (node:internal/modules/cjs/loader:1083:15) at Module._compile (node:internal/modules/cjs/loader:1130:27) at Module._extensions..js (node:internal/modules/cjs/loader:1229:10) at require.extensions.<computed> (C:\work\proxyquire-test\node_modules\proxyquire\lib\proxyquire.js:311:43) at Module.load (node:internal/modules/cjs/loader:1044:32) at Module._load (node:internal/modules/cjs/loader:885:12) at f._load (node:electron/js2c/asar_bundle:2:13330) at o._load (node:electron/js2c/renderer_init:2:3109) at Module.require (node:internal/modules/cjs/loader:1068:19) at Proxyquire._withoutCache (C:\work\proxyquire-test\node_modules\proxyquire\lib\proxyquire.js:222:12) at Proxyquire.load (C:\work\proxyquire-test\node_modules\proxyquire\lib\proxyquire.js:129:15) at Context.<anonymous> (C:\work\proxyquire-test\test.spec.js:7:5) at callFn (C:\work\proxyquire-test\node_modules\mocha\lib\runnable.js:366:21) at Runnable.run (C:\work\proxyquire-test\node_modules\mocha\lib\runnable.js:354:5) at Runner.runTest (C:\work\proxyquire-test\node_modules\mocha\lib\runner.js:678:10) at C:\work\proxyquire-test\node_modules\mocha\lib\runner.js:801:12 at next (C:\work\proxyquire-test\node_modules\mocha\lib\runner.js:593:14) at C:\work\proxyquire-test\node_modules\mocha\lib\runner.js:603:7 at next (C:\work\proxyquire-test\node_modules\mocha\lib\runner.js:486:14) at Immediate._onImmediate (C:\work\proxyquire-test\node_modules\mocha\lib\runner.js:571:5) at process.processImmediate (node:internal/timers:471:21) ``` ### Testcase Gist URL https://gist.github.com/kyrylo-hrechykhin/f0afe7c469145c51d4df39fbea97ec95 ### Additional Information #### Workarounds: - avoid calling window.open method completely - separate electron-mocha runs to the one where window.open method is called and the one where proxyquire is used. If it happens in two different files, it is easy to do. #### Details: Issue is probably caused by node version upgrade in electron 23. But as it worked in electron 22, I consider it as a regression. I also could not reproduce this issue in non-electron environment. #### Run testcase gist locally: Run the following commands in the folder where all the files specified in the attached gist. ``` yarn yarn start ``` Please upgrade/downgrade electron versions to see actual/expected results.
https://github.com/electron/electron/issues/37404
https://github.com/electron/electron/pull/38754
4ab0a5ade47534db85d333e17f40530cc9726475
8874306dc021f2beb4c2b7cd49b8f3bec614e373
2023-02-24T16:47:53Z
c++
2023-07-18T08:41:50Z
closed
electron/electron
https://github.com/electron/electron
37,378
["shell/browser/api/electron_api_browser_view.cc", "shell/browser/api/electron_api_browser_window.cc", "shell/browser/api/electron_api_web_contents.cc", "spec/api-browser-view-spec.ts"]
[Bug]: No way to close a browserView
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.0 ### What operating system are you using? Windows ### Operating System Version 10.0.19042 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior There should be a way to close a browserView. ### Actual Behavior Neither window.close() nor webContents.close() has any effect. You can play a video on youtube and hear the sound continue after .removeBrowserView is called. So that does not change the behavior either. Also calling window.close() in the devtools has no effect. ``` const electron = require( "electron" ) electron.app.whenReady().then(()=>{ let main = new electron.BrowserWindow({ "height" : 700, "width" : 800, show: true, }); let view = new electron.BrowserView({}); view.webContents.loadURL("https://www.youtube.com"); main.addBrowserView(view); view.setBounds({x: 0, y: 0, width: 800, height: 700}) view.webContents.openDevTools({ mode: "detach" }); setTimeout(() => { console.log("calling webContents.close()") //main.removeBrowserView(view); //view.webContents.close(); view.webContents.executeJavaScript("window.close()"); }, 5000); }) ``` ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/37378
https://github.com/electron/electron/pull/37420
8fb0f430301578ba94b175f0b097fb2752f5ddf9
5e25d23794a4b3b1bda35c79fcc1b2fdd787ad69
2023-02-22T08:43:45Z
c++
2023-03-01T10:35:06Z
closed
electron/electron
https://github.com/electron/electron
37,376
["shell/browser/notifications/mac/cocoa_notification.mm"]
[Bug]: Notification using `hasReply` removes the first action
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.0 ### What operating system are you using? macOS ### Operating System Version 13.2.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior When showing a main process [Notification](https://www.electronjs.org/docs/latest/api/notification) (i.e. not the browser [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification)) and using `hasReply: true` and `actions: [...]` then the first action is missing from the list. Example: ```javascript const notification = new Notification({ title: 'Hello 2', subtitle: '#general', body: 'blabla', hasReply: true, replyPlaceholder: 'Type your reply...', actions: [ { type: 'button', text: 'Action 1' }, { type: 'button', text: 'Action 2' }, ], }); notification.show(); ``` I expect to get this notification with `Reply`, `Action 1`, and `Action 2`: ![Screenshot 2023-02-21 at 16 44 21](https://user-images.githubusercontent.com/1991151/220493356-22b00c71-6a3f-4c3e-92d7-7c8b88857ec2.png) ### Actual Behavior I get this notification: ![Screenshot 2023-02-21 at 16 43 52](https://user-images.githubusercontent.com/1991151/220493394-5b86d566-baec-48b9-95a4-5cccb9de63bc.png) ### Testcase Gist URL https://gist.github.com/stefansundin/bb92e0d0cf83439e176b3d970e533104 ### Additional Information I tested my fiddle with electron v20.0.0 and it had the same bug.
https://github.com/electron/electron/issues/37376
https://github.com/electron/electron/pull/37381
1f390119fe82249a856965fadbcf4fab89766e67
8fb0f430301578ba94b175f0b097fb2752f5ddf9
2023-02-22T01:02:21Z
c++
2023-03-01T08:46:56Z
closed
electron/electron
https://github.com/electron/electron
37,356
["shell/browser/api/electron_api_browser_view.cc", "shell/browser/api/electron_api_browser_window.cc", "shell/browser/api/electron_api_web_contents.cc", "spec/api-browser-view-spec.ts"]
[Bug]: Destroyed event not emitted on close for custom BrowserView.webContents
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.3.0 ### What operating system are you using? Windows ### Operating System Version Windows 10 version 21H2 ### What arch are you using? x64 ### Last Known Working Electron version 22.2.1 ### Expected Behavior I've created a custom BrowserView, added it to my main BrowserWindow via `addBrowserView()`, and navigated its webContents to a file. Upon receiving a message from the renderer process, I attach a handler to the webContents' 'destroyed' event, then close the contents via `webContents.close()`. Since I'm omitting the 'waitForBeforeUnload' option in my close() call, I expect the 'destroyed' event to be emitted, and my attached handler to run. ### Actual Behavior The 'destroyed' event is not emitted, and my attached handler never run, until my main BrowserWindow is closed. ### Testcase Gist URL https://gist.github.com/mgalla10/cdff38e750ae49d01500445b019493ca ### Additional Information To repro, run the attached gist with v22.2.1 and click the "Close" button. After dismissing a message box saying "Closing page 2", that page will disappear and another "Page 2 closed" message box will appear. Run the gist again with v22.3.0 and notice that after dismissing the first message box, the page doesn't seem to disappear, and the second message box never appears.
https://github.com/electron/electron/issues/37356
https://github.com/electron/electron/pull/37420
8fb0f430301578ba94b175f0b097fb2752f5ddf9
5e25d23794a4b3b1bda35c79fcc1b2fdd787ad69
2023-02-20T21:20:50Z
c++
2023-03-01T10:35:06Z
closed
electron/electron
https://github.com/electron/electron
37,352
["docs/api/web-contents.md", "shell/browser/api/electron_api_web_contents.cc", "spec/api-web-contents-spec.ts"]
[Feature Request]: Add event to WebContents to react to changes of `isCurrentlyAudible`
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success. ### Problem Description Chromium only shows the button to mute/unmute a tab when it actually has media playing. Once the media has paused, the button will eventually fade away. Electron does not offer a way to react to this change. ### Proposed Solution Either a single change event like `audible-change` or two symmetrical events along the lines of `did-become-audible` and `stopped-being-audible`. ### Alternatives Considered Poll `isCurrentlyAudible` ### Additional Information _No response_
https://github.com/electron/electron/issues/37352
https://github.com/electron/electron/pull/37366
c8f715f9a1c116ccb3796e3290fea89989cc0f6e
512e56baf75bce86aef11184af881cff67d8e6a2
2023-02-20T12:29:43Z
c++
2023-03-06T16:00:24Z
closed
electron/electron
https://github.com/electron/electron
37,340
["docs/api/native-image.md", "docs/breaking-changes.md", "shell/common/api/electron_api_native_image_win.cc", "spec/api-native-image-spec.ts", "spec/fixtures/assets/capybara.png"]
[Bug]: getSize() is incorrect if the nativeImage is created by createThumbnailFromPath()
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 21.0.0 ### What operating system are you using? macOS ### Operating System Version macOS 13.2.1 (22D68) ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior ```js const image = await nativeImage.createThumbnailFromPath(filePath, {width: 2000, height:2000}) const size = image.getSize() //<- expect the real thumbnail size, but it's always {2000, 2000} ``` getSize() is incorrect if the nativeImage is created by createThumbnailFromPath() ### Actual Behavior size = the maxSize passed in ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/37340
https://github.com/electron/electron/pull/37362
f33bf2a27113bd9cd92bdd35233107779fc79f47
8ee58e18fd31a7d33ccab78820d61bab9ec1ec69
2023-02-19T03:16:15Z
c++
2023-03-09T02:48:29Z
closed
electron/electron
https://github.com/electron/electron
37,311
["shell/browser/api/electron_api_web_contents.cc", "shell/browser/native_window_mac.mm", "spec/api-browser-window-spec.ts"]
[Bug]: html fullscreen not working post v18
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.0 ### What operating system are you using? macOS ### Operating System Version macOS Monterey 12.6.3 ### What arch are you using? x64 ### Last Known Working Electron version 18.3.15 ### Expected Behavior With the `BroswerWindow` set to `fullscreenable: false`, when hitting the fullscreen button on a video (on YouTube, Tubi, etc...) the video should 'fullscreen' to the window. When clicking it again, it should restore. ### Actual Behavior In some cases (e.g on YouTube) the fullscreen works and `enter-html-full-screen` is emitted. When clicking it again the video does not restore though `leave-html-full-screen` will be emitted. Any subsequent press of the video's fullscreen button will do nothing and emit nothing. In other cases (e.g. sometimes on Tubi) neither fullscreen or the restore works at all. ### Testcase Gist URL https://gist.github.com/jtvberg/8673c71b5dc489a285ac405d6bec8540 ### Additional Information This stopped working as expected somewhere between v18 and v19. I have also tried v20-v23. I am referring to the button in actual video host not the fullscreen button on the window.
https://github.com/electron/electron/issues/37311
https://github.com/electron/electron/pull/37348
868676aa5ccf68793333d40124e49f0d0b175246
32c60b29bbd9abcaedbe9d65b2a4eae78e1c2fca
2023-02-16T21:04:43Z
c++
2023-02-21T11:11:34Z
closed
electron/electron
https://github.com/electron/electron
37,305
["shell/browser/ui/cocoa/electron_ns_window_delegate.mm"]
[Bug]: Aspect Ratio locking and MinHeight/Width appear incompatible
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.0 ### What operating system are you using? macOS ### Operating System Version 13.2 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior IF a BW has minHeight of 300 AND an aspect ratio of X. The BW should never get smaller than 300px tall. ### Actual Behavior It's tough to describe but it appears as though minHeight is either ignored, or being scaled in some way. ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/37305
https://github.com/electron/electron/pull/37306
49df19214ea3abaf0ad91adf3d374cba32abd521
8f2917db0169c81d293db7e32902252612ac68f5
2023-02-16T13:45:48Z
c++
2023-03-01T15:50:14Z
closed
electron/electron
https://github.com/electron/electron
37,301
["filenames.gni", "shell/browser/api/electron_api_web_contents.h", "shell/browser/ui/cocoa/delayed_native_view_host.cc", "shell/browser/ui/cocoa/delayed_native_view_host.h", "shell/browser/ui/cocoa/delayed_native_view_host.mm", "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h", "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm"]
[Bug]: context menus cannot be displayed when "-webkit-app-region: drag" is enabled
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.1.0 ### What operating system are you using? macOS ### Operating System Version macOS Ventura 13.2.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version 22.x ### Expected Behavior I want to show the context menu in "-webkit-app-region: drag" enabled area, ### Actual Behavior No response and no reaction. ### Testcase Gist URL https://gist.github.com/3fe6a69c1eba1d7f85caf7572ba77fd2 ### Additional Information _No response_
https://github.com/electron/electron/issues/37301
https://github.com/electron/electron/pull/37386
a3e3efe4c4d6ed2b40f89eafbd034d8a1744a3a7
e27905c7654e119464ba149f1643cd2770575159
2023-02-16T08:25:26Z
c++
2023-02-24T00:05:30Z
closed
electron/electron
https://github.com/electron/electron
37,293
["docs/api/session.md", "shell/browser/electron_browser_context.cc"]
[Feature Request]: Expose setDisplayMediaRequestHandler disable_local_echo flag to enable audio output during recording
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success. ### Problem Description - We want to record the electron browser window for both audio and video. - The `BrowserWindow` instance loads an external URL, which calls `window.navigator.mediaDevices.getDisplayMedia()` at some point. - We've attached a handler to `setDisplayMediaRequestHandler()` in our preload, which returns the following: `callback({ video: source, audio: mainBrowser.webContents.mainFrame });` * The video source is obtained through `desktopCapturer`, but I don't think that has anything to do with this bug. - When we assemble the stream to the `MediaRecorder` and perform recording, the browser window loses audio output when the recording starts, and resumes output when the recording stops. - The recording itself properly records video and any audio made from the window during that time. After a lot of investigation, I noticed a flag here in the PR that implements `setDisplayMediaRequestHandler()` (#30702): [shell/browser/electron_browser_context.cc](https://github.com/electron/electron/commit/221bb513265128e004a0469f3b2b1c89387ba56f#diff-fa823350727ad86e0ac08c18d6f17e24a62d653b43a08242e4608f5a8ee8e5b9R501) ``` } else if (result_dict.Get("audio", &rfh)) { devices.audio_device = blink::MediaStreamDevice( request.audio_type, content::WebContentsMediaCaptureId(rfh->GetProcess()->GetID(), rfh->GetRoutingID(), /* disable_local_echo= */ true) ``` And thought `disable_local_echo` might control audio loopback behavior. I compiled a custom version of electron with that flag set to `false` and repeated the above steps, which correctly allowed audio to come through the speakers while recording was happening. The recording itself retained video and audio. I am on an M2 Mac running Ventura 13.2.1. (_I have zero C++ experience and just used intuition to find this while looking at the PR for `setDisplayMediaRequestHandler` and followed the electron build guides to test my hypothesis._) ### Proposed Solution May I ask that an option be exposed for `setDisplayMediaRequestHandler` that controls the value of that particular flag? Or, have the option be part of the callback for the handler. ### Alternatives Considered Have not discovered any alternatives. Literature around `setDisplayMediaRequestHandler` is limited as it's a recently-released feature. ### Additional Information This bug ticket describes the behavior we experienced, although the context is a bit different (It references `getUserMedia` and `chrome.tabCapture`. https://bugs.chromium.org/p/chromium/issues/detail?id=1403733
https://github.com/electron/electron/issues/37293
https://github.com/electron/electron/pull/37315
5e25d23794a4b3b1bda35c79fcc1b2fdd787ad69
49df19214ea3abaf0ad91adf3d374cba32abd521
2023-02-16T03:19:19Z
c++
2023-03-01T10:37:19Z
closed
electron/electron
https://github.com/electron/electron
37,292
["patches/chromium/mas_no_private_api.patch"]
[MAS Rejection]: Symbols: _sandbox_compile_string, _sandbox_free_profile, _sandbox_free_params, _sandbox_create_params, _sandbox_set_param
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. ### Electron Version 23.0.0 ### Rejection Email Guideline 2.5.1 - Performance - Software Requirements Your app uses or references the following non-public or deprecated APIs: Symbols: _sandbox_compile_string, _sandbox_free_profile, _sandbox_free_params, _sandbox_create_params, _sandbox_set_param The use of non-public or deprecated APIs is not permitted on the App Store, as they can lead to a poor user experience should these APIs change and are otherwise not supported on Apple platforms. Next Steps It would be appropriate to revise your binary and remove any references to the non-public or deprecated APIs identified above. If you are using third-party libraries, update to the most recent version of those libraries. If you do not have access to the libraries' source, the following command line tools can help you identify the location of problematic code: - The "strings" tool can output a list of the methods the library calls. - The "otool -ov" tool will output the Objective-C class structures and their defined methods. Resources - We are constantly reevaluating and identifying non-public APIs that you may have been using for an extended period of time. Always use [public APIs and frameworks](https://developer.apple.com/documentation/) and ensure they are up to date. - If there are no alternatives for providing the functionality your app requires, you can use [Feedback Assistant](https://feedbackassistant.apple.com/welcome) to submit an enhancement request. ### Additional Information _No response_
https://github.com/electron/electron/issues/37292
https://github.com/electron/electron/pull/37309
a92fd2aa05c0cfcb5809268eb8a4f1d4d3f91074
85cf56d80b9073091303f807e584362501bb8fda
2023-02-16T02:14:18Z
c++
2023-02-21T10:44:18Z
closed
electron/electron
https://github.com/electron/electron
37,162
["shell/browser/api/electron_api_browser_window.cc", "shell/browser/api/electron_api_web_contents.cc"]
[Bug]: window.close() destroys all child BrowserView-s even if window's 'beforeunload' handler has 'e.returnValue = false'
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.2.0 ### What operating system are you using? Windows ### Operating System Version Windows 10 ### What arch are you using? x64 ### Last Known Working Electron version 21.4.1 ### Expected Behavior If 'beforeunload' event listener for a window has `event.returnValue = false` non of it's child Browser Views are destroyed/closed ### Actual Behavior If 'beforeunload' event listener for a window has `event.returnValue = false` all of it's child Browser Views will be detroyed ### Testcase Gist URL https://gist.github.com/YauheniBH-EF/190ea8ff42c09a15763705ed4647b02e ### Additional Information I have a feeling that it's related to https://github.com/electron/electron/pull/35509 this PR changes, but i'm not proficient enough in Electron/C++ to check/fix it by myself.
https://github.com/electron/electron/issues/37162
https://github.com/electron/electron/pull/37205
4d6f230d2108c19ac862577e83443a2eec53a183
8eee4f2df1982ae52f1ed1a7ca3e2183ba701c4f
2023-02-07T11:35:20Z
c++
2023-02-14T17:40:37Z
closed
electron/electron
https://github.com/electron/electron
37,158
["docs/api/session.md", "spec/chromium-spec.ts"]
[Bug]: There is no `clipboard-sanitized-write` permission listed in docs
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 17.0.0 ### What operating system are you using? macOS ### Operating System Version Does not matter ### What arch are you using? x64 ### Last Known Working Electron version 16.0.0 ### Expected Behavior This is not a bug. I noticed my webContents requests permission named `clipboard-sanitized-write` when attempting to write data to clipboard. I did a search in docs https://www.electronjs.org/docs/latest/api/session#sessetpermissionrequesthandlerhandler and found only `clipboard-read` permission. It would be great to update the documentation :) Expected: there is `clipboard-sanitized-write` in docsthe ### Actual Behavior There is no `clipboard-sanitized-write` permission in docs. ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/37158
https://github.com/electron/electron/pull/37173
478ce969143cd8d069ab4def0992e8d5719445cf
e5e9186d613277c855d913fa21d0f03496c2ff87
2023-02-07T09:06:56Z
c++
2023-02-09T10:38:39Z
closed
electron/electron
https://github.com/electron/electron
37,127
["docs/api/web-contents.md", "lib/browser/api/web-contents.ts"]
[Bug]: A6 not accepted as pageSize in settings of webContents.print
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.2.0 ### What operating system are you using? macOS ### Operating System Version Ventura 13.0.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior web content.print to accept A6 as pageSize in settings ### Actual Behavior throwing an error : Error: Unsupported pageSize: A6 at _.print (node:electron/js2c/browser_init:2:76160) ### Testcase Gist URL _No response_ ### Additional Information You need to add in this file electron/lib/browser/api/web-contents.ts, to the constant PDFPageSizes the A6 configuration
https://github.com/electron/electron/issues/37127
https://github.com/electron/electron/pull/37159
cb03c6516b2729ddf915314d5a72fbacb772a665
889859df5bb74e6c18b1c2f21c28ade80a366611
2023-02-03T10:09:02Z
c++
2023-02-14T10:44:34Z
closed
electron/electron
https://github.com/electron/electron
37,090
["docs/api/web-contents.md", "docs/fiddles/features/web-bluetooth/index.html", "docs/fiddles/features/web-bluetooth/main.js", "docs/fiddles/features/web-bluetooth/preload.js", "docs/fiddles/features/web-bluetooth/renderer.js", "shell/browser/lib/bluetooth_chooser.cc", "shell/browser/lib/bluetooth_chooser.h"]
[Bug]: Web Bluetooth: Always cancelled request after first dismiss
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.1.0 ### What operating system are you using? Windows ### Operating System Version Windows 10 Pro 22H2 ### What arch are you using? x64 ### Last Known Working Electron version None ### Expected Behavior Even if it didn't found any devices, after i dismiss the request, it should perform another scan next time i call requestDevice. ### Actual Behavior After first dismiss the requestDevice, all later navigator.bluetooth.requestDevice return User cancelled immediatly. ### Testcase Gist URL https://gist.github.com/111927e2d69b53c6c151eb6aa5070948 ### Additional Information I have create a simple tst code on Fiddle, see above. I have alreadly check #10763, who seem like having the same problem but somehow he never repoduce it anymore. But i think i found the issue. It's really simple to reproduce infact, just get "select-bluetooth-device" event, and run navigator.bluetooth.requestDevice({ filters: [{ services: [0xffff] }] }) in console, and just run it again, it will return user cancelled immediatly. In fact, there's kinda a way to prevent that happend, is to call the callback in "select-bluetooth-device" event with an empty string when you need to cancel the discovery. But, that's the main issue here, if there's no filtered device found at all, then you never get the callback function to call with an empty string. if then you dismiss the request, it will keep returning "user cancelled" immediatly everytime you call requesrDevice later. the Fiddle example is demonstrating this. click scan, if there's no device found, click cancel, console will prompt "User cancelled the requestDevice()". if you uncomment the "acceptAllDevices" in renderer.js, which will found all the device, will not have this problem. Is there a way to get the callback funtion? or a better way to cancel the discovery? Thank you.
https://github.com/electron/electron/issues/37090
https://github.com/electron/electron/pull/37601
42e7cd9b3f3e16d07f162716b4f1346e32004aec
6a6908c4c887c5f685f5e172ff01afc02ebcbc65
2023-02-01T06:01:03Z
c++
2023-03-27T13:31:15Z
closed
electron/electron
https://github.com/electron/electron
37,049
["patches/chromium/printing.patch"]
[Bug]: Main process crash when trying to open print dialog
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23 ### What operating system are you using? Windows ### Operating System Version Windows 11 22H2 ### What arch are you using? x64 ### Last Known Working Electron version 22.1.0 ### Expected Behavior Opens print dialog. ### Actual Behavior Main process crash, tested on macos and windows 11. ### Testcase Gist URL https://gist.github.com/thomasLechaptois/7169a5188de0aa448b3e18ab813a41f8 ### Additional Information All Electron 23 alpha and beta up to beta 5 are affected by this crash.
https://github.com/electron/electron/issues/37049
https://github.com/electron/electron/pull/37052
fcc7a869f218059d0de22db1ea3d63c2e9c192ce
ce35bda80580cd355f5cdf31d39f9b4da82822e4
2023-01-27T14:25:35Z
c++
2023-01-31T11:06:11Z
closed
electron/electron
https://github.com/electron/electron
37,040
["docs/api/browser-window.md"]
[Feature Request]: Allow clearing of aspect ratio
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success. ### Problem Description `window.setAspectRatio` allows us to specify the resizing aspect ratio for a window, but how can we reset this value to allow any aspect ratio? Perhaps `window.clearAspectRatio` (which might also warrant the addtion of `window.getAspectRatio`). ### Proposed Solution I want to go between enforcing and not enforcing aspect ratio, e.g.: ``` window.setAspectRatio(bounds); // later... if (window.getAspectRatio()) { window.clearAspectRatio(); } ``` ### Alternatives Considered Current workaround is to destroy the window once it has aspect ratio set and re-create a new one without aspect ratio. ### Additional Information _No response_
https://github.com/electron/electron/issues/37040
https://github.com/electron/electron/pull/37074
01b4e3b521a46df1c9e810da2e6244767fd6288e
730a07ad623cfb72b7028b368a399a6fe593f740
2023-01-26T23:10:27Z
c++
2023-01-31T20:36:09Z
closed
electron/electron
https://github.com/electron/electron
37,038
["shell/renderer/electron_renderer_client.cc", "shell/renderer/web_worker_observer.cc", "shell/renderer/web_worker_observer.h", "spec/fixtures/crash-cases/worker-multiple-destroy/index.html", "spec/fixtures/crash-cases/worker-multiple-destroy/index.js", "spec/fixtures/crash-cases/worker-multiple-destroy/worklet.js"]
[Bug]: nodeIntegrationInWorker: true makes the app crash using AudioWorklet
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.1.0 ### What operating system are you using? MacOS ### Operating System Version Ventura 13.2 ### What arch are you using? arm64 (and x64) ### Last Known Working Electron version 9 ### Expected Behavior The app shouldn't crash. ### Actual Behavior Setting `nodeIntegrationInWorker: true` will make the app crash when using an AudioWorklet. I forked the `electron-quickstart` project in order to be able to easily reproduce the issue. The changes can be found here: https://github.com/electron/electron-quick-start/compare/master...rmnbrd:electron-quick-start:issue-node-integration-in-worker-and-audio-worklet **Reproduction steps** - Clone the example I've linked right above - Run `yarn && yarn start` - Click the `Start AudioWorklet` button **twice** - Click the `Reload` button - **App crashes** ### Testcase Gist URL https://github.com/electron/electron-quick-start/compare/master...rmnbrd:electron-quick-start:issue-node-integration-in-worker-and-audio-worklet ### Additional Information We have tested on several versions of Electron (22, 21, 20, 19). It is worth noting that: - We could not experience that issue on v9 and below. - The bug is not reproducible on v22 if `nodeIntegrationInWorker` is set to `false`. - The bug is not reproducible on Chrome 109. --- Here you will find the complete crash report: https://pastebin.com/wrKshgK3
https://github.com/electron/electron/issues/37038
https://github.com/electron/electron/pull/37050
ce35bda80580cd355f5cdf31d39f9b4da82822e4
23739c644ba8dfa6cec5417cdf4e2550ca4b94b8
2023-01-26T15:43:30Z
c++
2023-01-31T11:29:29Z
closed
electron/electron
https://github.com/electron/electron
37,028
[".github/workflows/release_dependency_versions.yml"]
GH Workflow Fails to Trigger `mksnapshot` Release for `23-x-y` Prereleases
Example failure: https://github.com/electron/electron/actions/runs/3991558400 I think there are two issues here: * First looks like a permission error, possibly because [the permissions for the workflow](https://github.com/electron/electron/blob/a30a9c7c4faa5aca476dd593dd02bbfac43432df/.github/workflows/release_dependency_versions.yml#L10-L11) are too restrictive? Not sure what the correct permission is to trigger a cross-repo workflow. * It looks like [`update-version.js` in `mksnapshot`](https://github.com/electron/mksnapshot/blob/ca16d69d8fd1257caceac224aa5397d12d95ae64/script/update-version.js#L4) would reject prerelease versions
https://github.com/electron/electron/issues/37028
https://github.com/electron/electron/pull/37036
fd761ec8f74d8a4c77864ab86ef6994a5fb72e1d
2dc76d0d8087bdd882cf3e0aa8dc4e4cd643e9b9
2023-01-26T00:52:01Z
c++
2023-02-01T18:12:19Z
closed
electron/electron
https://github.com/electron/electron
37,008
["shell/browser/native_window.cc", "shell/browser/native_window_views.cc"]
[Bug]: Unable to resize, with cursor drag, from edge of window that is set to -webkit-app-region:drag
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.0.0-beta.5 ### What operating system are you using? Windows ### Operating System Version Windows 11 Pro (10.0.22621 Build 22621) ### What arch are you using? x64 ### Last Known Working Electron version 22.0.3 ### Expected Behavior User is able to resize window from the edge of window that is set to `webkit-app-region:drag` , by dragging from this edge. (reproducible up till version 22.0.3) ### Actual Behavior User is unable to resize window from the edge of window that is set to `webkit-app-region:drag` , by dragging from this edge. https://user-images.githubusercontent.com/15127636/214312123-018f7ea2-2e9c-4e6c-8a8f-1489943007c3.mp4 ### Testcase Gist URL https://gist.github.com/takumus/9054bde77c8206143232fed2659bf108 ### Additional Information _No response_
https://github.com/electron/electron/issues/37008
https://github.com/electron/electron/pull/37016
1486cbdf6410e569f619d1ca7ceea0dd3380bf02
0026fdb78a68c6a4067191826bd1bfc1d9700998
2023-01-24T14:17:18Z
c++
2023-01-26T13:04:19Z
closed
electron/electron
https://github.com/electron/electron
36,970
["patches/node/fix_expose_the_built-in_electron_module_via_the_esm_loader.patch"]
[Bug]: Regression: #35930 broke CJS via ESM loading when exporting null/undefined with ELECTRON_RUN_AS_NODE
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.3 ### What operating system are you using? Ubuntu ### Operating System Version Ubuntu 22.10 ### What arch are you using? x64 ### Last Known Working Electron version 20.3.1 / 21.1.0 ### Expected Behavior 1. `npm i [email protected] ava` 2. `ELECTRON_RUN_AS_NODE=true ./node_modules/.bin/electron ./node_modules/.bin/ava` 3. Works (can't find any tests obviously) I was successfully running my esm tests via `ELECTRON_RUN_AS_NODE` until now ### Actual Behavior 1. `npm i [email protected] ava` 2. `ELECTRON_RUN_AS_NODE=true ./node_modules/.bin/electron ./node_modules/.bin/ava` 3. Crashes ``` node:internal/modules/esm/translators:178 if (!ObjectPrototypeHasOwnProperty(exports, exportName) || ^ TypeError: Cannot convert undefined or null to object at hasOwnProperty (<anonymous>) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:178:12) at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:533:24) at async loadESM (node:internal/process/esm_loader:91:5) at async handleMainPromise (node:internal/modules/run_main:65:12) ``` ### Testcase Gist URL _No response_ ### Additional Information I was able to track this down and repro without ava as well (https://github.com/avajs/ava/discussions/3155). It appears you can no longer export `null` because it crashes the esm loader patch. index.mjs ```js import m from './module.cjs'; ``` module.cjs ```js module.exports = null; ``` `ELECTRON_RUN_AS_NODE=true ./node_modules/.bin/electron index.mjs` It broke between `20.3.1` and `20.3.2` because of #35930 . If you're curious, in ava this comes from this dep https://github.com/jamiebuilds/ci-parallel-vars/blob/994940e4882bdddf046a5c076b49d700449e4b38/index.js#L41-L56 > Weirdly, this is like the 4th time I've tried this. @MarshallOfSound fifth time is the charm
https://github.com/electron/electron/issues/36970
https://github.com/electron/electron/pull/37009
4bc6b15f53a3e4f961c2ade3c96fa9229ec00367
58beec1da2cacd59a91a556b86f47ec0147b9c36
2023-01-20T09:12:15Z
c++
2023-01-25T21:03:47Z
closed
electron/electron
https://github.com/electron/electron
36,906
["shell/browser/ui/autofill_popup.cc"]
[Bug]: Datalist positioning is broken in Electron v22.x.y
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.x.y ### What operating system are you using? Windows ### Operating System Version Windows 10 build 19045.2486 ### What arch are you using? x64 ### Last Known Working Electron version 21.3.4 ### Expected Behavior I expect that a datalist when displayed, should be positioned horizontally in line with it's bound input box; either above or below depending on space available. See Image below from Electron fiddle using Electron v21.3.4 ![Electron_21_Datalist_Position](https://user-images.githubusercontent.com/16248321/212309185-d40cc3e3-1e3d-4d42-a92c-2942349e0781.png) __ ### Actual Behavior In Electron v22.0..0+ The datalist is positioned offset to the left of its bound input box by quite a distance. In some instance it can appear as if the datalist is clamped to the left margin. See Image below from Electron fiddle using Electron v22.0.0 although the same can be reproduced using any of the currently available v22.0.y -> 22.0.1, 22.0.2 And a quick test with v23.0.0-beta2 also exhibity the same behaviour. ![Electron_22_Datalist_Position_Broken](https://user-images.githubusercontent.com/16248321/212310596-b36fce8c-6096-4c83-b21b-1693994987f6.png) ### Testcase Gist URL https://gist.github.com/e50cb256d567ed25b7bbf12b9cbe5417 ### Additional Information _No response_
https://github.com/electron/electron/issues/36906
https://github.com/electron/electron/pull/36934
9630e26e6dec503bc82ca4b9f87ebf0344311ca5
55c818d0a84400621c0817c8a2e4cc17d9eb24c8
2023-01-13T11:34:12Z
c++
2023-01-19T18:44:23Z
closed
electron/electron
https://github.com/electron/electron
36,858
["patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch", "shell/common/node_bindings.cc", "shell/common/node_bindings.h", "shell/renderer/electron_renderer_client.cc", "shell/renderer/web_worker_observer.cc", "spec/chromium-spec.ts"]
[Bug]: Uncaught illegal state exception and renderer crash with node immediates and closing child window
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 13.x, 17.x, 22.0.0 ### What operating system are you using? Windows ### Operating System Version Windows 11 (22621.963) ### What arch are you using? x64 ### Last Known Working Electron version Unknown ### Expected Behavior Closing a child window should not produce an 'Uncaught illegal state' exception. Furthermore, it shouldn't cause the renderer process to exit with code 7 (which can specifically occur if there is a node native immediate being used, see additional information below). ### Actual Behavior A race condition can occur when using `setImmediate` (or using a node module that sets up native immediates) in a node environment and closing a child window that has a separate node environment (but shares the underlying isolate and event loop). Note: This seems to occur when the BrowserWindow webPreferences sandbox is set to false. The behavior here is that the console will report `Uncaught illegal state` and in certain cases the renderer process will simply exit with code 7. The following was also reported to stderr: ``` illegal access (Use `electron --trace-uncaught ...` to show where the exception was thrown) ``` ### Testcase Gist URL https://gist.github.com/markh-discord/1bb303c57d1a20aeee95aeedbc403ab3 ### Additional Information Note: This seems to occur only when the main BrowserWindow webPreferences sandbox is set to false. The reproduce project in the gist may require a few attempts, but when clicking the button to open the window it will automatically close. Around 1-10 attempts may be needed to display the error in the console. To improve the simplicity of this I used Javascript `setImmediate` which seems to be more recoverable as it doesn't exit the process. In the steps below there is a node native immediate being setup by the node https module that does cause the renderer process to eventually exit. Reproduce steps aren't precise since this is a race condition, however the following path seems to hit this: 1. node `Environment A` is created and `Environment::InitializeLibuv` is run and sets up its `Environment::CheckImmediate` method in `uv_check_start`. a. This will be interesting later, but it's called via the event loop `uv_run`: https://github.com/libuv/libuv/blob/e972c6705f197e12d211b598fc514bbea051425d/src/win/core.c#L645 1. Window is opened, a new node Environment (I'll call `Environment B`) is created: https://github.com/electron/electron/blob/dfe501941cd9e7092829c3ef8e27e322047cf736/shell/renderer/electron_renderer_client.cc#L91-L92 a. This environment uses the existing `NodeBindings::isolate_data_`, which also shares the isolate and uv_loop_ from `Environment A`: https://github.com/electron/electron/blob/dfe501941cd9e7092829c3ef8e27e322047cf736/shell/common/node_bindings.cc#L493 2. node `Environment A` has a native immediate pushed from http post work being done by the node http module. a. This can occur in a few places via `env()->SetImmediate(...)`, here's one as an example: https://github.com/nodejs/node/blob/e8db11c5b2169931238db6c02f6d7f80b3c6e759/src/crypto/crypto_tls.cc#L593 3. Window is closed, causing `Environment B` to begin cleanup: a. `node::FreeEnvironment` is called, and sets up JS to be disallowed: https://github.com/nodejs/node/blob/2af83ea0f8a1594c0d0bf4bc4b3035234bcd895e/src/api/environment.cc#L420-L421 b. `node::CleanupHandles` is eventually called, this starts up the event loop via `uv_run`: https://github.com/nodejs/node/blob/2af83ea0f8a1594c0d0bf4bc4b3035234bcd895e/src/env.cc#LL966C21-L966C21 c. Per 1a above, the `uv_check_invoke` is called, and the `Environment A`'s `CheckImmediate` is run 4. At this point we're now running things from `Environment A`, in particular it will begin executing the native immediates that it has. Note that we're still in the same call stack and the isolate's state to disallow JS is still flagged. 5. Since a native immediate was added in step 2 above, this begins running, eventually for the http stream work it tries to callback into Javascript via `node::ReportWritesToJSStreamListener::OnStreamAfterReqFinished`: a. https://github.com/nodejs/node/blob/2af83ea0f8a1594c0d0bf4bc4b3035234bcd895e/src/stream_base.cc#L632 6. This then fails the check on if JS is allowed to be executed (setup on shared isolate from `Environment B` in step 3a): a. https://chromium.googlesource.com/v8/v8/+/roll/src/execution.cc ``` if (!ThrowOnJavascriptExecution::IsAllowed(isolate)) { isolate->ThrowIllegalOperation(); ``` 7. Call stack begins unwinding and eventually hits: `errors::TriggerUncaughtException`: https://github.com/nodejs/node/blob/2af83ea0f8a1594c0d0bf4bc4b3035234bcd895e/src/env.cc#L1097 8. This in turn attempts to execute a `fatal_exception_function.As<Function>()->Call`: https://github.com/nodejs/node/blob/2af83ea0f8a1594c0d0bf4bc4b3035234bcd895e/src/node_errors.cc#L1126-L1127 a. Since JS is still disallowed we get _another_ `v8::internal::Isolate::ThrowIllegalOperation` triggered 9. This unwinds and executes the `TryCatchScope` dtor setup in the above scope: https://github.com/nodejs/node/blob/2af83ea0f8a1594c0d0bf4bc4b3035234bcd895e/src/node_errors.cc#L1116-L1117 10. The `TryCatchScope::~TryCatchScope` then builds the message to dumps and eventually causes the `env_->Exit` to be called: https://github.com/nodejs/node/blob/2af83ea0f8a1594c0d0bf4bc4b3035234bcd895e/src/node_errors.cc#L572 11. This then runs the `Environment::Exit` and eventually will exit the process: https://github.com/nodejs/node/blob/2af83ea0f8a1594c0d0bf4bc4b3035234bcd895e/src/env.cc#L1548
https://github.com/electron/electron/issues/36858
https://github.com/electron/electron/pull/38754
4ab0a5ade47534db85d333e17f40530cc9726475
8874306dc021f2beb4c2b7cd49b8f3bec614e373
2023-01-10T20:50:12Z
c++
2023-07-18T08:41:50Z
closed
electron/electron
https://github.com/electron/electron
36,842
[".github/workflows/stale.yml"]
[Bug]: Close Stale Issues has not been working since December 5th 2022
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 17.0.0 ### What operating system are you using? macOS ### Operating System Version macOS 13.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior Close Stale issues runs and checks out the issues and the number of days before the stale issue is closed. ### Actual Behavior The Close Stale Issues workflow is failing every day with the error: "[Invalid workflow file: .github/workflows/stale.yml#L27](https://github.com/electron/electron/actions/runs/3870067541/workflow) The workflow is not valid. .github/workflows/stale.yml (Line: 27, Col: 5): Required property is missing: runs-on" ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/36842
https://github.com/electron/electron/pull/36843
1a9c338c92a50ad2891953a7fd2cecc2e7414bc0
f56a26c4f70dca6e9468ba15a82007d4a9ad53d6
2023-01-09T14:28:22Z
c++
2023-01-09T18:16:58Z
closed
electron/electron
https://github.com/electron/electron
36,829
["shell/browser/electron_browser_main_parts.cc", "shell/renderer/electron_renderer_client.cc", "spec/fixtures/api/unhandled-rejection-handled.js", "spec/fixtures/api/unhandled-rejection.js", "spec/node-spec.ts"]
[Bug]: When logging unhandled rejection stack, stack is logged twice
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.0 ### What operating system are you using? Ubuntu ### Operating System Version Ubuntu 22.10 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior When adding an unhandledrejection listener that prints error.stack, the error stack should only be printed once. ```js const handleUnhandledRejection = (reason) => { console.error(`Unhandled Rejection: ${reason.stack}`); }; const main = async () => { process.on("unhandledRejection", handleUnhandledRejection); throw new Error("oops"); }; main(); ``` This is the output in NodeJS: ``` Unhandled Rejection: Error: oops at main (/tmp/electron-unhandled-rejection-bug/index.js:7:9) at Object.<anonymous> (/tmp/electron-unhandled-rejection-bug/index.js:10:1) at Module._compile (node:internal/modules/cjs/loader:1218:14) at Module._extensions..js (node:internal/modules/cjs/loader:1272:10) at Module.load (node:internal/modules/cjs/loader:1081:32) at Module._load (node:internal/modules/cjs/loader:922:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 ``` ### Actual Behavior In Electron, the unhandled rejection stack is printed twice: ``` Unhandled Rejection: Error: oops at main (/tmp/electron-unhandled-rejection-bug/index.js:7:9) at Object.<anonymous> (/tmp/electron-unhandled-rejection-bug/index.js:10:1) at Module._compile (node:internal/modules/cjs/loader:1141:14) at Module._extensions..js (node:internal/modules/cjs/loader:1196:10) at Module.load (node:internal/modules/cjs/loader:1011:32) at Module._load (node:internal/modules/cjs/loader:846:12) at f._load (node:electron/js2c/asar_bundle:2:13328) at loadApplicationPackage (/tmp/electron-unhandled-rejection-bug/node_modules/electron/dist/resources/default_app.asar/main.js:121:16) at Object.<anonymous> (/tmp/electron-unhandled-rejection-bug/node_modules/electron/dist/resources/default_app.asar/main.js:233:9) at Module._compile (node:internal/modules/cjs/loader:1141:14) (node:14838) UnhandledPromiseRejectionWarning: Error: oops at main (/tmp/electron-unhandled-rejection-bug/index.js:7:9) at Object.<anonymous> (/tmp/electron-unhandled-rejection-bug/index.js:10:1) at Module._compile (node:internal/modules/cjs/loader:1141:14) at Module._extensions..js (node:internal/modules/cjs/loader:1196:10) at Module.load (node:internal/modules/cjs/loader:1011:32) at Module._load (node:internal/modules/cjs/loader:846:12) at f._load (node:electron/js2c/asar_bundle:2:13328) at loadApplicationPackage (/tmp/electron-unhandled-rejection-bug/node_modules/electron/dist/resources/default_app.asar/main.js:121:16) at Object.<anonymous> (/tmp/electron-unhandled-rejection-bug/node_modules/electron/dist/resources/default_app.asar/main.js:233:9) at Module._compile (node:internal/modules/cjs/loader:1141:14) (Use `electron --trace-warnings ...` to show where the warning was created) (node:14838) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) ``` Overall, the NodeJS output is cleaner / easier to understand. ### Testcase Gist URL https://github.com/SimonSiefke/electron-unhandled-rejection-bug ### Additional Information ## Possible solution Replacing https://github.com/electron/electron/blob/90af7d7fe2fc70984404474feec4ac2c827794fe/shell/browser/electron_browser_main_parts.cc#L281-L282 with an unhandled rejection handler next to this function https://github.com/electron/electron/blob/90af7d7fe2fc70984404474feec4ac2c827794fe/lib/browser/init.ts#L22 ```js process.on('unhandledRejection', function (error) { // Do nothing if the user has a custom unhandled rejection handler. if (process.listenerCount('unhandledRejection') > 1) { return; } import('electron') .then(({ dialog }) => { const stack = error.stack ? error.stack : `${error.name}: ${error.message}`; const message = 'Unhandled Rejection\n' + stack; dialog.showErrorBox('A JavaScript error occurred in the main process', message); }); }); ``` would keep the current behaviour of not crashing the main process on unhandled rejections ## Related issues - https://github.com/electron/electron/issues/36528
https://github.com/electron/electron/issues/36829
https://github.com/electron/electron/pull/37464
17ccb3c6ecca1b16fb3e10504ffe0135b4e1794c
829fb4f586ee4f0c5b6bbbc6ae9c9853a710eba6
2023-01-08T18:29:36Z
c++
2023-03-06T10:04:43Z
closed
electron/electron
https://github.com/electron/electron
36,826
["docs/api/structures/display.md", "shell/common/gin_converters/gfx_converter.cc", "spec/api-screen-spec.ts"]
[Feature Request]: Expose Display label property
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success. ### Problem Description In line with #6899 and #25252 I would like request support for getting the display label. It looks like chromium provides a "User-friendly label, determined by the platform." that isn't currently used by electron. https://chromium.googlesource.com/chromium/src/+/master/ui/display/display.h ### Proposed Solution Based off of similar previous accepted changes I think these are the edits necessary: In gfx_converter.cc line 147: `dict.Set("label", val.label());` In api-screen-spec.ts line 37: `expect(display).to.have.property('label').that.is.a('string');` And finally in the docs display.md line 4: `* `label` string - User-friendly label, determined by the platform.` ### Alternatives Considered No alternatives necessary. ### Additional Information I would be happy to contribute the changes myself, but I am a little confused by the contribution workflow and unfortunately I couldn't get a successful build using the build-tools.
https://github.com/electron/electron/issues/36826
https://github.com/electron/electron/pull/36855
a7bc57922010062784b2be877ba778323499e0f9
2c56a06ad36c624d680c499725d5d9ec3e4d88b0
2023-01-07T20:57:54Z
c++
2023-01-18T06:44:40Z
closed
electron/electron
https://github.com/electron/electron
36,721
["shell/browser/ui/message_box_mac.mm"]
[Bug]: macOS confirmation dialog does not show blue border around focused button when it is default
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22 ### What operating system are you using? macOS ### Operating System Version 12.6.2 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior A focused button shows a blue border even when default button: ![image](https://user-images.githubusercontent.com/900690/208836917-442e9641-3ef7-4ab0-ac61-d934411be91e.png) ### Actual Behavior A focused button does not show the blue border: ![image](https://user-images.githubusercontent.com/900690/208837077-0bb46a91-3fe1-479b-a2f5-8b0f893ec835.png) ### Testcase Gist URL https://gist.github.com/d9bd650ffc1efcf61016cbc81ea35652 ### Additional Information This only seems to happen when using non-standard labels for the buttons. It requires this macOS setting: ![image](https://user-images.githubusercontent.com/900690/208837201-f1529993-651a-4fa0-8ea2-b9763ac8433b.png)
https://github.com/electron/electron/issues/36721
https://github.com/electron/electron/pull/36772
42cda4a893e5c502ffe4bd1eb0f086709b586bd3
32288ac9c588fe8c3b814338aaf5df7fddbce276
2022-12-21T06:31:39Z
c++
2023-01-05T08:56:38Z
closed
electron/electron
https://github.com/electron/electron
36,715
["docs/api/web-contents.md", "docs/api/webview-tag.md", "lib/browser/web-view-events.ts", "shell/browser/api/electron_api_web_contents.cc", "shell/browser/api/electron_api_web_contents.h", "shell/browser/ui/inspectable_web_contents.cc", "shell/browser/ui/inspectable_web_contents_delegate.h"]
[Bug]: Developer tools click link does not create a new page
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.17 ### What operating system are you using? Windows ### Operating System Version windows 11 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior ![image](https://user-images.githubusercontent.com/71307878/208800464-e0902998-8600-4d81-b99d-8e29761a43d9.png) click the link should create a new page ### Actual Behavior but nothing happen ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/36715
https://github.com/electron/electron/pull/36774
8d008c977df465d3ad96dd6c8c3daa7afd8bea5f
7d46d3ec9d5f30138777d1bd12890ebe28ba6c31
2022-12-21T01:42:46Z
c++
2023-01-26T08:54:26Z
closed
electron/electron
https://github.com/electron/electron
36,629
["patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch", "shell/browser/web_contents_permission_helper.cc", "spec/api-session-spec.ts"]
[Bug]: `getUserMedia` triggers extra call to `setPermissionRequestHandler` handler with missing metadata
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.0 ### What operating system are you using? macOS ### Operating System Version 12.6 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version 20.3.8 ### Expected Behavior In Electron 20.3.8, registering a handler with `setPermissionRequestHandler` and calling `navigator.getUserMedia({ audio: true }, ...)` in the browser produces one call to the handler, which includes a `securityOrigin` property in its `details`. ### Actual Behavior Starting in Electron 21.0.0, the handler is also called a second time, with a `details` param that doesn't include a `securityOrigin` or `mediaTypes` property. Returning `false` for this call will cause the `getUserMedia` call to fail. Example log output from Fiddle: <img width="832" alt="image" src="https://user-images.githubusercontent.com/114442851/206822049-094ec08e-3ed4-4968-b491-419a4790329b.png"> ### Testcase Gist URL https://gist.github.com/rf-figma/35de0678214fe97a8e736b64e1a26ead
https://github.com/electron/electron/issues/36629
https://github.com/electron/electron/pull/36787
1d9a4ab02cb198de27de8636d0893bcc27c671cf
f31826f4a0c44756305087f11cf0de794e68c447
2022-12-10T01:39:19Z
c++
2023-01-11T10:55:31Z
closed
electron/electron
https://github.com/electron/electron
36,615
["patches/chromium/.patches", "patches/chromium/chore_defer_usb_service_getdevices_request_until_usb_service_is.patch", "shell/browser/feature_list.cc"]
[Bug]: WebUSB API device list is always empty (attached devices are ignored).
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 23.0.0-alpha.1 ### What operating system are you using? macOS ### Operating System Version Ventura 13.0.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior Electron should detect my Novation Launchpad X (a class-compliant, USB MIDI device). ### Actual Behavior The device shows up in `chrome://usb-internals` (in stock Chrome), but when I call `navigator.usb.getDevices` in Electron, the device does not appear in the device list. The device list is always empty. ### Testcase Gist URL _No response_ ### Additional Information Codewise, I basically have this in my `index.js` file: ``` js const { app, BrowserWindow } = require("electron"); app.whenReady().then(function() { const selectDevice = function(event, details, callback) { console.log("device list:", details.deviceList); // this array is always empty event.preventDefault(); }; const renderer = new BrowserWindow(options); // note: `options` is defined IRL renderer.webContents.session.setPermissionCheckHandler(() => true); renderer.webContents.session.on("select-usb-device", selectDevice); }); ``` In the renderer process, I just have a call to `navigator.usb.requestDevice` (inside a `keydown` event listener that only exists to ensure that the call is in response to a user gesture). Note: The filters I'm passing to the WebUSB API are empty (though I tried Novation's ID (`0x1235`) too).
https://github.com/electron/electron/issues/36615
https://github.com/electron/electron/pull/37441
4e85bb921bef97a5bedb4188d0e360ec4a0b70c0
efde7a140bc48e0e3e08404f41f6179c26858ce4
2022-12-08T19:23:44Z
c++
2023-03-07T17:40:40Z
closed
electron/electron
https://github.com/electron/electron
36,602
["BUILD.gn", "docs/api/tray.md", "filenames.gni", "shell/browser/ui/gtk/menu_gtk.cc", "shell/browser/ui/gtk/menu_gtk.h", "shell/browser/ui/status_icon_gtk.cc", "shell/browser/ui/status_icon_gtk.h", "shell/browser/ui/tray_icon_gtk.cc", "shell/browser/ui/tray_icon_linux.cc", "shell/browser/ui/tray_icon_linux.h"]
[Bug]: No Tray icon for Arch Linux
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.0 ### What operating system are you using? Other Linux ### Operating System Version Arch Linux, Manjaro ### What arch are you using? x64 ### Last Known Working Electron version 22.0.0 ### Expected Behavior Be able to use Electron [tray API](https://www.electronjs.org/docs/latest/api/tray) ### Actual Behavior I cannot have any Tray icon showing up since the last release of Electron 22.0.0. I believe we change the underlying implementation for Tray API with [this PR](https://github.com/electron/electron/pull/36333). With Electron <= 21, it worked fine Here's the info of OS we're using ``` $ uname -a Linux tower 6.0.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 02 Dec 2022 17:25:31 +0000 x86_64 GNU/Linux ``` or ``` $ uname -a Linux manjaro 5.15.60-1-MANJARO #1 SMP PREEMPT Thu Aug 11 13:14:05 UTC 2022 x86_64 GNU/Linux ``` I attached the minimum reproduction example here. Steps: - `yarn install` - then `yarn start` - cannot see the Tray icon - `yarn add --dev [email protected]` - `yarn start` again - then we see the Tray icon again (should be a T-shirt png) [electron-tray-22.zip](https://github.com/electron/electron/files/10175635/electron-tray-22.zip) ### Testcase Gist URL _No response_ ### Additional Information We don't experience this issue for Mac, Windows and Ubuntu
https://github.com/electron/electron/issues/36602
https://github.com/electron/electron/pull/36815
7d46d3ec9d5f30138777d1bd12890ebe28ba6c31
c303135b02fa5829459c816cd5bb75dd0e6e4aeb
2022-12-07T11:48:18Z
c++
2023-01-26T10:15:55Z
closed
electron/electron
https://github.com/electron/electron
36,597
["shell/common/api/electron_api_asar.cc"]
[Bug]: memory leak when a worker accesses a file in the asar archive package for the first time
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 17.0.0 ### What operating system are you using? Windows ### Operating System Version Windows 10 version 21H2 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior After a worker ends, the memory usage falls back to before the worker starts. ### Actual Behavior Each time a worker is created, the memory usage will be increased a little. Even if the worker is finished, the memory usage will not be reduced. ![!!!!!!!!!!!memoryLeak](https://user-images.githubusercontent.com/77262723/206097106-bfdefc76-fe3e-4c3a-b344-a742abdef4a5.jpg) ### Testcase Gist URL https://gist.github.com/xuwanghu/d61b511abf80aa691375cdfd30a8474e ### Additional Information The purpose of adding so many dependencies is to make the ASAR file large enough so that the memory leaks are more noticeable. **How to Reproduce:** it's on windows: 1. npm install 2. yarn dist 3. run the /dist/win-unpacked/test_leak_for_worker.exe 4. use the Performance Monitor to monitor its working set.
https://github.com/electron/electron/issues/36597
https://github.com/electron/electron/pull/36600
ab890fb8c3883ca60af514546245bf6a000686f1
f72e6551f093e7f9f02531c6a69f390521463bf8
2022-12-07T05:42:31Z
c++
2022-12-14T17:37:28Z
closed
electron/electron
https://github.com/electron/electron
36,548
["docs/api/net.md"]
[Bug]: Documentation for net.request doesn't clearly show constructor options
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.0 ### What operating system are you using? macOS ### Operating System Version 12.6.1 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior The documentation for net.request should include documentation of the options that the function takes: https://www.electronjs.org/docs/latest/api/net#netrequestoptions ### Actual Behavior Instead, that documentation exists at https://www.electronjs.org/docs/latest/api/client-request, which is not obvious from the net.request docs ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/36548
https://github.com/electron/electron/pull/36556
8acf6039e78725918af5797fad6fc4f7cf1e177c
e1e66fc8ac52af3f951404a647cb82a8389528c3
2022-12-04T21:18:48Z
c++
2022-12-05T23:17:37Z
closed
electron/electron
https://github.com/electron/electron
36,539
["shell/browser/browser.h", "shell/browser/browser_mac.mm", "shell/browser/electron_browser_main_parts.cc"]
[Bug]: settrafficLightPosition on macOS calculates incorrectly for RTL system languages
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.0 ### What operating system are you using? macOS ### Operating System Version macOS ventura 13.0.1 ### What arch are you using? x64 ### Last Known Working Electron version N/A ### Expected Behavior <img width="807" alt="‏لقطة الشاشة ٢٠٢٢-١٢-٠٢ في ٧ ٢٨ ٣٣ ص" src="https://user-images.githubusercontent.com/964386/205172660-1e95a7ac-cb60-4873-8a27-e93586547cb0.png"> ### Actual Behavior <img width="804" alt="‏لقطة الشاشة ٢٠٢٢-١٢-٠٢ في ٧ ٢٨ ٥٧ ص" src="https://user-images.githubusercontent.com/964386/205172682-87a89c5c-a178-4e25-b2a8-923d50f079c5.png"> ### Testcase Gist URL https://gist.github.com/deepak1556/3025154b48cb156126cfdcc74338ec8e ### Additional Information Set the system preferred language to any RTL language value and restart the OS. When system preferred language is in RTL and application language is set to `en`, the traffic light positions are calculated from outside the window frame positions.
https://github.com/electron/electron/issues/36539
https://github.com/electron/electron/pull/36839
168726a0521dd53f160b216f7b84832b1368fff5
414791232a79c783d3d758fe11a864344d513660
2022-12-01T22:33:43Z
c++
2023-01-10T11:19:00Z
closed
electron/electron
https://github.com/electron/electron
36,538
["lib/browser/api/web-contents.ts", "shell/browser/web_contents_preferences.cc", "spec/api-browser-window-spec.ts", "spec/guest-window-manager-spec.ts", "spec/lib/screen-helpers.ts"]
[Bug]: setWindowOpenHandler results in incorrect dark mode background color for text/plain content
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version Electron 21.3.1, 22.0.0, and the latest 24.0.0-nightly.20221201 ### What operating system are you using? macOS 13 and Windows 11 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version n/a ### Expected Behavior When the system is in dark mode, and a popup is opened via `window.open` to a URL returning content of type `text/plain`, the resulting popup window should have a black background with white text. This happens correctly unless `mainWindow.webContents.setWindowOpenHandler` is called. See https://www.loom.com/share/4af414156762410e994b5e2a56d997c7 for the correct behavior when `mainWindow.webContents.setWindowOpenHandler` is commented out. ![image](https://user-images.githubusercontent.com/776117/205159936-c9a7719a-8bad-47e7-84f4-9af693eb08ee.png) ### Actual Behavior With the call to `mainWindow.webContents.setWindowOpenHandler` uncommented, the popup window incorrectly has white text with a white background. See https://www.loom.com/share/15aadf785f3740c5b8f07239ea1e46ed for the actual behavior. ![image](https://user-images.githubusercontent.com/776117/205159884-fa522568-c10d-4f71-a878-98c3d08b0265.png) ### Testcase Gist URL https://gist.github.com/36925a2377d0b8c7c67abd9816c2f411
https://github.com/electron/electron/issues/36538
https://github.com/electron/electron/pull/36914
d95f9d2c636775946717a95fefee1ada51524a79
a26343f3e084028b920a7ea44e6b221350e3546c
2022-12-01T21:08:20Z
c++
2023-05-02T21:44:34Z
closed
electron/electron
https://github.com/electron/electron
36,417
["shell/browser/api/electron_api_web_contents.cc"]
[Bug]: webview tag background color do not follow browser window when reload webview
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 21.2.0 ### What operating system are you using? macOS ### Operating System Version macOS Big Sur 11.4 ### What arch are you using? x64 ### Last Known Working Electron version 11.4.5 ### Expected Behavior Recently, we upgraded our electron version from 11.4.5 to 21.2.0 and met a problem. The final problem I located is that webview's background color do not follow browser window when reload webview. So it caused from white -> red instead of browser windows' bg color -> red in my demo. ![CleanShot 2022-11-21 at 21 07 47](https://user-images.githubusercontent.com/24316656/203063068-74f6b80e-7cc3-40e0-bf3c-63393c12c53f.gif) ### Actual Behavior ![CleanShot 2022-11-21 at 21 10 09](https://user-images.githubusercontent.com/24316656/203063733-b30f0c30-a2a4-4b7c-b368-7d1f082d1b5e.gif) ### Testcase Gist URL https://gist.github.com/PerfectPan/100900b7758293b8f72b23d0babdb1cc ### Additional Information In our situation, we use webview to load chrome devtools frontend. This app styles background color asynchronous, so we met this problem. A hack way maybe we modify the inspect.html to hardcode our background color in it. But we want to know if there are any other way to solve this.
https://github.com/electron/electron/issues/36417
https://github.com/electron/electron/pull/36920
1d98b27a6643d6b6cbc4d9d426d6d5acc4b45e2a
b1548c2dbefdcd8f823c18175715fc5d34b09781
2022-11-21T13:15:40Z
c++
2023-01-18T13:46:47Z
closed
electron/electron
https://github.com/electron/electron
36,331
["shell/browser/electron_browser_context.cc", "spec/api-media-handler-spec.ts"]
[Bug]: No BrowserCaptureMediaStreamTrack being returned when using preferCurrentTab
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 22.0.0-beta.4 ### What operating system are you using? Windows ### Operating System Version Windows 11 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior Looking at the tests written here https://github.com/electron/electron/pull/30702/files#diff-cc0dd3c6f0140615357588553aaf9e9f95e6132498626a5d788d8e297d98eee9 I have decided to try to use the Chromium 104+ feature for region capture. While the api appears to work, I cannot get the api call to return the expected BrowserCaptureMediaStreamTrack, instead the usual MediaStreamTrack is returned. This causes the ability to use cropTo from the track to fail since it doesnt exist in MediaStreamTrack. Given that this is still a beta, is this a known issue or do I need to do something different? ### Actual Behavior I would expect a BrowserCaptureMediaStreamTrack to be returned and track.cropTo(cropTarget) to work as expected, allowing me to share a region of the window/screen selected ### Testcase Gist URL https://gist.github.com/e277f244fcf0402152466a0fddc9720a ### Additional Information This code works fine when using it against Chrome
https://github.com/electron/electron/issues/36331
https://github.com/electron/electron/pull/39074
e1d63794e5ce74006188ed2b7f1c35b5793caf36
2481f94b4efe262c9ae2f5f16cd0845eeb6c4efd
2022-11-14T11:05:51Z
c++
2023-08-23T08:49:24Z
closed
electron/electron
https://github.com/electron/electron
36,309
[".circleci/config/base.yml", "appveyor.yml"]
[Bug]: mksnapshot args shipped with v21 doen't work properly
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 21.2.2 ### What operating system are you using? macOS ### Operating System Version 13 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version 20.3.4 ### Expected Behavior Running mksnapshot works normally. ### Actual Behavior It fails. It succeeds if I remove ``` --turbo-profiling-input ../../v8/tools/builtins-pgo/arm64.profile ``` from the `mksnapshot_args` file. I'm not able to find this `arm64.profile` file anywhere to try and build with it being present. (the path mentioned is two levels up, so I'm guessing it is somehow missed while creating the zip and relative path ends up here) ### Testcase Gist URL _No response_ ### Additional Information Contents of the mksnapshot_args file across recent versions ![Screenshot 2022-11-10 at 20 26 02](https://user-images.githubusercontent.com/16598275/201139071-2178ce68-160a-4d64-8fa0-f37bf2350302.png) Note: I'm running mksnapshot via electron-mksnapshot
https://github.com/electron/electron/issues/36309
https://github.com/electron/electron/pull/36378
4f1f263a9a98abb1c4e265c1d19e281312adf5b2
7529ebfe0e20ff0456aaab29c22346e35cf074ce
2022-11-10T15:38:05Z
c++
2022-11-17T22:49:12Z
closed
electron/electron
https://github.com/electron/electron
36,282
["script/node-disabled-tests.json", "shell/app/node_main.cc", "shell/browser/javascript_environment.cc", "shell/browser/javascript_environment.h"]
Enable `WebAssembly.{compileStreaming|instantiateStreaming}` in Node.js
Refs https://github.com/electron/electron/pull/35999. Refs https://github.com/nodejs/node/pull/42701. Node.js added support for `WebAssembly.compileStreaming` and `WebAssembly.instantiateStreaming` but they don't work within Electron at the moment. This is happening because Node.js' logic for enabling them [here](https://github.com/nodejs/node/pull/42701/files#diff-5f2fc380364ef43210af4a28c08f9a0c7ec5f85e3ec1f5c1df5e0204eb9dc721R261) is called via `node::SetIsolateUpForNode`, which by necessity can only be called on an existing isolate. However, the switch to enable it [here](https://source.chromium.org/chromium/chromium/src/+/main:v8/src/wasm/wasm-js.cc;l=2983-2988?q=wasm_streaming_callback&ss=chromium%2Fchromium%2Fsrc) is called by gin during [its own isolate initialization](https://github.com/electron/electron/blob/f2c341b655406434b5a44bc8b1e2418d664c319b/shell/app/node_main.cc#L162), which means that it ends up being undefined. Look into a good way to fix this.
https://github.com/electron/electron/issues/36282
https://github.com/electron/electron/pull/36420
909ee0ed6bbdf57ebaeda027b67a3a44185f6f7d
b90a5baa6dc7f745bf8779dd79d51229a3f8593d
2022-11-08T10:43:02Z
c++
2022-12-05T17:07:49Z
closed
electron/electron
https://github.com/electron/electron
36,030
["filenames.gni", "patches/node/.patches", "patches/node/enable_crashpad_linux_node_processes.patch", "shell/app/node_main.cc", "shell/common/api/crashpad_support.cc", "shell/common/node_bindings.cc", "spec/api-crash-reporter-spec.ts", "spec/fixtures/apps/crash/fork.js", "spec/fixtures/apps/crash/main.js", "spec/fixtures/apps/crash/node-extra-args.js"]
Enable crashpad support on linux for ELECTRON_RUN_AS_NODE processes
Refs https://github.com/electron/electron/pull/35900/commits/b10f24386cb37d736b10f4831235eedcf1f0db4b Node.js forked child processes have been relying on breakpad for crash report generation, with https://chromium-review.googlesource.com/c/chromium/src/+/3764621 Linux has moved onto crashpad completely. For these processes to act as crashpad clients, they need the following * Inherit FD for the handler process communication, which is usually inherited by the chromium spawned child processes via `ElectronBrowserClient::GetAdditionalMappedFilesForChildProcess`. For Node.js the fork is performed by Libuv, we should pass it via stdio option of child_process.fork. The descriptor will eventually be looked up in [PlatformCrashpadInitialization](https://source.chromium.org/chromium/chromium/src/+/main:components/crash/core/app/crashpad_linux.cc;l=197). Also we will need to setup `base::GlobalDescriptors` instance in the child process. * Pass the PID of the handler process to the child process via the command line flag `--crashpad-handler-pid/crash_reporter::switches::kCrashpadHandlerPid` whose value can be extracted with the same API to obtain the FD [crash_reporter::GetHandlerSocket](https://source.chromium.org/chromium/chromium/src/+/main:components/crash/core/app/crashpad.h;l=236).
https://github.com/electron/electron/issues/36030
https://github.com/electron/electron/pull/36460
16a7bd71024789fcabb9362888ee4638852b1eb1
2c723d7e84dfab5ad97fc0927426a0b2cd7a15b5
2022-10-14T11:57:59Z
c++
2022-11-29T15:33:54Z
closed
electron/electron
https://github.com/electron/electron
35,996
["patches/chromium/printing.patch"]
[Bug]: Errors about silent printing
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.17 ### What operating system are you using? Windows ### Operating System Version Windows 10 Pro 21H2 ### What arch are you using? x64 ### Last Known Working Electron version 18.3.15 ### Expected Behavior I want to use contents.print ({silent: true}) to execute the print task only once ### Actual Behavior Use contents.Print({silent: true}) will be executed twice. Use the following code to monitor the actual printing times. ```js window. onbeforeprint = (event) => { console. log('before print'); }; window. onafterprint = (event) => { console. log('After print'); }; ``` This phenomenon will appear in 19 and later versions. ### Testcase Gist URL https://gist.github.com/feddc9ddf37da270efc034d6ff6431b9 ### Additional Information _No response_
https://github.com/electron/electron/issues/35996
https://github.com/electron/electron/pull/38741
d78f37ec8faae9a3677037e1b40baea81fc93b6c
46fb0d8f5f3a33c5b9bba2329ac5de946cd66a3c
2022-10-12T04:43:34Z
c++
2023-06-15T14:46:38Z
closed
electron/electron
https://github.com/electron/electron
35,994
["shell/browser/native_browser_view_mac.mm", "spec/api-browser-view-spec.ts"]
[Bug]: BrowserView setBounds behavior inconsistent between Mac and Windows
```js bv.setBounds({x: 0, y: 0, width: 500, height: 40}) ``` gives different results on different platforms: mac: ![Screen Shot 2022-10-11 at 4 09 38 PM](https://user-images.githubusercontent.com/172800/195215145-2da82eed-c502-4d2d-8a9b-409a6a5e1192.png) windows: ![image](https://user-images.githubusercontent.com/172800/195215162-b5658cf4-5448-4414-bc8d-8b2e2506debb.png) Regressed in #34713 I believe. cc @codebytere
https://github.com/electron/electron/issues/35994
https://github.com/electron/electron/pull/38981
ec4c9024b9795d360fbd96b09684fdb228966781
5a77c75753f560bbc4fe6560441ba88433a561f8
2022-10-11T23:15:30Z
c++
2023-07-06T07:50:08Z
closed
electron/electron
https://github.com/electron/electron
35,971
["lib/browser/api/web-contents.ts", "shell/browser/api/electron_api_web_contents.cc"]
[Bug]: Some options of printToPDF don't work
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 21.1.0 ### What operating system are you using? macOS ### Operating System Version macOS Catalina 10.15.7 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior Some options of `webContents.printToPDF` don't be ignored. The options are: - `margins` (`top`, `bottom`, `left`, `right` and `marginType`) - `pageSize` - `scale` For example: When I choose a margin top, like 2" and call `printToPDF`, the PDF should come with margin top with 2" ### Actual Behavior I defined options, but they don't work. Am I doing something wrong, maybe using incorrect? ### Testcase Gist URL https://gist.github.com/lesleyandreza/7699603b20f2459d1fcf3b9480fb22e1 ### Additional Information The options `headerTemplate` and `footerTemplate` works, but in a strange way, because the text comes really small. Maybe this could be a Chromium bug. <img width="1404" alt="very-small-header" src="https://user-images.githubusercontent.com/14945792/194948569-26c8639a-abe8-4a82-b8ee-1e00e1d38192.png"> But there is a workaround with CSS: <img width="1400" alt="normal-header" src="https://user-images.githubusercontent.com/14945792/194948843-1ad0fd55-d881-4037-abe0-3801fe44fc29.png">
https://github.com/electron/electron/issues/35971
https://github.com/electron/electron/pull/35975
0759f3320e905dd7e19c05b038204211dee26e39
ee7cf5a6d40096a887166cfe714cd6de79052b64
2022-10-10T21:33:40Z
c++
2022-10-11T23:06:34Z
closed
electron/electron
https://github.com/electron/electron
35,967
["default_app/main.ts"]
[Bug]: V8 flags and desktop name in package.json does not hornored when running local app using electron cli
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.3 ### What operating system are you using? Other Linux ### Operating System Version Linux pc 5.19.13-arch1-1.1 #1 SMP PREEMPT_DYNAMIC Wed, 05 Oct 2022 07:37:04 +0000 x86_64 GNU/Linux ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior Launch local app by `electron /path/to/app/dir` , then `/path/to/app/dir/package.json` data (`productName`, `version`, `desktopName`, etc.) is loaded. ### Actual Behavior ~~Electron's default values are used.~~ **Edit**: Name and version are correctly updated. https://github.com/electron/electron/blob/c2cb97ea298412143e34027fac2c28fd031e169a/default_app/main.ts#L99-L106 It looks like `desktopName` and `v8Flags` should be considered too. ref:https://github.com/electron/electron/blob/c2cb97ea298412143e34027fac2c28fd031e169a/lib/browser/init.ts#L107-L130 ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/35967
https://github.com/electron/electron/pull/35997
76880be6d2cc466a44cf437bf34bf32f94a9f6ad
295c5331eeb2cce40419b6a54875fba88d61422d
2022-10-10T17:10:11Z
c++
2022-10-17T08:34:24Z
closed
electron/electron
https://github.com/electron/electron
35,916
["shell/app/electron_main_delegate.cc", "shell/app/electron_main_delegate.h"]
[Bug]: The global content client will init twice on the startup
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19 ### What operating system are you using? Other (specify below) ### Operating System Version macOS ### What arch are you using? Other (specify below) ### Last Known Working Electron version _No response_ ### Expected Behavior The global content client should init once on startup. ### Actual Behavior The global content client will init twice on the startup and it cause a memory leak.causes. ### Testcase Gist URL _No response_ ### Additional Information These days I try to debug the electron source and found that the global content client will init twice on startup because the ElectronMainDelegate didn't override the CreateContentClient. The first time, it call the `ContentMainDelegate::CreateContentClient` to create an ContentClient instance. ``` void SetContentClient(ContentClient* client) { /* if(g_client != nullptr) { DCHECK(false); } */ g_client = client; } //ContentClientCreator::Create static void Create(ContentMainDelegate* delegate) { ContentClient* client = delegate->CreateContentClient(); DCHECK(client); SetContentClient(client); } ``` ![image](https://user-images.githubusercontent.com/34939113/194010305-cd932f47-30a2-46ac-8d7d-4d622d3e6fb1.png) Then the global ContentClient will be set as an ElectronContentClient instance in `ElectronMainDelegate::BasicStartupComplete` ![image](https://user-images.githubusercontent.com/34939113/194011232-6061b984-486a-4bbd-ae2c-1629910c5eac.png) So the first one is never to be used and never to be free until the process exit.
https://github.com/electron/electron/issues/35916
https://github.com/electron/electron/pull/35932
ef00a2a1dade1e76be39d77e236d2926ddcc9a80
ebb866e63d90fc44168f2b9c97ea2378d4c17831
2022-10-05T08:26:58Z
c++
2022-10-10T14:48:44Z
closed
electron/electron
https://github.com/electron/electron
35,877
["script/sysroots.json"]
fix arm linux glibc dependency
https://github.com/electron/electron/pull/34491 will reoccur in 22 unless we fix it, see https://bugs.chromium.org/p/chromium/issues/detail?id=1309965#c5
https://github.com/electron/electron/issues/35877
https://github.com/electron/electron/pull/36247
0ba0df45232d0c1c4542d6647a862305aff28bb4
2008c9a5d0be0c169e8016dac8a90744c504c3f7
2022-10-03T19:34:44Z
c++
2022-11-07T14:38:08Z
closed
electron/electron
https://github.com/electron/electron
35,807
["shell/browser/native_window_views.cc", "shell/browser/native_window_views.h", "spec/api-browser-window-spec.ts"]
[Bug]: Menu Bar Visibility
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.0 ### What operating system are you using? Other Linux ### Operating System Version Fedora 36 ### What arch are you using? x64 ### Last Known Working Electron version 19.0.0 ### Expected Behavior If I specify: ```js win.setMenuBarVisibility(false); ``` then menu bar will be hidden which is great. But if you spam F11 key, menu bar will become visible again. ### Actual Behavior If I specify: ```js win.setMenuBarVisibility(false); ``` Menu bar shouldn't be visible even while spamming F11. ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/35807
https://github.com/electron/electron/pull/38599
5ee890fb6f7c6acbcfd8e6e765334e6f9aa61850
c8bdd014c87b5c33b77c845f853b7e52bb31de8f
2022-09-25T15:23:42Z
c++
2023-06-08T10:19:34Z
closed
electron/electron
https://github.com/electron/electron
35,724
["patches/chromium/.patches", "patches/chromium/revert_x11_keep_windowcache_alive_for_a_time_interval.patch", "spec/api-menu-spec.ts"]
[Bug]: After resize the window manually, clicking the menu does not show submenus
### Preflight Checklist - [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.1.4 ### What operating system are you using? Other Linux ### Operating System Version Manjaro Linux 22.0.0 ### What arch are you using? x64 ### Last Known Working Electron version `v19.0.0-alpha.3` ### Expected Behavior After resize the window manually, clicking the menu should show submenus ### Actual Behavior After resize the window manually, clicking the menu does not show submenus, both gnome and kde, manjaro and ubuntu ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/35724
https://github.com/electron/electron/pull/37798
69586684484c05a0078e3b916239186a5c3d749a
3c0c4d5c278e575691f9376483dc4f60a287c467
2022-09-19T09:46:03Z
c++
2023-04-11T06:17:45Z
closed
electron/electron
https://github.com/electron/electron
35,715
["shell/browser/api/electron_api_web_contents.cc"]
[Feature Request]: Allow for opening docked DevTools, even if WCO is enabled
### Preflight Checklist - [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success. ### Problem Description #35209 has introduced a change that forces a `'detach'` state for DevTools, if they are opened on a WC in a window with the Window Controls Overlay enabled. However, this is not always a desired behavior, especially if DevTools are an integral part of your application. I must emphasize, the detached state is not a default, but *forced*, which means you cannot override this even with ```js webContents.openDevTools({ mode: 'bottom' }) // ignores the mode ``` ### Proposed Solution While the `'detach'` by default is good for solving the problem of WCO covering the devtools, there should be an option to override this. For example, `wc.openDevTools()` will open them in the detached state, but `wc.openDevTools({ mode: 'bottom' })` should respect the `mode` property. Perhaps, this should work just like it works with the `<webview>` tags, when if you explicitly pass an empty mode, it will open the DevTools in the last docked state. ### Alternatives Considered None. Disabling WCO isn't a good enough option. ### Additional Information _No response_
https://github.com/electron/electron/issues/35715
https://github.com/electron/electron/pull/35754
4ffdd284c398d3e18a71f636422eaa0cf28406da
eb3262cd87f1602cea651f89166b0da0f2ee6e14
2022-09-18T00:23:12Z
c++
2022-09-22T08:44:27Z
closed
electron/electron
https://github.com/electron/electron
35,709
[".github/workflows/scorecards.yml"]
Enable the OpenSSF Scorecard Github Action and Badge
Hi, I am Joyce and I'm working on behalf of Google and the [OpenSSF][ossf] to help essential open-source projects improve their supply-chain security. The OpenSSF is a non-profit foundation backed by the Linux Foundation, dedicated to improving the security of the open-source community. It counts GitHub as a founding [member][ossf-membership]. The [Scorecard][sc] system combines dozens of automated checks to let maintainers better understand their project's supply-chain security posture. It is developed by the OpenSSF, with [direct support from GitHub][sc-blog]. Considering that the Electron Framework is widely used on cross-platform applications using HTML, CSS and JavaScript, it's been included in the OpenSSF's list of the 100 most critical open-source projects. Thus, the Scorecard Github Action could help you to track and solve security risks involving your repository/project and this way garantee that your repository and the contribution process is safe from malicious sabotage. However, the OpenSSF has also developed the [Scorecard GitHub Action][sc-gha], which adds the results of its checks to the project's [security dashboard](https://github.com/electron/electron/security), as well as suggestions on how to solve any issues (see examples below). This Action has been adopted by 1600+ projects already. Would you be interested in a PR which adds this Action? Optionally, it can also publish your results to the OpenSSF REST API, which allows a [badge][badge] with the project's score to be added to its README. Please, feel free to reach me out in case of any doubt or concern and thanks for the attention on this issue. ![Code scanning dashboard with multiple alerts, including Code-Review and Token-Permissions][img-security] ![Detail of a Token-Permissions alert, indicating the specific file and remediation steps][img-detail] [badge]: https://openssf.org/blog/2022/09/08/show-off-your-security-score-announcing-scorecards-badges/ [ossf]: https://openssf.org/ [ossf-membership]: https://openssf.org/about/members/ [sc]: https://github.com/ossf/scorecard [sc-blog]: https://github.blog/2022-01-19-reducing-security-risk-oss-actions-opensff-scorecards-v4/ [sc-gha]: https://github.com/ossf/scorecard-action [img-security]: https://user-images.githubusercontent.com/15221358/190184391-84ca1844-259a-4b3b-9c86-74adadbea7f1.png [img-detail]: https://user-images.githubusercontent.com/15221358/190184600-ee8d3b39-077e-416a-8711-1b5fb01cf0b3.png
https://github.com/electron/electron/issues/35709
https://github.com/electron/electron/pull/35741
a9ef68f12676fd76998ac9e15c0b10a3b6cd4daf
05577d0903e18df1d431625376ac8b99aa28f209
2022-09-16T16:42:08Z
c++
2022-11-15T00:22:10Z
closed
electron/electron
https://github.com/electron/electron
35,594
["shell/browser/electron_download_manager_delegate.cc"]
[Bug]: File extension appended multiple times to file name when saving
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.1.1 All latest 18.x.y, 19.x.y and 20.x.y versions are affected. ### What operating system are you using? Windows ### Operating System Version Windows 10 Version 20H2 ### What arch are you using? x64 ### Last Known Working Electron version 19.0.7 ### Expected Behavior When saving/downloading a file, file name should be saved with the given file extension. ### Actual Behavior File extension is appended three times to file name with double dots, like: <file_name>.<file_extension>..<file_extension>..<file_extension> Issue happens for file extensions which are not in registry. For file types which are in registry, file name is fine. ### Testcase Gist URL https://gist.github.com/dfa6a6e75b43e475f285df9e0f743650 ### Additional Information Most likely related to the change https://github.com/electron/electron/pull/34723
https://github.com/electron/electron/issues/35594
https://github.com/electron/electron/pull/35618
9f97c3e50a11b364f02f57209854bb4000ac1136
12a7d7eea52409ce02af6d5f51f8208f483f24d2
2022-09-07T14:47:00Z
c++
2022-09-13T18:47:04Z
closed
electron/electron
https://github.com/electron/electron
35,512
["docs/tutorial/performance.md"]
[Bug]: electron should not set a default menu
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.x ### What operating system are you using? Windows ### Operating System Version Windows 11 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior An application should be in full control of the menu and thus the following code is taking startup CPU cycles when not needed: https://github.com/electron/electron/blob/bfced8cbfe6bad6d119ea9276d13aa67accc9c9a/lib/browser/init.ts#L177 At the very minimum allow an option to disable this when the application sets a menu anyway. ### Actual Behavior Electron seems to install a default menu which consumes time for no good reasons it seems: <img width="364" alt="image" src="https://user-images.githubusercontent.com/900690/187595296-0380cf75-2b92-4c69-be7c-0172124a66e7.png"> ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/35512
https://github.com/electron/electron/pull/35525
b3a744db8a1aa85f27f4467ae2eb1a8c2eff0233
6ec4c7e563c4bf59abb684e593bc6c0e0ee921c6
2022-08-31T04:51:53Z
c++
2022-09-12T22:29:42Z
closed
electron/electron
https://github.com/electron/electron
35,508
["docs/api/session.md", "shell/browser/api/electron_api_session.cc", "spec/spellchecker-spec.ts"]
[Bug]: Spellcheck API can cause errors in macOS applications despite supposedly being a "no-op" on macOS
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.10 ### What operating system are you using? macOS ### Operating System Version macOS Monterey 12.5.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior The `setSpellCheckerLanguages` method should have no effect when invoked on macOS, other than possibly generating a warning that this API is not supported on macOS. ### Actual Behavior On macOS, invoking `ses.setSpellCheckerLanguages` with a language array containing one or more unsupported languages causes an error which can prevent the app from rendering. ("Unsupported languages" here means languages not supported by the Electron spellcheck API, which is not actually used on macOS.) This issue is further complicated by the fact that the `ses.getSpellCheckerLanguages` method returns the actual locale(s) that the macOS spellcheck API is checking against, regardless of whether the Electron spellcheck API supports those locales. As such, even something as seemingly innocuous as setting the spellcheck languages to the current spellcheck languages, which should be a no-op on any platform, can cause errors on macOS. ### Testcase Gist URL https://gist.github.com/71ad54ff04a1a5b8f1a3ceed905683a0 ### Additional Information The [Electron docs](https://www.electronjs.org/docs/latest/api/session#sessetspellcheckerlanguageslanguages) state the following: > Note: On macOS the OS spellchecker is used and will detect your language automatically. This API is a no-op on macOS. This issue can only be reproduced on a macOS device where the current system locale is one that the Electron spellcheck API does not support. For English-speaking users, you can accomplish this by setting your region to "India" in the "Language & Region" settings menu.
https://github.com/electron/electron/issues/35508
https://github.com/electron/electron/pull/35514
bf20aabb9ee7985d966ae6cb2e92f635a8d85a6f
38a7da692aaae01dae97e96b7a5eb648765efe33
2022-08-30T21:52:21Z
c++
2022-09-14T22:10:16Z
closed
electron/electron
https://github.com/electron/electron
35,471
["shell/browser/api/electron_api_screen.cc", "shell/browser/api/electron_api_screen.h"]
[Bug]: Segfault when calling `screen.getCursorScreenPoint()` under Wayland
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version v20.0.3 and v22.0.0-nightly.20220824 ### What operating system are you using? Other Linux, and Sway WM (1.7) ### Operating System Version ArchLinux, kernel 5.19.3 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior Should provide a Point to the cursor position and not segfault. ### Actual Behavior Get a segmentation fault when calling `screen.getCursorScreenPoint();` under Wayland (sway 1.7). ### Testcase Gist URL https://gist.github.com/weedz/b8002775cd1a23c46d38b5f10de957e4 ### Additional Information Works fine under Xwayland. But will crash when launched with `--ozone-platform-hint=wayland`. Tested every version down to electron@16 (with `--enable-features=UseOzonePlatform --ozone-platform=wayland`: - Electron@16: "interface 'wl_output' has no event 4" and no window or other errors. - Electron v17-v22.0.0-nightly.20220824: "electron exited with signal SIGSEGV"
https://github.com/electron/electron/issues/35471
https://github.com/electron/electron/pull/35503
98c0fa1c8b4759eff243807b625094d5ef2840a8
2db0f7f8d44be93190323a94c4a1fc255251bfa5
2022-08-26T21:19:42Z
c++
2022-09-05T08:10:50Z
closed
electron/electron
https://github.com/electron/electron
35,462
["patches/chromium/.patches", "patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch", "spec/api-protocol-spec.ts", "spec/fixtures/pages/iframe-protocol.html"]
[Bug]: Electron crashes when loading <iframe> from custom URL protocol
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.1.0 ### What operating system are you using? Windows ### Operating System Version Windows 10 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior I want to load an iframe from a custom:// url protocol inside my main window. `<iframe src="custom://test.html">` ### Actual Behavior Application crashes when using custom:// url protocol. The protocol is registered with `protocol.registerFileProtocol()`. When loading the exact same file with the file:// protocol, everything is OK. ### Testcase Gist URL https://gist.github.com/75a34a8f7177e616146a8e5f1f4edddc ### Additional Information The same issue hase also been observed on Ubuntu 20.04
https://github.com/electron/electron/issues/35462
https://github.com/electron/electron/pull/35485
bfced8cbfe6bad6d119ea9276d13aa67accc9c9a
e0fb5cbe1fd84d9651e6030ebab683dd9e4af42d
2022-08-25T18:21:15Z
c++
2022-08-31T08:08:11Z
closed
electron/electron
https://github.com/electron/electron
35,442
["patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch", "shell/common/node_bindings.cc"]
[Bug]: Upgrading to 19.0.13 break webpack hot reloading
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] #35489 ### Electron Version 19.0.13 ### What operating system are you using? macOS ### Operating System Version Monterey ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version 19.0.12 ### Expected Behavior After upgrading to `19.0.13` webpack dev server reloading breaks. <img width="486" alt="CleanShot 2022-08-24 at 23 45 20@2x" src="https://user-images.githubusercontent.com/1192452/186594068-a984939d-dce8-4534-8dd0-634472275e60.png"> ### Actual Behavior The render process does not crash ### Testcase Gist URL _No response_ ### Additional Information Not sure how to capture the crash log but happy to provide it with some instructions!.
https://github.com/electron/electron/issues/35442
https://github.com/electron/electron/pull/35422
2f23bdb19ea76029907ae247cc8eb47114df1d0c
18475818486be806e891e8e6cb13b83c620ec0aa
2022-08-25T06:46:37Z
c++
2022-08-29T13:45:48Z
closed
electron/electron
https://github.com/electron/electron
35,429
["shell/browser/electron_download_manager_delegate.cc"]
[Bug]: When downloading a file using the video tag, an extra character dot appears when saving the file!
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.3 ### What operating system are you using? Windows ### Operating System Version Windows 11 ### What arch are you using? x64 ### Last Known Working Electron version 19.0.6 ### Expected Behavior ### When the video tag was used to download files, the save type was normal. ### Actual Behavior ## When downloading a file using the video tag, an extra character dot appears when saving the file! It has two character dot in the file type. ![image](https://user-images.githubusercontent.com/41336612/186472381-b42fe64d-6631-4def-88bd-48d10591cbd4.png) ![image](https://user-images.githubusercontent.com/41336612/186471193-e2558aaf-4e7c-4a51-8fca-e3db0f9731df.png) ### Testcase Gist URL https://gist.github.com/liulinboyi/2e687fbf07f0d9c836933817046ea043 ### Additional Information ### I have a feeling that this bug exists from version 20.
https://github.com/electron/electron/issues/35429
https://github.com/electron/electron/pull/35618
9f97c3e50a11b364f02f57209854bb4000ac1136
12a7d7eea52409ce02af6d5f51f8208f483f24d2
2022-08-24T16:35:28Z
c++
2022-09-13T18:47:04Z
closed
electron/electron
https://github.com/electron/electron
35,403
["shell/browser/native_window_mac.mm", "shell/browser/ui/cocoa/electron_ns_window.h", "shell/browser/ui/cocoa/electron_ns_window.mm"]
[Bug]: macOS - Using frame, roundedCorners, and fullscreen settings together automatically causes a crash
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.3 ### What operating system are you using? macOS ### Operating System Version Catalina (confirmed on Big Sur too) ### What arch are you using? x64 ### Last Known Working Electron version Not working in version 17-21 ### Expected Behavior Code such as the following should not crash Electron: ``` win = new BrowserWindow({ title: "Media Window", frame: false, // These 3 options can't be roundedCorners: false, // used concurrently on macOS fullscreen: true // without causing a crash }); ``` ### Actual Behavior The following code crashes Electron on macOS: ``` win = new BrowserWindow({ title: "Media Window", frame: false, // These 3 options can't be roundedCorners: false, // used concurrently on macOS fullscreen: true // without causing a crash }); ``` Any of the following 3 variants does **not** cause the crash: ``` win = new BrowserWindow({ title: "Media Window", // frame: false, roundedCorners: false, fullscreen: true }); ``` ``` win = new BrowserWindow({ title: "Media Window", frame: false, // roundedCorners: false, fullscreen: true }); ``` ``` win = new BrowserWindow({ title: "Media Window", frame: false, roundedCorners: false, // fullscreen: true }); ``` ### Testcase Gist URL https://gist.github.com/sircharlo/c78e81a20c3eb4167037197b3803d76e ### Additional Information Error looks like this: Electron[785:12045] *** Assertion failure in -[ElectronNSWindow titlebarAccessoryViewControllers], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.60.100/AppKit.subproj/NSWindow.m:3337
https://github.com/electron/electron/issues/35403
https://github.com/electron/electron/pull/39747
2324c4d8fd6f7b2cd336d4e93591464544e12953
ab185c058f894ddc556f67b2853de4adad2bb10c
2022-08-22T15:16:24Z
c++
2023-09-11T07:38:10Z
closed
electron/electron
https://github.com/electron/electron
35,391
["shell/browser/api/electron_api_web_contents.cc", "shell/browser/api/electron_api_web_contents.h", "spec/chromium-spec.ts"]
[Bug]: sandboxed iframe can modify history of parent browsing context
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.3, same behavior going back to 17.0.0 ### What operating system are you using? macOS ### Operating System Version macOS 12.5.1 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version n/a ### Expected Behavior I expect that calling `history.back()` from a sandboxed iframe should do nothing, which is the behavior in Chrome 104.0.5112.101. ### Actual Behavior Create three .html files: page1.html: ``` <html> <body> Page 1 <a href="/page2.html">Go to Page 2</a> </body> </html> ``` page2.html: ``` <html> <body> Page 2 <iframe src="page_iframe.html" sandbox="allow-scripts"></iframe> </body> </html> ``` page_iframe.html: ``` <html> <body> <button onclick="history.back()">Go Back</button> </body> </html> ``` Serve them: ``` npx http-server . ``` Load page 1 in Electron: ``` mainWindow.loadURL('http://localhost:8080/page1.html') ``` and click the link to page2.html. Then click the `Go Back` button that is shown in the iframe on Page 2 and notice that the window is navigated back to page1.html. ### Testcase Gist URL https://gist.github.com/7d7b3f33d4a6283e9e3cc000da2ab6f9 ### Additional Information This was previously reported in https://github.com/electron/electron/issues/3734 and https://github.com/electron/electron/issues/21680 but not with a reproducible case.
https://github.com/electron/electron/issues/35391
https://github.com/electron/electron/pull/35420
b0036ea43afda71e33c1450a0dc2c96c1f8f4ce4
730d9181b3de8561c1d87d82ccb923b1859122ae
2022-08-20T01:02:16Z
c++
2022-09-09T00:08:56Z
closed
electron/electron
https://github.com/electron/electron
35,389
["patches/chromium/.patches", "patches/chromium/fix_revert_emulationhandler_update_functions_to_early_return.patch", "spec/api-web-contents-spec.ts"]
[Bug]: using debugger's Emulation.setDeviceMetricsOverride and changing origins(?) crashes Electron 21
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 21.0.0-alpha.1 ### What operating system are you using? Ubuntu ### Operating System Version Ubuntu 20.04 ### What arch are you using? x64 ### Last Known Working Electron version 20.0.3 ### Expected Behavior When setDeviceMetricsOverride is active and a different URL is loaded, the application does not crash ### Actual Behavior Electron crashes with a SIGSEGV, in all current Electron 21 alpha versions (1 through 4) ### Testcase Gist URL https://gist.github.com/25c3fea282cc3a95af280ed1db54ab3d ### Additional Information Run the application with Electron 21 and Electron 20. Click one of the buttons below the webview to change the URL - On Electron 21, the app now crashes - On Electron 20, the new URL is loaded On Electron 21, when showing the electron site, you can navigate to a few other pages like docs, releases and apps. Going to Blog crashes the app. Blog is still the same origin so that's why the "(?)" is in the title. Comment out these lines to prevent Electron 21 from crashing: https://gist.github.com/Kilian/25c3fea282cc3a95af280ed1db54ab3d#file-renderer-js-L18-L21
https://github.com/electron/electron/issues/35389
https://github.com/electron/electron/pull/35466
f6bbad287a7b15a760a018b85a3bb667d384e3c0
4744674e933ebbd294878b60c93732500fd4217a
2022-08-19T17:56:47Z
c++
2022-08-29T12:53:24Z
closed
electron/electron
https://github.com/electron/electron
35,384
["patches/node/feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch", "shell/common/node_bindings.cc"]
[Bug]: Mac crash on WebWorker destructor
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.3 ### What operating system are you using? macOS ### Operating System Version 12.3 ### What arch are you using? x64 ### Last Known Working Electron version 20.0.2 ### Expected Behavior When destructing WebWorkers, it should not crash ### Actual Behavior When destructing a WebWorker that uses WebAssembly, it crashes the v8 context. ### Testcase Gist URL _No response_ ### Additional Information It seems linked to the recent change to the "stop_and_close_uv_loop" change, seen here: #35322 If I revert that single change, it does not crash. Attached is a minidump [minidump.zip](https://github.com/electron/electron/files/9382529/e9384a04-0947-4e26-b452-c85e84309bf9.zip)
https://github.com/electron/electron/issues/35384
https://github.com/electron/electron/pull/35422
2f23bdb19ea76029907ae247cc8eb47114df1d0c
18475818486be806e891e8e6cb13b83c620ec0aa
2022-08-19T13:30:36Z
c++
2022-08-29T13:45:48Z
closed
electron/electron
https://github.com/electron/electron
35,312
["shell/browser/ui/views/win_caption_button_container.cc", "shell/browser/ui/views/win_frame_view.cc"]
[Bug]: WCO separator colour incorrect in v20
Alright, I guess I wasn't running it in the right electron version, but with fiddle it also is off-center. This issue doesn't appear in v20.0.0, but in v20, the WCO just looks weird. Maybe that bug occurs only with some specific settings, I'll look into it later. This is what I mean by "weird": ![screenshot](https://user-images.githubusercontent.com/90904039/182640528-d0d5e3fa-3180-4254-8cd7-4e67a699ea64.png) ![screenshot](https://user-images.githubusercontent.com/90904039/182640532-2054adeb-9596-4990-8c04-c1ff15535ee7.png) _Originally posted by @wheezard in https://github.com/electron/electron/issues/35038#issuecomment-1204061897_
https://github.com/electron/electron/issues/35312
https://github.com/electron/electron/pull/35569
17d501616368e2a0c709cbc2174de38e1781e8c3
4fb4167b8b42276710b658a3c62f0ebe9fffe446
2022-08-11T16:12:49Z
c++
2022-09-08T13:11:51Z
closed
electron/electron
https://github.com/electron/electron
35,304
["patches/chromium/.patches", "patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch", "patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch", "patches/chromium/webview_fullscreen.patch"]
[Bug]: Unable to exit pdf present mode in WebView
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.4 ### What operating system are you using? Windows ### Operating System Version Windows 10 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior Should be able to exit pdf present mode, in Chrome it is possible to exit present mode by pressing Esc. ### Actual Behavior Unable to exit pdf present mode once it is selected. The Esc key only affects the windows full-screen mode, but the pdf view is unchanged. ![image](https://user-images.githubusercontent.com/111048903/184098506-5b1b63b6-c0ba-44ae-be74-e4a6bdafeb39.png) ### Testcase Gist URL https://gist.github.com/4868233713a4119d96c9273494157843 ### Additional Information _No response_
https://github.com/electron/electron/issues/35304
https://github.com/electron/electron/pull/39616
3bdc7ce64a79120c4001d0c614e4ad037246229e
d42a94dddeb86d349c050c2ee59b135bd6c8245c
2022-08-11T09:03:54Z
c++
2023-08-25T18:11:58Z
closed
electron/electron
https://github.com/electron/electron
35,282
["shell/browser/serial/electron_serial_delegate.cc", "shell/browser/serial/serial_chooser_context.cc", "shell/browser/serial/serial_chooser_context.h"]
[Bug]: WebSerial - SerialPort doesn't open in Electron 20
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.1 ### What operating system are you using? Windows ### Operating System Version Win 10 Pro 19043 ### What arch are you using? x64 ### Last Known Working Electron version 19.0.11 ### Expected Behavior WebSerial API should open a serial port. ### Actual Behavior The ``getInfo`` method works fine, but ``open`` fails to open the port. ### Testcase Gist URL https://gist.github.com/17afc65be515f3a1aec6256cb69f069d https://github.com/rafaelpimpa/electron-webserial-bug-repro ### Additional Information Error thrown is ``NetworkError: Failed to open serial port.`` I didn't use an Arduino to test, but it should work the same, since it works in v19. Reproduction has the same code from the docs.
https://github.com/electron/electron/issues/35282
https://github.com/electron/electron/pull/35306
cbc1ee5775375b7ec92f8c38bcbb157833b1b8a0
672539187c779cf874dfcecc198bcfbdec85aa97
2022-08-09T13:47:55Z
c++
2022-08-15T15:49:20Z
closed
electron/electron
https://github.com/electron/electron
35,264
["shell/browser/ui/drag_util_mac.mm"]
[Bug]: WebContents.startDrag feature seems to have changed unexpectedly from electron version 19.0.4 to 19.0.5
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.5 ### What operating system are you using? macOS ### Operating System Version Mac OS Montrey 12.2.1 (Apple M1) ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version 19.0.4 ### Expected Behavior 1. This feature should copy the target file. 2. With reference to the sample code: ```js console.timeEnd('drag2') // line 38 of main.js ``` This line should be called at the end of dragging. ### Actual Behavior 1. This feature is moving the target file instead of copying. If you run the sample code in the attached Gist URL, you will find that you are unable to drag the same target more than once. 2. With reference to the same sample code as [2.] in Expected Behavior, above: ```js console.timeEnd('drag2') // line 38 of main.js ``` This line is being called at the start of dragging, instead of the end. ### Testcase Gist URL https://gist.github.com/34bc977bc272030760b586d53961e0f1 ### Additional Information The sample code I provided in the Gist URL was created from the official [Sample Code](https://www.electronjs.org/docs/latest/tutorial/native-file-drag-drop) with an addition of `console.time` and `console.timeEnd` I have a feeling this bug was introduced when merging the following Pull Request: https://github.com/electron/electron/pull/34615 ### Questions: How can I do the following, like before (in 19.0.4 and earlier versions) 1. Copy the target file on drag 2. Act on the end of the user's dragging ### Behavior on Windows: In Windows 11, the behavior is as expected, and identical across all Electron versions, including 19.0.4 and 19.0.5.
https://github.com/electron/electron/issues/35264
https://github.com/electron/electron/pull/35963
9006f0e0c5a8cd529dabc0de822e9098e574c799
b3fd5eb2585aabb9182d6941c6da3f688fa3f5bb
2022-08-08T14:19:45Z
c++
2022-10-11T16:19:59Z
closed
electron/electron
https://github.com/electron/electron
35,255
["docs/api/session.md"]
[Bug]: Wrong TypeScript type of ses.getStoragePath
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.1 ### What operating system are you using? macOS ### Operating System Version macOS Monterey 12.5 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior The return type of `ses.getStoragePath()` should be `string | null`. This is returned when actually calling the function and is also described in https://github.com/electron/electron/blob/91f9436ad8e6028bf2909008e5814867289b9310/docs/api/session.md#sesgetstoragepath. ### Actual Behavior The generated TypeScript type definition says `ses.getStoragePath()` returns `void`, as can also be seen in https://unpkg.com/browse/[email protected]/electron.d.ts#L7763. ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/35255
https://github.com/electron/electron/pull/35288
8646bf8d304d8dc97988227cdf76007c6fa4bfdf
1d95b98cc86a4b4ed757931fd38105b06e3e2556
2022-08-08T09:07:38Z
c++
2022-08-10T05:39:36Z
closed
electron/electron
https://github.com/electron/electron
35,223
["shell/browser/native_window_views_win.cc"]
[Bug]: 'restore' event not emitted after minimize and maximize application
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.1 ### What operating system are you using? Windows ### Operating System Version Windows 10 Pro 21H1 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior Event 'restore' should notify to application ### Actual Behavior After clicking maximize application, the event 'restore' does not notify after minimize ` BrowserWindow.on( 'restore', () => { // nothing happend }); ` ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/35223
https://github.com/electron/electron/pull/35342
0ff6508f5bffd84829749c97c7346fc2fc776563
3ce35f224efa3a6e9bfc9b642816961b8691491b
2022-08-04T11:04:47Z
c++
2022-08-23T01:32:42Z
closed
electron/electron
https://github.com/electron/electron
35,219
["patches/node/fix_crash_caused_by_gethostnamew_on_windows_7.patch", "patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch"]
[Bug]: Win7 can't open electron app after upgrade to v19.x.x
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.x.x ### What operating system are you using? Windows ### Operating System Version win7 ### What arch are you using? x64 ### Last Known Working Electron version 17.x.x ### Expected Behavior Can open and work. ### Actual Behavior Can not open program in win7 operate system. ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/35219
https://github.com/electron/electron/pull/35702
fa3cd1747556b66a3e714f99e988e47334187e44
7d3f22dd32365d5432583d936fa4c7f3d480ef45
2022-08-04T08:54:15Z
c++
2022-09-16T05:33:01Z
closed
electron/electron
https://github.com/electron/electron
35,170
["build/fuses/fuses.json5", "docs/tutorial/fuses.md", "patches/chromium/.patches", "patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch", "shell/app/electron_main_delegate.cc", "shell/app/electron_main_delegate.h"]
[Feature Request]: Allow custom v8 snapshots to be used in the main process and the default snapshot in the browser process
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success. ### Problem Description We are using `electron-mksnapshot` to generate a custom v8 snapshot for our application that is desired to run **only in the main process**, not the renderer process. While debugging our app, we noticed that the snapshot is available to the renderer process **even with nodeIntegration disabled**. We noticed that electron is [patching](https://github.com/electron/electron/blob/main/patches/chromium/load_v8_snapshot_in_browser_process.patch?rgh-link-date=2022-08-02T00%3A24%3A21Z) chromium to always load the v8 snapshots, with a comment indicating that this is required. Is loading the v8 snapshot required even when nodeIntegration is disabled? We would like for there to be a way to use our custom snapshot in the main process but use the default snapshot (or no snapshot with nodeIntegration disabled) in the browser process. ### Proposed Solution This could be done a variety of ways, but one possibility would be to update the [patch](https://github.com/electron/electron/blob/main/patches/chromium/load_v8_snapshot_in_browser_process.patch?rgh-link-date=2022-08-02T00%3A24%3A21Z) to not load the custom snapshot when node integration is disabled. Or if it's desired sometimes to have node integration disabled **and** a v8 snapshot included, you could have an additional parameter that specifies as such. ### Alternatives Considered One alternative for us would be to have separate main electron processes: one for the bulk of our main code that uses the snapshot, and one to purely launch the browser that doesn't launch the snapshot. This is undesirable as it significantly complicates the code and potentially bloats the size of our binary. ### Additional Information _No response_
https://github.com/electron/electron/issues/35170
https://github.com/electron/electron/pull/35266
5cf15cdab7f3d055a225dbc50c53d62614250468
f25c87dc7024397526bbe221efdaa0260392c243
2022-08-02T00:24:21Z
c++
2022-09-15T20:21:16Z
closed
electron/electron
https://github.com/electron/electron
35,157
["docs/tutorial/tutorial-3-preload.md"]
[Docs] Wrong usage of `ipcMain.handle` in `/tutorial-preload`
https://github.com/electron/electron/blob/b67c69d741c648569d86c5a7846f2559219f9b14/docs/tutorial/tutorial-3-preload.md?plain=1#L198 1. Follow tutorial on a Mac 2. close only window 3. open another window 4. notice error It should not be called for every window but just once inside main.js <img width="283" alt="Screen Shot 2022-08-01 at 13 48 44" src="https://user-images.githubusercontent.com/163636/182133832-033f31ee-423f-4ab9-95d7-8cbbb5f7b1da.png">
https://github.com/electron/electron/issues/35157
https://github.com/electron/electron/pull/35479
87145c393c08203e6e18f0615a13baff59fb3e30
c16baa063a404c9afefe452ef88a28cfa7cc2241
2022-08-01T10:56:00Z
c++
2022-09-07T13:37:29Z
closed
electron/electron
https://github.com/electron/electron
35,115
["docs/tutorial/mac-app-store-submission-guide.md"]
[Bug] Update Mac App Store submission documentation
https://www.electronjs.org/docs/latest/tutorial/mac-app-store-submission-guide#upload References "Application Loader" for submitting to Mac App Store. Apple no longer supports Application Loader and it's no longer part of Xcode.
https://github.com/electron/electron/issues/35115
https://github.com/electron/electron/pull/35116
15540975ff3f3979ba93ed560fdb18489c458b98
71b8804fd0b53c4b87de8863a1be627732f60c89
2022-07-28T14:09:02Z
c++
2022-11-01T21:07:50Z
closed
electron/electron
https://github.com/electron/electron
35,046
["shell/browser/api/electron_api_web_contents.cc", "shell/browser/electron_browser_context.cc", "shell/browser/electron_browser_context.h", "spec-main/api-web-contents-spec.ts"]
[Bug]: webContents.getUserAgent() is empty since 20.0.0-alpha.6
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.0-alpha.6 ### What operating system are you using? Ubuntu ### Operating System Version Ubuntu 20.04 ### What arch are you using? x64 ### Last Known Working Electron version 20.0.0-alpha.5 ### Expected Behavior `webContents.getUserAgent()` returns a string with a user Agent ### Actual Behavior webContents.getUserAgent() returns an empty string ### Testcase Gist URL https://gist.github.com/33fd4a9ac6db6b28b1dcc5b765edb622 ### Additional Information In the console the user agent is printed in alpha.5, but empty in alpha.6. Looking at the diff between alpha.5 and alpha.6, this PR seems the likely cause: https://github.com/electron/electron/pull/34524 / #34481 It's worth noting that the renderer does have a filled-in userAgent.
https://github.com/electron/electron/issues/35046
https://github.com/electron/electron/pull/35069
8004cb8722c8d52f4cd553bbaea86750149e8ca4
9028bb79a85fedf64230c2f1c6a29ab072c98c20
2022-07-25T14:12:09Z
c++
2022-07-29T15:09:47Z
closed
electron/electron
https://github.com/electron/electron
34,996
["shell/browser/electron_browser_main_parts.cc"]
[Bug]: SIGTRAP when starting electron >= 20.0.0-beta.9
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 20.0.0-beta.9 and 20.0.0-beta.10 ### What operating system are you using? Other Linux ### Operating System Version Fedora 35 ### What arch are you using? x64 ### Last Known Working Electron version All older versions, including 19 and 20.0.0-beta.8 ### Expected Behavior Electron quickstart app should work, as should ANY other electron app, I have tested a bunch of them, but all gave the same results, after you install a recent 20 beta. ### Actual Behavior They don't start if I use version 20.0.0-beta.9 or 20.0.0-beta.10, older versions *do* work. It only happens on *one* of the devices I own, *all* others are fine, but this one does not handle these new versions, while older ones work. This must have been introduced somewhere in [these commits between those releases](https://github.com/electron/electron/compare/v20.0.0-beta.8...v20.0.0-beta.9). ### Testcase Gist URL https://github.com/electron/electron-quick-start/ ### Additional Information Running electron with `gdb` does not give a lot of info, unless I'm running it incorrectly, please see below and let me know if this should be done differently: ```gdb jelmerro ~/electron-quick-start (master)$ gdb --args node node_modules/.bin/electron . GNU gdb (GDB) Fedora 12.1-1.fc35 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from node... This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.fedoraproject.org/ Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. Reading symbols from /home/jelmerro/.cache/debuginfod_client/adca03b9b7e322bf173d4a6972adea6c254bf914/debuginfo... (gdb) run Starting program: /usr/bin/node node_modules/.bin/electron . [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7ffff23c0640 (LWP 12930)] [New Thread 0x7ffff1bbf640 (LWP 12931)] [New Thread 0x7ffff13be640 (LWP 12932)] [New Thread 0x7ffff0bbd640 (LWP 12933)] [New Thread 0x7fffebfff640 (LWP 12934)] [New Thread 0x7ffff7fbe640 (LWP 12935)] [Detaching after fork from child process 12936] /home/jelmerro/electron-quick-start/node_modules/electron/dist/electron exited with signal SIGTRAP [Thread 0x7fffebfff640 (LWP 12934) exited] [Thread 0x7ffff0bbd640 (LWP 12933) exited] [Thread 0x7ffff13be640 (LWP 12932) exited] [Thread 0x7ffff1bbf640 (LWP 12931) exited] [Thread 0x7ffff23c0640 (LWP 12930) exited] [Thread 0x7ffff7fbe640 (LWP 12935) exited] [Inferior 1 (process 12927) exited with code 01] ```
https://github.com/electron/electron/issues/34996
https://github.com/electron/electron/pull/35075
ff804e3a748c72f4812af8ccf3b1d7442a468f4a
62001dc6cbfd78a82d2fca849ca5eb0504cd0b71
2022-07-20T15:23:25Z
c++
2022-07-27T04:44:44Z
closed
electron/electron
https://github.com/electron/electron
34,939
["shell/browser/ui/views/menu_bar.cc", "shell/browser/ui/views/menu_bar.h"]
[Bug]: Dark pink hover/focus background for menus in menu bar
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.8 ### What operating system are you using? Windows ### Operating System Version Windows 10 build 19044 ### What arch are you using? x64 ### Last Known Working Electron version Electron v17.4.11 ### Expected Behavior Standard menu bar menus should use a neutral gray hover/focus background (this used to be the case in the past). ### Actual Behavior Not clear why, but it seems that standard menus in electron now (at least on my machine) have a dark pink hover/focus background. Not sure where this is being picked up from. None of my other apps on Windows use this colour, and it's certainly not part of my OS-wide theme. I get this when running the vanilla quick-start example https://github.com/electron/electron-quick-start ![screenshot from the quick-start application, showing the dark pink hover/focus background on an open menu](https://user-images.githubusercontent.com/895831/179403341-c5149475-e909-4578-82a9-bb22740fc35b.png) first spotted on this electron-based application I sometimes contribute to https://github.com/ThePacielloGroup/CCAe/issues/251 ### Testcase Gist URL from @jediwade https://gist.github.com/eb8cfee3a6ae8fd88bb808f8b12e5f62 ### Additional Information _No response_
https://github.com/electron/electron/issues/34939
https://github.com/electron/electron/pull/37766
a75b892e9080753dcc5e1344f2a59fa641a65be1
601217218759d088f12680a428fead8c8b26a5e0
2022-07-17T14:37:19Z
c++
2023-03-31T16:06:09Z
closed
electron/electron
https://github.com/electron/electron
34,887
["shell/browser/serial/electron_serial_delegate.cc", "shell/browser/serial/electron_serial_delegate.h", "shell/browser/serial/serial_chooser_context.cc", "shell/browser/serial/serial_chooser_context.h", "shell/browser/serial/serial_chooser_controller.cc", "shell/browser/serial/serial_chooser_controller.h"]
Web Serial API removed and added events are never called
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.8 ### What operating system are you using? macOS ### Operating System Version macOS Monterey 12.4 ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior I want to update UI when picking a port if a serial port is plugged in or unplugged. Test Steps: 1, Click button to call `navigator.serial.requestPort()` 2, Show a modal to show port list in the `select-serial-port` event handler 3, Plug in or unplug a device to check the `serial-port-added` and `serial-port-removed` events ``` modal.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => { //Add listeners to handle ports being added or removed before the callback for `select-serial-port` //is called. modal.webContents.session.on('serial-port-added', (event, port) => { console.log('serial-port-added FIRED WITH', port) //Optionally update portList to add the new port }) modal.webContents.session.on('serial-port-removed', (event, port) => { console.log('serial-port-removed FIRED WITH', port) //Optionally update portList to remove the port }) // modal.webContents.openDevTools(); modal.webContents.send('update-list', portList); modal.show(); event.preventDefault(); ipcMain.once('serial-port', (_event, portId = '') => { callback(portId); modal.hide(); }); }); ``` ### Actual Behavior But the `select-serial-port` and `select-serial-removed` events never called. Did I use these api in a wrong way? ### Testcase Gist URL https://gist.github.com/0bbeeaa1c9e8f5affb6b59663870616e ### Additional Information _No response_
https://github.com/electron/electron/issues/34887
https://github.com/electron/electron/pull/34958
aeba6ca973c8ed8a8b75cceb4e0dde33f3595850
648c9934c01c12ea082a18fdf690c37e3112ce12
2022-07-12T03:31:13Z
c++
2022-07-25T14:50:19Z
closed
electron/electron
https://github.com/electron/electron
34,852
["shell/browser/native_window_views.cc", "shell/browser/notifications/linux/libnotify_notification.cc", "shell/common/platform_util.h", "shell/common/platform_util_linux.cc"]
[Bug]: Electorn 18 app is missing desktopFileName window property
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 18.2.4 ### What operating system are you using? Other Linux ### Operating System Version Manjaro Linux ### What arch are you using? x64 ### Last Known Working Electron version 17.4.3 ### Expected Behavior `desktopFileName` window property should not be empty ![image](https://user-images.githubusercontent.com/61285/177988205-9de3f548-11da-41e7-9d8c-fbc289977148.png) ### Actual Behavior `desktopFileName` window property is empty With Electron 17.4.3 - OK ![image](https://user-images.githubusercontent.com/61285/177988036-3d4dcb27-706a-4708-b853-91c8bf063687.png) ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/34852
https://github.com/electron/electron/pull/34855
8f3fb8db09ac049894c8ab099979810899f9435b
f63bba8ce24917f1c78a8804496fe0f5b461b0af
2022-07-08T12:02:26Z
c++
2022-07-11T18:26:18Z
closed
electron/electron
https://github.com/electron/electron
34,822
["shell/browser/native_window_mac.mm"]
[Bug]: `setTrafficLightPosition` is reset when calling `setRepresentedFilename`
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.7 ### What operating system are you using? macOS ### Operating System Version 12.4 ### What arch are you using? arm64 (including Apple Silicon) ### Last Known Working Electron version _No response_ ### Expected Behavior The traffic light position should remain stable. ### Actual Behavior The traffic light position changes after the presented file name is changed for the window. ### Testcase Gist URL https://gist.github.com/9ad043673ca425c92bbb4e1f951c455c ### Additional Information ![Recording 2022-07-05 at 06 23 50](https://user-images.githubusercontent.com/900690/177249087-a480a68a-1c2e-4470-8781-38be162c61a0.gif)
https://github.com/electron/electron/issues/34822
https://github.com/electron/electron/pull/34834
e83c3ec74442f0533e2d66c53fa84a075ebc20ae
1941c88442b61f3e83125f197becc83cf6975a9c
2022-07-05T04:24:03Z
c++
2022-07-08T06:33:42Z
closed
electron/electron
https://github.com/electron/electron
34,820
["patches/chromium/.patches", "patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch", "shell/browser/ui/views/client_frame_view_linux.cc", "shell/browser/ui/views/client_frame_view_linux.h"]
[Bug]: wayland window decorations mangled and not clickable
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 19.0.7 ### What operating system are you using? Ubuntu ### Operating System Version 22.04 ### What arch are you using? x64 ### Last Known Working Electron version 19.0.0-alpha.3 ### Expected Behavior Running under wayland natively (`--ozone-platform=wayland`) and enabling window decorations (`app.commandLine.appendSwitch('enable-features', 'WaylandWindowDecorations');` in main.js) should show a title bar which is clickable. Below is from 19.0.0-alpha.3 where it still worked: ![grafik](https://user-images.githubusercontent.com/1392875/177206042-21015934-5a2b-4484-bc5c-111198be4008.png) ### Actual Behavior Running under wayland natively (`--ozone-platform=wayland`) and enabling window decorations (`app.commandLine.appendSwitch('enable-features', 'WaylandWindowDecorations');` in main.js) shows mangled transparent border on the left side instead of a title bar and is not clickable: On **electron 19** is broke during the alpha and beta cycle: Below is from 19.0.0-alpha.4 where it first broke, here the buttons are still clickable: ![grafik](https://user-images.githubusercontent.com/1392875/177205464-db1274be-63dc-4d5d-93e2-14157984966d.png) Starting with 19.0.0-beta.4 the buttons are also no longer clickable: ![grafik](https://user-images.githubusercontent.com/1392875/177205697-3e1d4362-2cd3-4ceb-a4f1-5ee6ef68643f.png) With 19.0.0 up and until 19.0.7 the same, broken titlebar and not clickable: ![grafik](https://user-images.githubusercontent.com/1392875/177205907-2ed403b8-df96-4c9e-8292-52092cb4db8b.png) On **electron 18-x-y** it also broke between 18.2.0 and 18.2.1, but only the buttons cannot be clicked any longer: 18.2.0 still everything ok, titlebar there and clickable: ![grafik](https://user-images.githubusercontent.com/1392875/177205350-a175f92b-5b28-40e3-a108-c05e6b87aa7d.png) 18.2.1: Titlebar still there, but no longer clickable: ![grafik](https://user-images.githubusercontent.com/1392875/177205401-2dafdd0f-a8de-4a39-8cec-e101bcfb74e5.png) Up and including 18.3.5 the titlebar stays there, but not clickable: ![grafik](https://user-images.githubusercontent.com/1392875/177205824-60381433-c39b-440d-9aa2-a7c62592f642.png) ### Testcase Gist URL https://gist.github.com/csett86/5d45c47cb1d5331b9ede0788ff5ae284 ### Additional Information To reproduce with the gist, you need to add ```--ozone-platform=wayland``` to the user-provided flags, as I could find a way to add this to the fiddle (the WaylandWindowDecorations are part of the fiddle): ![grafik](https://user-images.githubusercontent.com/1392875/177206134-6371daec-5e63-4127-a344-0bf72ffba907.png)
https://github.com/electron/electron/issues/34820
https://github.com/electron/electron/pull/34955
4e8480b15b63cf71648f8f9357713b8827dec27c
7b8fb2b07418c7bad6ce811ca75c926ee53663fc
2022-07-04T18:59:46Z
c++
2022-08-03T08:51:52Z
closed
electron/electron
https://github.com/electron/electron
34,813
["shell/browser/printing/print_view_manager_electron.cc"]
[Bug]: Can not print contents of browser window silently in Ubuntu linux
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 18.2.3 ### What operating system are you using? Ubuntu ### Operating System Version Ubuntu 20.04 ### What arch are you using? x64 ### Last Known Working Electron version none ### Expected Behavior I want to print the contents of browser window silently on a POS printer. The code attached at Gist section works fine on windows, but doesn't work in Ubuntu. My targeted platform is ubuntu linux 20.04 and above ### Actual Behavior The output at the console for the Gist is : Console ready 🔬 Saving files to temp directory... Saved files to /tmp/tmp-17209-xBE03rN99Kka Electron v18.2.3 started. libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed [19927:0702/212214.938092:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process. [ { name: 'DCP-7030', displayName: 'DCP-7030', description: 'Brother DCP-7030', status: 5, isDefault: false, options: { copies: '1', 'device-uri': 'usb://Brother/DCP-7030?serial=000D0N969645', finishings: '3', 'job-cancel-after': '10800', 'job-hold-until': 'no-hold', 'job-priority': '50', 'job-sheets': 'none,none', 'marker-change-time': '0', 'number-up': '1', 'printer-commands': 'none', 'printer-info': 'Brother DCP-7030', 'printer-is-accepting-jobs': 'true', 'printer-is-shared': 'true', 'printer-is-temporary': 'false', 'printer-location': 'embeddedSaugat', 'printer-make-and-model': 'Brother DCP-7030, using brlaser v6', 'printer-state': '5', 'printer-state-change-time': '1651417533', 'printer-state-reasons': 'paused', 'printer-type': '4164', 'printer-uri-supported': 'ipp://localhost/printers/DCP-7030', system_driverinfo: 'Brother DCP-7030, using brlaser v6' } }, { name: 'POS80QMS', displayName: 'POS80QMS', description: '80mm printer for QMS Project', status: 3, isDefault: true, options: { copies: '1', 'device-uri': 'usb://Unknown/Printer', finishings: '3', 'job-cancel-after': '10800', 'job-hold-until': 'no-hold', 'job-priority': '50', 'job-sheets': 'none,none', 'marker-change-time': '0', 'number-up': '1', 'printer-commands': 'none', 'printer-info': '80mm printer for QMS Project', 'printer-is-accepting-jobs': 'true', 'printer-is-shared': 'false', 'printer-is-temporary': 'false', 'printer-location': 'holus', 'printer-make-and-model': 'POS-80', 'printer-state': '3', 'printer-state-change-time': '1655307054', 'printer-state-reasons': 'none', 'printer-type': '2248708', 'printer-uri-supported': 'ipp://localhost/printers/POS80QMS', system_driverinfo: 'POS-80' } } ] (node:19895) electron: Deprecation Warning: getPrinters() is deprecated. Use the asynchronous and non-blocking version, getPrintersAsync(), instead. (Use `electron --trace-warnings ...` to show where the warning was created) failed [19895:0702/212216.612479:ERROR:print_view_manager_base.cc(85)] Invalid printer settings The selected printer is not available or not installed correctly. <br> Check your printer or try selecting another printer. Electron exited with code 0. ### Testcase Gist URL https://gist.github.com/saugatdai/5ba400d42e3fa4be66d323b2d826fe50 ### Additional Information My project is not going to production because of this problem. Please help with some solutions and suggestions.
https://github.com/electron/electron/issues/34813
https://github.com/electron/electron/pull/34893
eb8c9452cb38b6bd32bdc92724cc1fb42a3d43dc
05d4966251580cd4ae95479ccbbfdd5e8a70702f
2022-07-02T15:55:59Z
c++
2022-07-19T12:46:08Z
closed
electron/electron
https://github.com/electron/electron
34,801
["default_app/main.ts"]
[Bug]: Electron icon shown instead of app's on Wayland
### Preflight Checklist - [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project. - [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. - [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. ### Electron Version 18.2.4 ### What operating system are you using? Other Linux ### Operating System Version Linux 5.18.7-arch1-1 #1 SMP PREEMPT_DYNAMIC ### What arch are you using? x64 ### Last Known Working Electron version _No response_ ### Expected Behavior * I use Linux with a KDE environment * I run an electron app with Wayland using chromium flags --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer --ozone-platform=wayland * The default Electron icon is shown, minimize to tray doesn't work and many other problems * The problem is similar as described here https://nicolasfella.de/posts/fixing-wayland-taskbar-icons/ but instead of the Wayland icon, it is the Electron icon. ### Actual Behavior * The proper icon is shown as when running without Wayland flags * Can minimize/close to the system tray ### Testcase Gist URL _No response_ ### Additional Information _No response_
https://github.com/electron/electron/issues/34801
https://github.com/electron/electron/pull/35997
76880be6d2cc466a44cf437bf34bf32f94a9f6ad
295c5331eeb2cce40419b6a54875fba88d61422d
2022-06-30T01:32:30Z
c++
2022-10-17T08:34:24Z