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.

[Bug] Electron process becomes unresponsive to SIGINT

See original GitHub issue

Describe the bug

Sending a SIGINT signal to the Electron process does not kill the process.

Code Snippet

package.json

{
  "name": "test",
  "main": "main.js",
  "scripts": {
    "postinstall": "electron-builder install-app-deps",
    "start": "electron ."
  },
  "dependencies": {
    "puppeteer": "^8.0.0",
    "puppeteer-extra": "^3.1.16",
    "puppeteer-extra-plugin-stealth": "^2.7.6"
  },
  "devDependencies": {
    "electron": "^12.0.2",
    "electron-builder": "^22.10.5"
  }
}

main.js

const puppeteer = require('puppeteer-extra')
const StealthPlugin = require('puppeteer-extra-plugin-stealth')
puppeteer.use(StealthPlugin())
puppeteer.launch().then(browser => browser.close());

Versions

  System:
    OS: Linux 5.8 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    Memory: 227.82 MB / 15.36 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 12.20.1 - ~/.nvm/versions/node/v12.20.1/bin/node
    npm: 7.6.3 - ~/.nvm/versions/node/v12.20.1/bin/npm
  npmPackages:
    puppeteer: ^8.0.0 => 8.0.0 
    puppeteer-extra: ^3.1.18 => 3.1.18 
    puppeteer-extra-plugin-stealth: ^2.7.6 => 2.7.6

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
dev-hyperwebcommented, Jul 22, 2021

maybe we are on same problem try check on me, I thing it better than change “process” event

but maybe other still use puppeteer lower than version 1.6.0 ? Replace onClose to onDisconnected (Version 1.6.0+)

https://github.com/berstend/puppeteer-extra/pull/530 or maybe need still support lower version ?

1reaction
berstendcommented, Mar 31, 2021

Does the problem go away if the user-agent-override evasion is deleted from the enabled stealth plugins?

// Remove specific evasion from enabled ones dynamically
const pluginStealth = require('puppeteer-extra-plugin-stealth')()
pluginStealth.enabledEvasions.delete('user-agent-override')
puppeteer.use(pluginStealth)
Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug]: Electron process becomes unresponsive to SIGINT · Issue ...
Sending a SIGINT signal to the Electron process kills the process. Actual Behavior. Sending a SIGINT signal to the Electron process does not...
Read more >
Electron BrowserWindow hangs and becomes unresponsive
AFAIK, the unresponsive event fires after ~30 seconds. Your original image showed an error at that time. The new image also has events...
Read more >
Let It Crash: Best Practices for Handling Node.js Errors on ...
SIGINT is emitted when a Node.js process is interrupted, usually as the result of a control-C ( ^-C ) keyboard event. You can...
Read more >
Insect Pheromone Receptors – Key Elements in Sensing ...
Insects widely use pheromones to attract mating partners, to alarm conspecifics or to mark paths to rich food sources. The various functional ...
Read more >
Use of electron paramagnetic resonance dosimetry with tooth ...
Electron paramagnetic resonance (EPR) dosimetry is a physical method for the assessment of absorbed dose from ... radiation insensitive signals (Fig. 2.4).
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