Closed henrikengelbrink closed 7 years ago
It seems my script is freezing while loading the mails
As in you never see the output of this log? console.log("### Count: " + messages.length)
Where in your script do you stop seeing console log output?
This is the output in the console:
### Count: 635
154 Mails with Attachment - Last:45728
44558 - 2
44559 - 2
44560 - 7
Bestellformular.pdf
44561 - 2
44562 - 2
44563 - 8
44564 - 2
44565 - 2
44566 - 2
44567 - 19
44568 - 1
44569 - 1
44570 - 3
44571 - 2
If I comment out the parts.forEach-Method and everything in it, the script runs normally.
you might wanna try running your code under a debugger if you're having trouble figuring out where things are going into the weeds. Webstorm has one built in, or you can just attach something like Node Inspector.
That, or just add more logging! heh
I've tested it with node debugger, but the debugger throws no exception, the program stops without any errors.
Try setting some breakpoints in your code where the program starts to behave incorrectly. Inspect the variables to see if anything looks differently than you would expect in situations where it is supposed to save the file.
LMK if there's anything else I can do to help troubleshoot.
I have a problem with the email file attachment. When I open the downloaded attachment file will be empty as shown in the screenshot below
Hello, I'm having a problem fetching many mails with their attachments. It seems my script is freezing while loading the mails. Is it possible that nodeJS is to slow for loading the attachments for hundreds of mails ?
This is the code I'm using to fetch the mails and their attachments:
I hope somebody can help me. Henrik