8000 Pass `uploadToServer` option to windows crash reporter by tarruda · Pull Request #9053 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Pass uploadToServer option to windows crash reporter #9053

New issue < 10000 button aria-label="Close dialog" data-close-dialog="" type="button" data-view-component="true" class="Link--muted btn-link position-absolute p-4 right-0">

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 31, 2017

Conversation

tarruda
Copy link
Contributor
@tarruda tarruda commented Mar 29, 2017

Note that get/setUploadToServer is not implemented because the CustomInfo structure is only set when start is called, so to change the value of uploadToServer the user needs to call start again(which is how it already works for most options).

@tarruda tarruda requested a review from kevinsawicki March 29, 2017 13:01
@tarruda tarruda force-pushed the enable-crash-reporter-upload-windows branch 11 times, most recently from 1add065 to 681e4d2 Compare March 30, 2017 14:12
throw new Error('submitURL is a required option to crashReporter.start')
} else {
// use a dummy upload URL
submitURL = 'http://dummy/upload/url'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, so if you call start with uploadToServer with false and no submitURL and then later call setUploadToServer(true) and then get a crash, you'll see your machine make a request to this URL right?

Would an empty submit URL be possible to use instead? Or does that cause issues somewhere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

later call setUploadToServer(true) and then get a crash, you'll see your machine make a request to this URL right

Yes, I considered using http://localhost but it is possible that the user has a local http server.

@tarruda tarruda force-pushed the enable-crash-reporter-upload-windows branch from 681e4d2 to 67d92ef Compare March 31, 2017 11:16
@tarruda tarruda force-pushed the enable-crash-reporter-upload-windows branch from 67d92ef to 460fb9c Compare March 31, 2017 16:50
@kevinsawicki kevinsawicki merged commit 8a01ebe into master Mar 31, 2017
@kevinsawicki kevinsawicki deleted the enable-crash-reporter-upload-windows branch March 31, 2017 18:28
@kevinsawicki
Copy link
Contributor

Thanks for adding support for this @tarruda 👍 🏁

@kevinsawicki
Copy link
Contributor

Just got a flaky looking failure here on AppVeyor:

not ok 180 crashReporter module without sandbox should not send minidump if uploadToServer is false
  Error: EBUSY: resource busy or locked, unlink 'C:\Users\appveyor\AppData\Local\Temp\1\electronCrashReporterSpec-11733-1148-1priygi.7pgidaemi\Zombies Crashes\a92fbc58-7a87-4fd3-8012-3c70de2df434.dmp'
      at Object.fs.unlinkSync (fs.js:1007:18)
      at testDone (C:\projects\electron\spec\api-crash-reporter-spec.js:96:14)

https://ci.appveyor.com/project/electron-bot/electron/build/244/job/rp59bmb2epvvbh52#L1518

Perhaps we should use graceful-fs or ignore delete errors?

@tarruda
Copy link
Contributor Author
tarruda commented Apr 3, 2017

Perhaps we should use graceful-fs or ignore delete errors?

The file is deleted is to ensure the crash dump is created(and not uploaded), my guess is that the crash reporter was still writing to the file when unlink was called. The reason I explicitly unlink the dump is because of some differences in how crashReporter directories are handled(it seems on mac they are initialized at startup and not changed later?), causing dumps from other tests to leak into this test.

In any case, I think it is better to not depend on unlink to know that the dump was created. I will send a PR to fix this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0