Giter Club home page Giter Club logo

electron-shutdown-handler's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

electron-shutdown-handler's Issues

Windows 11 can't stop

ElectronShutdownHandler.on('shutdown', async () => {
      logger.warn('shutdown quit 1')
     await sleep(3000) // = wind reg ProxyEnable
      logger.warn('shutdown quit 2')
      ElectronShutdownHandler.releaseShutdown()
      app.quit()
})

Now it shuts down when the "shutdown quit 2" is not executed

Dependency outdated for VS 2022.

Error logs:

prebuild info begin Prebuild version 11.0.4
prebuild info build Preparing to prebuild @paymoapp/[email protected] for napi 6 on win32-x64 using node-gyp
prebuild info find Python using Python version 3.11.6 found at "C:\Users\xxx\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe"
prebuild ERR! find VS
prebuild ERR! find VS msvs_version not set from command line or npm config
prebuild ERR! find VS running in VS Command Prompt, installation path is:
prebuild ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
prebuild ERR! find VS - will only use this version
prebuild ERR! find VS unknown version "undefined" found at "C:\Program Files\Microsoft Visual Studio\2022\Community"
prebuild ERR! find VS could not find a version of Visual Studio 2017 or newer to use
prebuild ERR! find VS looking for Visual Studio 2015
prebuild ERR! find VS - not found
prebuild ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
prebuild ERR! find VS
prebuild ERR! find VS
**************************************************************
prebuild ERR! find VS You need to install the latest version of Visual Studio
prebuild ERR! find VS including the "Desktop development with C++"
prebuild ERR! find VS For more information consult the documentation at:
prebuild ERR! find VS https://github.com/nodejs/node-gyp#on-windows
prebuild ERR! find VS 
**************************************************************                                                                              
prebuild ERR! find VS
prebuild ERR! configure error
prebuild ERR! stack Error: Could not find any Visual Studio installation to use
prebuild ERR! stack     at VisualStudioFinder.fail (C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
prebuild ERR! stack     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:74:16
prebuild ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
prebuild ERR! stack     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:70:14
prebuild ERR! stack     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:372:16
prebuild ERR! stack     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\util.js:54:7
prebuild ERR! stack     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\util.js:33:16
prebuild ERR! stack     at ChildProcess.exithandler (node:child_process:427:5)
prebuild ERR! stack     at ChildProcess.emit (node:events:514:28)
prebuild ERR! stack     at maybeClose (node:internal/child_process:1091:16)
prebuild ERR! not ok
prebuild ERR! build Error: Could not find any Visual Studio installation to use
prebuild ERR! build     at VisualStudioFinder.fail (C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
prebuild ERR! build     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:74:16
prebuild ERR! build     at VisualStudioFinder.findVisualStudio2013 (C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
prebuild ERR! build     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:70:14
prebuild ERR! build     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\find-visualstudio.js:372:16
prebuild ERR! build     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\util.js:54:7
prebuild ERR! build     at C:\Users\xxx\Desktop\electron-shutdown-handler\node_modules\prebuild\node_modules\node-gyp\lib\util.js:33:16
prebuild ERR! build     at ChildProcess.exithandler (node:child_process:427:5)
prebuild ERR! build     at ChildProcess.emit (node:events:514:28)
prebuild ERR! build     at maybeClose (node:internal/child_process:1091:16)

Where is rmlogotext.exe?

I cannot find rmlogotext.exe in the project, neither after running npm run build nor in the release files.

Cannot find module - production build

Hi. This lib works fine when i test it on development, but if i build for production with electron-builder i get this error on app startup:
"Error: Cannot find module '@paymoapp/electron-shutdown-handler' Require stack: pathToAppData/app.asar/background.js".

It is not installed as dev dependency, so that shouldn't be an issue. Any idea what could be the problem? Thank you

What if I don't have any window?

I have an Electron app that doesn't have any window, only a tray icon.

Unfortunately, tray icons do not have have a getNativeWindowHandle() method to supply to ElectronShutdownHandler.setWindowHandle.

Do you have any ideas on how can I still add the shutdown handler to my app?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.