-
Notifications
You must be signed in to change notification settings - Fork 534
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
Library is not able to load pending crash report and throwing an error Domain=PLCrashReporterErrorDomain Code=2 #305
Comments
I do believe that it may be the same issue that we encountered on our side. Basically, in our case it was narrowed-down to the fact that the crash report generated exceeded the limit hardcoded in the library. You can check that by trying to look up for the saved crash report in the app container and checking its size. If it's 262144 (that's 256KB), then it's probably the same issue. The workaround is implemented in #308 (increasing the limit from 256KB to 1MB). After lifting the limit, in our case the real size of the crash report generated was 289858 bytes. |
Hi @dhawal-aeq, could you please check if you are experiencing the same issue that @grigorye has described? @grigorye, thanks for your contribution! How frequently does such a big crash occur? Is it a constant issue or does it occur only under specific circumstances? You've increased the limit to 1MB. Is this amount necessary? Perhaps 512KB might suffice. The limit is intended to prevent excessive disk usage, see this link. Have you tested your changes by integrating the patched version into your app? How do you integrate PLCRashReporter? SPM, Pods? |
Well, it's 100% reproducible in our case, with nothing but a typical setup for our UI implementation.
Yes.
We're in fact integrating it implicitly as part of DatadogCrashReporting, via CocoaPods. To integrate the patched version (until the official version is released here), we (temporarily) employed a fork (preview of the changes) (beware that it branches of 1.11.1 (the last officially released version)). OTOH, as far as I can see, the fix has been already merged and folks are preparing 1.11.2, so I'm looking forward to the new official version that addresses the issue. |
Tbh, I'm not sure I understand the rationale behind this limit to the end, but at quick glance it looks like addressing "internal safety" issue vs something specific. From that perspective the difference between 1M or 512K sounds irrelevant to me - if it lands in that kind of situation, whether it stops at 1M or 512K does not matter? Also, I followed the rationale that they had in the documentation with the current limit: 256K was used when the largest observed crash report was around 97K, that is 2.5x larger than the observation. Here we have the case with 290K crash report that we observed in real life, so 512K would be less than 2x, hence my proposal was to use 1M, just to be on the safe side of the things. |
@DmitriyKirakosyan Seems like this is the same issue that @grigorye is having, I can see my crash report is 262KB and that explains why CrashReporter is not able to load the crash report. I agree with @gimsvc we should have limit set to 2.5x larger than observation as there might be lot of cases where we could end up in big report. Do you have any timeline for the release of 1.11.2 |
The fix was released, so I'm closing this issue. |
Description
We have integrated CrashReporter into our project and trying to capture crash reports but somehow it's not able to load report and throwing below error:
failed to load and parse with error: Error Domain=PLCrashReporterErrorDomain Code=2 "An unknown error occured decoding the crash report" UserInfo={NSLocalizedDescription=An unknown error occured decoding the crash report}
However, when we use the same configuration with sample app then it works fine, seems like something in the project which is causing an issue but we are not able to figure out.
Repro Steps
Here is the code that we have added in the didFinishLaunching to verify the crashes:
Details
and some private third party libraries from Backbase
For your information, we have also tried to disable Firebase in case it is creating an issue but same error.
Please find attachments for crashReport data that we gathered from APP's cache folder, we believe this is the place where CrashReport is capturing the crashes and also .ips file that the system generated for the crash.
[com.plausiblelabs.crashreporter.data.zip]
Ent dev2-2024-04-09-110918.ips.zip
(https://github.com/microsoft/plcrashreporter/files/14922709/com.plausiblelabs.crashreporter.data.zip)
The text was updated successfully, but these errors were encountered: