"Error when writing to file." when launching game [Solved]

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
saneman
Inserter
Inserter
Posts: 27
Joined: Fri Jun 27, 2014 11:49 pm
Contact:

"Error when writing to file." when launching game [Solved]

Post by saneman »

I had downloaded the zip, unzipped it onto my computer, and then ran it and created a world all in the same day. I come back today and when I launch factorio, it gets about to 50% and then says "Error when writing to file.". Can anyone tell me how to fix this.
Last edited by saneman on Fri Nov 04, 2016 3:07 pm, edited 1 time in total.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: "Error when writing to file." when launching game

Post by daniel34 »

In which folder did you unzip it and is that the whole error message?
You can try launching it as administrator, but that would just be a workaround.

Please also post a Log File.
quick links: log file | graphical issues | wiki

saneman
Inserter
Inserter
Posts: 27
Joined: Fri Jun 27, 2014 11:49 pm
Contact:

Re: "Error when writing to file." when launching game

Post by saneman »

I uploaded log file, and yes this is the entire message. in the window title it just says "Error".
I unzipped it to X:
Attachments
factorio-current.log
(1.82 KiB) Downloaded 106 times

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: "Error when writing to file." when launching game

Post by daniel34 »

Factorio takes a very long time to load, what are your system specs and what kind of drive is X? Factorio should be unzipped to a local HDD/SSD, or maybe an usb flash disk. Running it over a network drive can take a long time to load and can cause permission problems if it's setup wrong. Factorio needs write access to the directory.

It also shows errors when installing audio, not sure what that's about. Do you also have problems with sound in other programs/games?
quick links: log file | graphical issues | wiki

saneman
Inserter
Inserter
Posts: 27
Joined: Fri Jun 27, 2014 11:49 pm
Contact:

Re: "Error when writing to file." when launching game

Post by saneman »

The first time i unzipped factorio, i ran it and it opened in about a minute. When I came and tried to play it again after the next couple days, it was this slow and showed that error. the X: is an old 80gb disk drive. I have made all the folders in the factorio folder not read only in the properties of the factorio folder. the error still happens.

The processor is intel core i5-2520m
the ram is 4.00 GB
the system is 64 bit

saneman
Inserter
Inserter
Posts: 27
Joined: Fri Jun 27, 2014 11:49 pm
Contact:

Re: "Error when writing to file." when launching game

Post by saneman »

Even running as administrator, or changing all files and folders to be under full control for my account, it still has this error.
Also, I do not have problems with audio in other games.

I tried deleting the whole thing (i backed up my save file) and then downloaded the thing again and unzipped it again. And after i redid that, i put all permissions to full control for my account again and it doesnt work. Was there a file that factorio put somewhere that blocked it? because i really was able to play the game when i first initially unzipped it. I can upload the save file i have if you need.

saneman
Inserter
Inserter
Posts: 27
Joined: Fri Jun 27, 2014 11:49 pm
Contact:

Re: "Error when writing to file." when launching game

Post by saneman »

I attached the new factorio log and it looks like the audio isnt a problem anymore maybe from the permissions but i still get the error
Attachments
factorio-current.log
(1.47 KiB) Downloaded 97 times

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: "Error when writing to file." when launching game

Post by DaveMcW »

saneman wrote:the X: is an old 80gb disk drive.
Do you have any other drives you can test it on? Sounds like it might be a failing hard drive.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: "Error when writing to file." when launching game

Post by posila »

Does "X:/Factorio_0.13.20/crop-cache.dat" exist? If so, make sure it is not read-only. Maybe delete it entirely.
Same for "player-data.json", "achievements.dat" and "X:/Factorio_0.13.20/config/config.ini". Those are files it might attempt to write into after start.

saneman
Inserter
Inserter
Posts: 27
Joined: Fri Jun 27, 2014 11:49 pm
Contact:

Re: "Error when writing to file." when launching game

Post by saneman »

I am able to play again for now atleast, created a map and everything and ran it a couple times.

What I did:
1. delete all of factorio
2. restart computer
3. re-download, re-unzip to same place but instead i put the .13.20 folder inside a folder named "Factorio"
4. ran the game and it worked fine.

I posted log to see if you can find where it was fixed.
Attachments
factorio-current.log
(1.87 KiB) Downloaded 104 times

Post Reply

Return to “Technical Help”