Profile cover photo
Profile photo
Manuel Serrenti
172 followers -
Memento backuppare semper. merdam accadit.
Memento backuppare semper. merdam accadit.

172 followers
About
Posts

Post has attachment

Post has attachment

Post has attachment

Post has attachment

Post has attachment

Post has attachment

Bug in folder.createFile?

Hi, I'm using a (big)script to automatically scan a Gmail mailbox and save attachments in Gdrive based on arbitrary rules.
The script working as expected for more than 1 year, but today I've received a Script Error that's make me crazy to understand.

The error happens with a particular set of e-mail, thats' worked fine since yesterday; the attachments is a single file, under 20Kb, with this name "01_emailaddress@sub.domain.ext_PEC-Resync_2016_11_29__07.00_.log"
It's a log file in txt format, sent by an application running on my WinServer every 6 hours.
The script simply takes all the attachments within any mail coming from this server and archive it in GDrive.

Now, a receive an error that says "Invalid argument, row 312 in file AA-mail.gs"...
at this line the code is:
folder.createFile(attachment);

the folder variable is a folder object, i've double checked that's the ID is OK (i've an extensive logging in this script so i can check nearly everything); the attachment variable is the result of a message.getAttachments call, so there isn't nothing exotic or too complicated.

I think there's some bug or some changes in DriveApp that I've missed, but i didn't find nothing relevant in Google Developer Reference site...

Any idea from the "GAS Masters"? +Bruce Mcpherson,+Alan Wells +Romain Vialard

Thanks for any help!

Post has attachment
You saved my day! i've been stuck on this for 1 day, trying to apply MS patches, hotfix and so on.
Thanks!!!

Post has attachment

Post has attachment
Wait while more posts are being loaded