-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
pdfFile: Too many open files #63
Comments
@sav5000 does this error happen every time you run bagoup, or is it intermittent? |
Every time, and just with one person |
Okay, this is the problem, and can explain the nondeterminism in #62. Have you given your terminal emulator full disk access? https://github.com/tagatac/bagoup#option-1-required-for-attachments-give-your-terminal-emulator-full-disk-access The full error message would help a lot. Feel free to redact any names, phone numbers, or email addresses. |
Yes, I made sure to do that before running bagoup. Terminal has full disc access. Would it help to remove the full disc access and then re-add it? ("Have you tried turning it off and on again?") Ok I scrolled up in Terminal and actually do see the completion log which is listed before other errors (which is why I didn't see it before). The other errors are a series of the one I posted before, and a variation of: Error opening /Users/sav5000/Library/Messages/Attachments/8b/11/012F6C54-AE38-4D40-852A-552C283946F6/76F9C3E6-9D08-404A-958D-F8F8B841B7BD.pluginPayloadAttachment: Too many open files BAGOUP RESULTS: |
I think you've hit on a real bug. I fixed this in #14, but somewhere along the line, I swapped the order of flushing the PDF file to disk and increasing the open file limit. I think I know how to fix it: bagoup/internal/bagoup/write.go Lines 122 to 130 in ee3d3ae
In the meantime as a workaround, you can try increasing the file limit before running bagoup with |
@sav5000 does the error message start with |
**What is changing**: Check the OS-level open file limit (and adjust it if necessary) prior to writing PDF files. **Why this change is being made**: There is the potential for wkhtmltopdf to need many open files (see wkhtmltopdf/wkhtmltopdf#3081). This was fixed in #14, where it depended on the order of events: 1. Stage the PDF file, getting the number of images 2. Check and adjust the open file limit 3. Flush the PDF file to disk Number 3 was achieved via the call `defer outFile.Close()`: https://github.com/tagatac/bagoup/blob/86f9b32870d2127f3fd3e196cecfc24265cf8d87/write.go#L29 However, #29 removed `Close()` from the `OutFile` interface, collapsing `Stage()` and `Flush()` into a single function `Flush()` run prior to checking and adjusting the open file limit. **Related issue(s)**: Fixes #63 **Follow-up changes needed**: None AFAIK **Is the change completely covered by unit tests? If not, why not?**: Yes
I updated and am unfortunately having all the same problems BAGOUP RESULTS: |
Hmm, can you copy and paste the full error message, starting immediately after the results output you pasted above, and ending at the terminal prompt? It may be several lines, like this:
Note that I replaced the chat group name with |
I got it and will take a look, thanks! |
Just adding back an anonymized snippet from the error message for future reference:
From this error message, it does appear that we are still hitting the open file limit. Would you please paste the output of the following command?
|
Nevermind, I am able to reproduce this issue using the |
It seems like Go 1.19+ is reporting incorrect soft limits from the
We can use |
@sav5000 I think we are in business. I was getting the same error as you with v2.4.8, but it runs to completion successfully with v2.4.10. When you get a chance, please upgrade to v2.4.10, and let me know if you're still getting errors. Thanks again for the report! |
Ok it finally worked! There were still a few errors but that one file with all the question mark boxes was resolved, and all my other conversations showed up as well when they didn't before. Here is the log with an extra error at the bottom. Other than that there were not nearly as many errors as before. Most of them had to do with missing file names this time, which is fine. I am not sure why I originally decided to include "--include-ppa" and "--preserve-paths" in the command, since it could have been messing things up if the paths weren't there in the first place? Not sure how it works or what those tags even do, but I wonder if some more errors would resolve if I removed them. Anyway, this was a big relief to get working and download my messages again. Thank you!! BAGOUP RESULTS: |
Awesome, I'm glad it worked! Thanks for the update. Yeah, the |
Sounds good. Thank you so much again 🙏😁 |
all the convos exported perfectly except for one, which shows squares with question marks instead of text/words. Emojis show up fine, but all the text is question marks (see attached pic).
The program in Terminal ends with “Done” and then “Exit with code 1 due to network error: ContentAccessDenied.”
Originally posted by @sav5000 in #49 (comment)
The text was updated successfully, but these errors were encountered: