Which version of PhantomJS are you using? 1.7.0 for Windows stock from the web-page.
What steps will reproduce the problem? Run PhantomJS against a web server with a slightly malformed GZIP response stream (attached a sample VS 2010 project hooking into IIS Express 8.0 that demonstrates this problem) and watch PhantomJS fall over itself every now and then. I think this is because of two distinct WebKit related bugs:
1) https://bugs.webkit.org/show_bug.cgi?id=58727 2) https://bugreports.qt-project.org/browse/QTBUG-16022
But both of them seem to be fixed, so not sure if they are truly related.
I've attached a Visual Studio project which demonstrates the problem. I've configured it such that the server (IIS Express must be installed as well) sends back GZIPped content if the "X-Test-Runner" request header is not present and send back GZIPped content if the "X-Test-Runner" request header is present. When the content is GZIPed, then PhantomJS will sometimes throw an "$ is undefined" exception but sometimes work correctly. When the content is not GZIPed, then PhantomJS will work correctly.
Sorry if this bug report isn't exactly the clearest, I've had a hell of a time tracking down the problem and if you need any further details please do let me know.
- PhantomBugs.zip 86.43KB
Comment #1
Posted on Dec 20, 2012 by Quick MonkeyOuch. PhantomJS 1.8 crashes!
Comment #2
Posted on Dec 20, 2012 by Quick MonkeyCrash dump attached. OS: Win 7 x64. IIS Express 7.5. Command line: testrunner.js http://localhost:62097/index.html true
Comment #3
Posted on Feb 16, 2013 by Grumpy Cameli know this is not a support forum... but a workaround would be to add headers on the request saying we can't handle gzip. is this easy to do?
Comment #4
Posted on Feb 16, 2013 by Massive BearFWIW, that is the workaround that we are using right now. You can just configure Phantom with a bogus custom Accept-Encoding header using the customHeaders object: ttps://github.com/ariya/phantomjs/wiki/API-Reference-WebPage#wiki-webpage-customHeaders (and sorry for the support forum-esque answer :)
Comment #5
Posted on Mar 16, 2013 by Happy HorseClosing. This issue has been moved to GitHub: https://github.com/ariya/phantomjs/issues/10930
Status: Migrated
Labels:
Type-Defect
Priority-Medium