xrefresh icon indicating copy to clipboard operation
xrefresh copied to clipboard

Unable to parse server JSON message

Open rahbari opened this issue 15 years ago • 8 comments

I have xrefresh server 1.3 and firefox extension 1.3. On css file modification it prints "Unable to parse server JSON message:" following by a JSON message but doesn't refresh.

rahbari avatar Dec 07 '09 17:12 rahbari

Win 7 Pro x64, FF 3.5.6, Xrefresh 1.3, Add-on 1.3, e Text Editor

I am having this issue as well.

Refresh works fine with other tested file types (RoR, HTML, PHP, JS).

achilles283 avatar Dec 22 '09 17:12 achilles283

Getting the same problem here in a RoR project.

Example: http://imgur.com/UfD6v.png

Vista 32, Firefox 3.6 beta 5, Firebug 1.5X.0b8, XRefresh 1.3

charlesroper avatar Dec 23 '09 10:12 charlesroper

I have the same problem here, the server generates invalid JSON as not all the backslashes in the file paths are escaped.

This is the output generated for my project by XRefresh Monitor 1.3 (parsed by Firefox plugin 1.4) on Windows Vista x64:

{ "date": "18-2-2010", "time": "9:04:18", "root": "M:\Webdev\belshof", "name": "Belshof", "type": null, "files": [ { "action": "changed", "path1": "styles\pirobox\style.css", "path2": null } ], "contents": { "styles\pirobox\style.css": "..." }, "command": "DoRefresh" }

The "contents" JSON element is where it seems to go wrong.

Otherwise excellent project!

hongaar avatar Feb 18 '10 08:02 hongaar

Same here.

And as hongaar said, the problem lies in "contents" field not escaping backslashes in css file paths (if that file was deeper inside configured Path in XRefresh)

yoyek avatar Feb 28 '10 23:02 yoyek

dirty fix: http://getsatisfaction.com/binaryage/topics/_unable_to_parse_server_json_message_dirty_fix

darwin avatar Mar 04 '10 23:03 darwin

I'm using this fix already, thanks!

But, it would be so much cooler to have it natively :)

yoyek avatar Mar 05 '10 00:03 yoyek

Unfortunately I'm not going to fix it anytime soon, because I've switched to Mac. And I pour all my spare cycles in TotalFinder these days.

One day I will get rid of WinMonitor and implement all in pure ruby. So also win people may run a ruby version. But it is quite a work ...

darwin avatar Mar 05 '10 00:03 darwin

Great.

So in the meantime maybe you can include this fix temporarily in source. This is not perfect solution, I know. But in contrast to error message it is at least a solution.

BTW, thanks for this great program. I'm using this all the time now.

yoyek avatar Mar 05 '10 00:03 yoyek