Proxy Woes

78 views
Skip to first unread message

Jon Rowe

unread,
Feb 10, 2013, 1:46:56 AM2/10/13
to phan...@googlegroups.com
Hey All

I'm having some issues with PhantomJS 1.8.1 and proxies... Since upgrading form 1.7 to 1.8.1 proxy support seems to have stopped working....

I'm using Poltergeist (A Ruby driver for phantomjs) to integration test a phone gap application, as part of my setup I'm using a rack based server to proxy requests from PhantomJS.

This serves both the page contents and also traps any requests to my remote API.

I've setup the PhantomJS options like this:

  `--proxy=0.0.0.0:PORT --proxy-type=http --local-to-remote-url-access=yes --ignore-ssl-errors=yes`

with no joy and also tried

  `--proxy=http://0.0.0.0:PORT --local-to-remote-url-access=yes --ignore-ssl-errors=yes`

The symptoms of this are pretty silent, the server is never called by PhantomJS but it doesn't force any errors for page calls, I just get blank pages back. Any evaluated JS leads to DOM Security Errors which makes me think that the pages just aren't loading at all, and the blank pages Poltergeist is getting are "about:blank"...

Thoughts? Tips? Advice?

Please halp me :S

Jon Rowe

unread,
Feb 10, 2013, 5:05:56 AM2/10/13
to phan...@googlegroups.com
<le sigh> Ok. Some time later. This was caused by multiple factors of misconfiguration and the lack of helpfulness in the failure modes of both PhantomJS / Poltergeist.

At some point one or the other stopped interpreting local paths (e.g. visit '/page' in poltergeist, so I suspect this is a Poltergeist thang) and thus PhantomJS stopped serving them. What is not helpful though is the complete lack of failure in this mode. It would be helpful if JS execution against blank pages caused a proper error. :/

Sorry to bother you all.

James Greene

unread,
Feb 10, 2013, 8:46:28 AM2/10/13
to phan...@googlegroups.com

Interesting, thanks for the report. As always, though, if you fins a defect or think of an enhancement, please file an issue for it: http://code.google.com/p/phantomjs/issues/entry

Mailing list chatter alone will rarely get addressed with fixes.

~~James

--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phantomjs+...@googlegroups.com.
Visit this group at http://groups.google.com/group/phantomjs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages