question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Electron 11: Methods on `remote.screen` are not defined

See original GitHub issue

Note: Spectron currently depends on the remote module, and will need to be rewritten not to depend on remote to match Electron’s main repo. We’re currently looking for help from folks who may be interested in helping with this initiative - if you might be interested, please let us know!

Beginning in Electron 11, the screen module in both the main process and the remote module is now exported as a proxy, which lazily calls createScreen on first access. This proxy does not seem to be loading properly in the remote module, and is causing an error with remote’s screen API methods.

This is a known issue within remote only; calling screen methods from the main process works as expected.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anderskcommented, Nov 24, 2020

My fix for the remote.screen issue was backported in Electron 11.0.3, just released.

0reactions
VerteDindecommented, Nov 30, 2020

@deanylev Just triaged your bug in the electron/electron repo, we’ll see if we can add a fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Methods on remote.screen are not defined · Issue #26610
Methods on remote.screen are not defined #26610 · A new version of Electron broke something · Issue can be reproduced with code at...
Read more >
Why Electron Remote not working on Electron-Tabs?
I get these errors in my Electron App Project: webview logged from Dashboard.html(146): Uncaught TypeError: window.require is not a function ...
Read more >
screen | Electron
Retrieve information about screen size, displays, cursor position, etc.
Read more >
@electron/remote - npm
@electron/remote is an Electron module that bridges JavaScript objects from the main process to the renderer process.
Read more >
Electron: Cross-platform Desktop Apps Made Easy - Toptal
var remote = require('remote'), Menu = remote.require('menu');. To define a simple menu, we will need to use the buildFromTemplate() method:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found