Search code examples
angularjswebsocketphantomjsprerender

Phantomjs not rendering Angular + Websockets page


Running into a situation where some complex pages (complex in terms of nested views) are not rendering at all in Phantom (using http://prerender.io) I'm using:

Phantom 1.9.8
Websocket 1.2.0
Angular 1.3.1

I think it's an issue with websockets because the pages I've tested that don't rely on sockets seem to load fine but when I tried forcing 'transports': ['polling'] it still didn't load over ajax.

I'm wondering if there's a headless browser that can overcome any websocket roadblocks


Solution

  • You would need to compile PhantomJS 2.0 since 1.9.8 does not support websockets. We are running a compiled PhantomJS 2.0 in production for https://prerender.io so you could try just using our production server pointing to a public staging server of yours.