Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Assetic:Dump --watch creates broken assetic_watch file on Windows #176

Open
ConneXNL opened this Issue · 2 comments

3 participants

@ConneXNL

Running "assetic:dump" works, but when i try to use "assetic:dump --watch" after some time it will generate the following error:

[ErrorException]
Notice: unserialize(): Error at offset 0 of 25019 bytes in D:\vendor\symfony\
assetic-bundle\Symfony\Bundle\AsseticBundle\Command\DumpCommand.php line 96

Clearing cache or running assetic:dump does not fix this problem.

I found out that deleting a file called "assetic_watch_876b12e" in C:\Users\%NameOfWindowsUserHere%\AppData\Local\Temp does fix the problem.

The contents of the file when the file is broken is a whole lot of spaces, most likely the size of the serialized array would be.

After i deleted the file in the local temp directory and ran "assetic:dump --watch" again it refreshes the file it contains a serialized array of assets.

I don't know when it exactly happends, but it has happened multiple times over the past months on different windows machines. I think it is best to add a Try and catch on the unserializing part, and consider the file as non existing if it cannot be unserialized.

@lmammino

Same problem under ubuntu... solved by deleting the analogous file under /tmp folder

@blaues0cke

Just for all the people that copy your path into Windows+R, this on will work: %LOCALAPPDATA%\Temp. Or the whole command:

del "%LOCALAPPDATA%\Temp\assetic_watch_*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.