8000 [Bug]: CrashReporter still uses the default path along with 'crashDumps' path if it's started before app.onReady() · Issue #43973 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Bug]: CrashReporter still uses the default path along with 'crashDumps' path if it's started before app.onReady() #43973
Open
@natan-abolafya

Description

@natan-abolafya

Preflight Checklist

Electron Version

31.3.0

What operating system(s) are you using?

Windows

Operating System Version

Windows 10 19045.4894

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

On startup, crash reporter to not create a folder at %APPDATA%/<app.name> and instead what's provided via app.setPath('crashDumps', function.

Actual Behavior

As the documentation suggests:

This method should be called as early as possible in app startup, preferably before app.on('ready'). If the crash reporter is not initialized at the time a renderer process is created, then that renderer process will not be monitored by the crash reporter.

I do the following:

    app.name = APPLICATION_NAME;
    app.setPath('crashDumps', <path>)
    crashReporter.start({uploadToServer: false})

    app.on('ready', () => this.onReady());

And at the start up of the application, this creates a folder at C:\Users\<username>\AppData\Roaming\APPLICATION_NAME instead of the path I've set. The crash dump still ends up on the path I've set but I think also on the unexpected folder.

Testcase Gist URL

No response

Additional Information

If I run the following before starting the crashReporter, then that path is used instead.

app.setPath('userData', <another path>);

Which is the right thing to do, but I find it still odd for it to use userData instead of crashDumps.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0