-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
backtrace.io not accepting dumps #22003
Comments
As per usual, before v0.4.11 release I changed our backtrace.io token: 80ee864 I have verified on backtrace website it is correct and active: |
According to https://docs.saucelabs.com/dev/api/error-reporting/, 400 means malformed request. Perhaps something to do with latest libraries update? #21771 |
The build from #21771 gets 400 response |
I tracked backtrace request using fiddler and found interesting result. Save file I used
|
And I finally found reason why.
|
Thank you very much for this investigation, I was not expecting outside help on this and had this planned for today. Would adding an epilogue help in this case? Inspecting the HAR you attached in chrome suggests the failed attempt contains the config.ini in binary only, which is the first file we attach - this leads me to assuming that perhaps just the epilogue is not enough, as there are issues detecting individual files in the payload |
@janisozaur I originally thought so but problem is - looks like file is loaded by breakpad library and we're only sending array of file path to library. |
After some research, I found out that pretty few code is using breakpad to upload dumps and more few code is using And most of codes are either using outdated version of breakpad library or maintaining their own fork of breakpad. So possible solutions are
// Define boundary
std::wstring boundary = L"----WebKitFormBoundary7MA4YWxkTrZu0gW";
// Construct the multipart form data manually
std::wstring form_data;
for (const auto& param : parameters) {
form_data += L"--" + boundary + L"\r\n";
form_data += L"Content-Disposition: form-data; name=\"" + param.first + L"\"\r\n\r\n";
form_data += param.second + L"\r\n";
}
for (const auto& file : files) {
form_data += L"--" + boundary + L"\r\n";
form_data += L"Content-Disposition: form-data; name=\"" + file.first + L"\"; filename=\"" + file.second + L"\"\r\n";
form_data += L"Content-Type: application/octet-stream\r\n\r\n";
// Assume file content is read into a variable file_content
form_data += L"\r\n"; // file_content should be added here
}
form_data += L"--" + boundary + L"--\r\n";
// Prepare headers
std::map<std::wstring, std::wstring> headers;
headers[L"Content-Type"] = L"multipart/form-data; boundary=" + boundary;
// Send request
bool success = google_breakpad::HTTPUpload::SendRequest(url, headers, form_data, &timeout, &response, &error); |
There's also #5342, but when I looked into it (tbh the libraries update was motivated primarily to let me use crashpad), the API is very different, due to handling some other cases that breakpad cannot |
Operating System
Windows
OpenRCT2 build
0.4.11
Base game
RollerCoaster Tycoon 2
Area(s) with this issue?
This is a development issue
Describe the issue
OpenRCT2 backtrace.io instance is not accepting user uploads of dumps, responding with error code 400:
Steps to reproduce
dereference
in-game commandAttachments
No response
The text was updated successfully, but these errors were encountered: