MachinePublishers / jBrowserDriver

A programmable, embeddable web browser driver compatible with the Selenium WebDriver spec -- headless, WebKit-based, pure Java
Other
809 stars 143 forks source link

driver.get(url) -- just hangs #220

Open kuato781 opened 7 years ago

kuato781 commented 7 years ago

I have an application that works perfectly on my mac OSX but on our linux servers the driver.get(url) call just hangs, any advice?

Code snippet below:

` JBrowserDriver driver = new JBrowserDriver(Settings.builder() .timezone(Timezone.AMERICA_LOSANGELES) .ssl("compatible") .cache(true) .javascript(true) .headless(true) .userAgent(UserAgent.CHROME) .logTrace(true) .loggerLevel(Level.SEVERE) .build());

  driver.get(url);

`

same result with

<dependency>
        <groupId>com.machinepublishers</groupId>
        <artifactId>jbrowserdriver</artifactId>
        <version>0.17.1</version>
     </dependency>

and

<dependency>
        <groupId>com.machinepublishers</groupId>
        <artifactId>jbrowserdriver</artifactId>
        <version>0.17.0</version>
     </dependency>
kuato781 commented 7 years ago

With Dan's help I resolved this, thanks Dan!!

To see if you have the same issue make add this do your builder

.javaOptions("-Dquantum.verbose=true", "-Dprism.verbose=true", "-verbose", "-verbose:class", "-Dprism.useFontConfig=false")

Then run your app, when it hangs up look at your log files and if you see this error:

[2016-12-01T16:17:32.329][Instance 1][Port 38914] Error: JavaFX detected no fonts! Please refer to release notes for proper font configuration

If you do then add this to your builder (and remove the previous line or your log files will get huge)

.javaOptions("-Dprism.useFontConfig=false")