phantomjs --version.What's your env variable QT_QPA_PLATFORM? It must be empty to run PhantomJS successfully.
No response. Closing.
$ echo $QT_QPA_PLATFORM
xcb
(not the original poster)
Shouldn't it be robust against existing environment variables ?
What's your env variable QT_QPA_PLATFORM? It must be empty to run PhantomJS successfully.

A workaround is setting the env variable for the single call:
QT_QPA_PLATFORM="" phantomjs myscript.js
@solvemon your workaround works. Shouldn't this be fixed in phantomjs?
The problem is that we compile PhantomJS statically, that means all dependencies (not in 2.5) will be compiled into a single binary (even Qt platform plugins). I already pushed the fix to master (https://github.com/ariya/phantomjs/commit/abd8ac58ea0a60482373df848d6b7928c722ca83)
@Vitallium Any idea when or if the fix will become part of a release? I just stumbled upon this issue the second time :-/
Most helpful comment