New issue
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
Handle multipart/form-data submissions on native crashes in Linux #278
Handle multipart/form-data submissions on native crashes in Linux #278
Conversation
I've disabled testing on Electron < 4 due to some stability issues that exist in the windows e2e tests. While it's not really my decision what your minimum support is, Electron has a much smaller support target than it maintained in the past, with versions < 9 no longer being supported by the team. |
I was doing some Electron v11 testing locally today and saw the same test |
3.1.13 has multiple test issues, it's unlikely that support needs to be maintained for any of these versions. Especially now that everything < 9 is deprecated and no longer receiving support.
7ffec5c
to
7184c98
Compare
I am not sure that this is a fault of this branch though. From an improvement perspective, I believe this branch covers a condition that the sentry electron sdk currently does not support without introducing regressions. Are there any changes you would like me to make? I'd love to see this merged and released, so that I can stop relying on a fork for sentry support in Electron 10. |
The preload tests are failing due to this erroneous line which I think was left on master by mistake. I've removed it in my recent un-merged PRs and it fixes the failures. |
13b09cc
to
97b3689
Compare
@implausible if you can rebase this to master I can get it merged! |
I will get to this today |
I managed to do the merge via GitHub web UI. Just looking into tests... |
Oh, awesome! |
@implausible it looks like there are many failing tests for minidumps. Some debugging shows that the envelope body is not parsed correctly by the test server and this looks to be caused by the changes to |
Closing in favour of #343 but thank you for your efforts! |
Fixes #200. I think what was not mentioned in the issue is that currently Sentry does not handle these submissions at all, and so native crash reports on Linux are currently being labeled as corrupted submissions in Sentry. We need this solved ASAP so that we can adopt the product.
This adds the ability to detect whether a crash report is a
multipart/form-data
submission body and to switch minidump upload behavior to accommodate that on Linux. I have themultipart/form-data
being sent to the/api/{projectId}/minidump
route instead of the/api/{projectId}/envelope
route, as when I tried uploading the minidump with the sentry event attached to it, sentry's servers returned a 400 status code, causing the system to throw. If it was intended to allow the envelope route to accept themultipart/form-data
submission, it might need to be fixed server side to return a 200 OK in response.I have adjusted the
multipart/form-data
submission to include the event payload under the namesentry
as suggested in the issue. From testing against sentry, I can confirm that this produces the desired behavior where the full sentry event and minidump attachment are properly received on sentry.Due to the changes introduced here, I went ahead and adjusted the test server to accept minidump
multipart/form-data
submissions. I also reenabled all tests as well as addressed the blocking issues from running tests on 10 and up. I was able to reproduce the issues that caused the team to disable specs on9.0.5
. I traced the failure to this issue electron/electron#24788. This was addressed in9.2.0
. I would advise that for anyone affected by that issue, the team suggests to the affected user to move their Electron target.Please let me know if there is anything I can do to speed up the process of getting this merged / released. My team is looking to adopt Sentry for crash reporting and need this solved.