This is a solution to the issue that I faced today while installing a javascript file from userscripts.org as an extension into google chrome (Yes, Chrome supports installing greasemonkey javascripts as extensions). I had already installed this script once into my browser earlier but when I tried installing it again today, it started giving me a weird error “Could not read source file”. I tried all possible means, like putting it on a different server, installing from local disk, changing versions, deleting all cache, etc but still the issue persisted.
Finally looking into the source code of the chromium browser svn repository, I got a clue. What google chrome does when you install a script as installation is that it first downloads the script, then it calls a function ConvertUserScriptToExtension to convert the script into a google chrome compatible script and then installs it. Now, since I had already installed this script once, I found that the script was already existing in my downloads directory, so while downloading chrome renames it to <file>(1).js (i.e., appends a number to it to distinguish from the original file). But it seems like that the path sent to the conversion function still uses the original name/path and it somehow finds that the older file is not the downloaded one but also doesn’t know which is the current downloaded one and hence fails with an error “Could not read source file”.
Solution: Pretty simple. Just delete the original file present in your download directory and then try installing the script and it will install fine



Thank you !! I had this problem with talk forum ignore script and i got very angry without ignore list. But now it works.
[...] Chrome Script/Extension installation error: Could not read source file [...]
I’m old and don’t understand computers. Where is my download directory ???
Thx !!
I use Debian and believe it was a bug in the last Linux version of Chrome. Thx a lot, I can continue to use this browser
Thanks a lot! It was head ake for me to solve the issue!
Maybe you also know why chrome don’t want to read head comments with @name, @version and @include if to compile js with google compiler jar utility (ofcouse I put comments back after compilation)?