File cannot be created

Hi,
after a problem with firefox I had to reinstall my zotero. Trying now as Standalone (w Chrome), I keep getting this error-message:

"The file 'C:\Users\martheia\AppData\Roaming\Zotero\Zotero\Profiles\rbs1vpcc.default\zotero\storage\EG8VRGMG\s=jpo+jpca=home+jpct=home+affiliate=jpost+tmcoy=il+tmmet=0+tmrgn=02+cw=925+sw=1280+ft=13.180x90+params.styles=jp.3px.simpleframe+adid=ads.ear.1+tile=1303857668573' cannot be created.

Check that the file is not currently in use, that its permissions allow write access, and that it has a valid filename.

Restarting your computer or disabling security software may also help."

This is an office computer, so I guess it could possibly be some anti-virus or firewall issue (as I also see is suggested in other discussions) but I had no problem installing zotero and downloading my library at an earlier time. Have tried to restart program and browser.

marte
  • when exactly are you getting that message?
    The reason you're getting it is almost certainly because the filename with path is too long for Windows. Zotero should be handling this more elegantly, not sure why it doesn't in this case.
    You could try to see what is in that folder -- C:\Users\martheia\AppData\Roaming\Zotero\Zotero\Profiles\rbs1vpcc.default\zotero\storage\EG8VRGMG -- and consider just deleting it <i>from within Zotero</i>, i.e. not in your files system/Windows Explorer.

    An alternative would be to move your Zotero data folder to a location with a shorter filepath (that's a setting under advanced in the Zotero preferences and you'd also have to move the files in the data folder after changing that setting, so it may be a little more involved than you'd want it to be).
  • edited October 21, 2014
    That's exactly 260 characters, which is the Windows path limit, but I was under the impression (and our code assumes) that it was paths over 260 that weren't allowed.

    martehei, can you provide a Debug ID for the action (sync attempt?) that triggers this error?
  • for some reason two debug windows appeared, posting them both here:

    D824967465.

    D974155464.
  • Hmm, OK, so it seems like, at least on your system, 260-character paths are failing, not just >260-character paths.

    I've adjusted this in the latest 4.0 Beta for Firefox, so if you have Firefox handy you can install that (which will share your existing Zotero data directory by default), close Standalone, and sync once with that. Otherwise you can follow adamsmith's steps above to delete the attachment item in question from Zotero. (Or you could wait for 4.0.24 for Standalone. There's no beta version of Standalone at the moment.)
  • Ok, two immediate challenges on my behalf:
    I have looked in my zotero and cannot find the attachement there - or else I would be happy to delete it. I cannot make sense of that path, so I have no clue where to delete.

    I am trying to sync with firefox (its crash after an update was what prompted this whole new sync), but I keep getting the same response there - but with a different path name:
    message when trying to sync with firefox
    The file 'C:\Users\martheia\AppData\Roaming\Mozilla\Firefox\Profiles\37v44h1t.default\zotero\storage\CTU2GKM7\site=hdc+affiliate=ahdcmain+safhdc=sahdcmnnws+ch=national+pg=article+artid=1.314644+adsize=300x250+adpos=01+dcdivname=dclk_objects_06+tile=2059766589+usertype=1' cannot be created.

    debug ID for that failed operation is:
    D1988461014.
  • That's 4.0.23.1, not the beta.
  • Hi, working to sync via firefox har caused the same kinds of problems today.
    Working in 4.0.23.1.

    Debug ID
    D610027204.

    I know that you want me to delete the file from within zotero, but the path it lists is not familiar at all. And when I follow the parent directory that zotero shows me, this seems like a really weir folder - pictures and stuff that I have never added to my zotero library. Again, I know you want me to delete from within zotero - but since I can't figure out what folder it is referrjing to when it claims a file cannot be created I thought I see in the windows directory if there was any hint there as to where in my library the problem file was. I don't know if this makes it any easier for you to speculate what might cause the problem, but the file name suggest to me that something has been corrupted somewhere along the way. But I have no clue as to what to do to remove it, then. Suggestions?
  • To find that file in Zotero, in the Quick Search box select "All Fields & Tags" or "Everything" and search for CTU2GKM7 That will show you a file attachment (probably a Snapshot in this case) that you need to delete (you don't need to delete the item that this is attached to, just the attachment itself). Empty the Trash afterwards.
  • omg! I love you! It seems to work! thank you!
  • But just to be clear for others reading this thread, you didn't need to delete anything. adamsmith suggested that before I fixed this. As I said above, this should be fixed in the 4.0 Beta, so all you needed to do was install that over your existing version of Zotero for Firefox and sync once with that, and then you could switch back to 4.0.23.1. (That would also have let us know for sure that the fix in place works for your case.) In any case, the fix will be included in 4.0.24.
  • edited February 2, 2015
    I' having what seems to be the same problem

    When trying to sync a fresh zotero install I repeatedly get errors, like:

    The file 'C:\Users\Thomas\AppData\Roaming\Mozilla\Firefox\Profiles\3gg7yfz2.default\zotero\storage\2H572UTX\diggthis.js' cannot be created.

    Check that the file ...

    The file 'C:\Users\Thomas\AppData\Roaming\Mozilla\Firefox\Profiles\3gg7yfz2.default\zotero\storage\2H572UTX\mbox.js' cannot be created.

    Check that the file ...

    I had the error in the the most recent stand alone release of Zotero. Now i'm on the most recent beta (4.0.25-beta.r7+496d4c5) in firefox, as this was a suggested fix in another thread, and I'm still getting the errors. I choose not to reuse the standalone dir's when installing firefox beta version.

    Also tried disabling security software, running as administrator, etc. with no luck.

    When I open the parent dir of the culpritt file it apears that some files have been downloaded into the dir so it seems to be an issue with only some of the files.

    I'm on windows 7.

    Anyone?
  • I'd be very surprised if that's not due to security software.
  • Ok - I just disabled my firewall - I'll dig in and see if I can find some other some other blocking security process that I can disable.
  • Thanks adamsmith - you were right!

    I'm using Comodo for security and when I disabled antivirus, HIPS (whatever that is), 'autosandboxing', in addition to the firewall, the sync worked.
  • obviously you don't want to permanently disable your security software, though, so ideally you'd just find a way to whitelist Zotero.
  • Good point :-)
  • I've experienced the same issue. None of the solutions suggested have worked to date:

    I've disabled the antivirus software (Avast) and the firewall (Comodo); I deleted the directory and re-started the sync but it comes back with the same message after copying one or two files to the directory.

    Error Report ID: 2101555784
  • Since the file-length issues was resolved several versions back, this is pretty much always due to either security software or file permissions.
    Dan can take a look at the error report, but I'm not sure how much more he'll be able to tell:
    Something is preventing Zotero from writing to that directory.
  • Thanks, Adam:
    I tried again, this time re-booting and removing Avast from the startup menu and then exiting Comodo. The sync worked! I had previously killed both processes (generating the usual Windows warnings about lack of protection) but it must have still left something running that prevented Zotero writing to the directory. Given that these are commonly used security programs, I wonder if anyone has a suggestion on tweaking them to prevent them from blocking Zotero?
  • edited March 4, 2015
    I'd focus on Comodo, since we've never heard about this with Avast (and since the OP also mentions Comodo). I unfortunately don't know enough about Comodo to tell you--maybe andersbc figured something out? Otherwise, contact their support and ask them?
    If I had to guess, I'd say it's the .js files that Zotero syncs as part of snapshots. Preventing a program from saving javascript files on your harddisk is not an unreasonable precaution in general.

    If you do find a solution, it'd be great if you could post back here.
Sign In or Register to comment.