Skip to content

[Question] Call app.quit() in Electron but process sticks around #12189

Closed

Description

@luke-webdev

We are testing our Electron app's exit functionality.

It seems when we call app.quit in Electron, the UI closes, but the electron processes sticks around.

We are wondering if we need to handle the Electron close event on the Playwright side and close the application explicitly as well.

Edit: Trying to handle the close event with electronApplication.on('close', callback) when app.quit() is called does not trigger the callback.

Activity

  1. dgozman commented on Feb 17, 2022

    @dgozman
    Collaborator

    luke-webdev I am not sure we thought about this case, so it could totally be that you have to call electronApplication.close() after you app.quit in your test. Perhaps we should fix that.

  2. mrchaofan commented on Mar 10, 2022

    @mrchaofan

    I met same problem. I found when I spawn a background process and that will lead app.quit() timeout. the background process holds the debugging server event if the electron main process ended.

  3. pavelfeldman commented on Apr 5, 2022

    @pavelfeldman
    Member

    Fixed in 8232497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions