Search code examples
iosmacosprimefaceswildflyomnifaces

Site rendering broken on iOS and Mac OSX after moving to JDK 10 and JSF 2.3 with WildFly


Good day

Issue below is solved on WildFly 13 by disabling HTTP/2 (while still keeping TLS for HTTPS).

Even the non effected browser and system combos (all the non Apple stuff) seem to load much faster now.

Follow instructions from this post on how to disable HTTP/2:

https://developer.jboss.org/message/984394?et=watches.email.thread#984394

From the ./jboss-cli.sh cli just run:

/subsystem=undertow/server=default-server/https-listener=https:write-attribute(name=enable-http2,value=false)

And reload / restart the server. All devices render perfectly and fast.

I am leaving the below if somebody else runs into a similar error.

I updated my code and POM file to use the Java EE 8 dependencies for WildFly 13 based on the WildFly 13 BOM POM and the @Balusc JSF 2.3 Java EE 8 kickoff sample application.

So I set it to use:

  • JSF 2.3.5.Final
  • OmniFaces 3.1
  • PrimeFaces 6.2.7

On desktop (all operating systems with all of the latest browsers) the site works 100% and the war is deployed in half the time.

However the site fails to render correctly on my iPhone. I tried all browsers installable from the app store, and the one that looks the nearest to correct is Firefox.

However even with Firefox I can't get pass the login screen.

On Android and all non Apple based products the site works without any error logs.

Is anybody aware of issues rendering JSF 2.3 on Apple based products?

Any pointers on what to look for, add or change will be most appreciated.

See below for log file info:

The initial error only triggered from iOS / Mac OSX is an UNDERTOW error with OmniFaces info (we are using TLS for HTTPS, but before moving all to JSF 2.3 everything worked 100% with zero errors or warnings in logs)

2018-07-30 09:09:18,741 ERROR [io.undertow] (default task-3078) UT005085: Connection io.undertow.server.protocol.http2.Http2ServerConnection@7e55834 for exchange HttpServerExchange{ GET /edsnext/javax.faces.resource/omnifaces.js.xhtml request {accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], accept-language=[en-us], :authority=[edsnext.megchemsa.com:62543], accept-encoding=[gzip, deflate], :path=[/edsnext/javax.faces.resource/omnifaces.js.xhtml?ln=omnifaces&v=3.1], user-agent=[Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1], :scheme=[https], cookie=[JSESSIONID=U5X9u-A83bccAnpA1XUnEFzmngqI9iDJwuIiU_Qo], :method=[GET], Referer=[https://edsnext.megchemsa.com:62543/edsnext/], upgrade-insecure-requests=[1], Host=[edsnext.megchemsa.com:62543]} response {Expires=[Mon, 30 Jul 2018 09:57:18 GMT], ETag=[W/"5933-1532705069245"], Last-Modified=[Fri, 27 Jul 2018 15:24:29 GMT], Set-Cookie=[JSESSIONID=U5X9u-A83bccAnpA1XUnEFzmngqI9iDJwuIiU_Qo.edsnext; path=/edsnext], Content-Type=[application/javascript], Date=[Mon, 30 Jul 2018 07:09:18 GMT], :status=[200]}} was not closed cleanly, forcibly closing connection

Then the following PrimeFaces resource not found warnings (and login page is rendered incorrectly on iOS)

2018-07-30 09:09:21,056 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (default task-3091) JSF1064: Unable to find or serve resource, fa/fontawesome-webfont.eot, from library, primefaces.
2018-07-30 09:09:21,056 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (default task-3084) JSF1064: Unable to find or serve resource, fonts/lato-regular-webfont.svg, from library, primefaces-omega.
2018-07-30 09:09:21,056 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (default task-3082) JSF1064: Unable to find or serve resource, fa/fontawesome-webfont.ttf, from library, primefaces.
2018-07-30 09:09:21,056 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (default task-3100) JSF1064: Unable to find or serve resource, fa/fontawesome-webfont.svg, from library, primefaces.
2018-07-30 09:09:21,056 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (default task-3103) JSF1064: Unable to find or serve resource, fonts/lato-bold-webfont.svg, from library, primefaces-omega.
2018-07-30 09:09:21,056 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (default task-3091) : java.nio.channels.ClosedChannelException

EDIT: Added log file info pointing to UNDERTOW errors followed by lots of PrimeFaces missing resources.

EDIT 2:

Ok, I tested this with:

Server side:

  • CentOS 7.5 all updated
  • Oracle JDK 10.1
  • WildFly 13.0.0.Final
  • JSF 2.3.5.SP1
  • PrimeFaces 6.2.7
  • OmniFaces 3.1

The following setups renders the site perfectly with zero errors or warning at debug level:

  • CentOS GNOME 7.5 Chromium
  • CentOS GNOME 7.5 Firefox Developer Edition
  • Windows 10 Chrome
  • Windows 10 Firefox Developer Edition
  • Android Studio Nexus 5 AVD APK 28 Chrome
  • Samsung Galaxy S7 Chrome
  • Samsung Galaxy S7 Firefox

All browsers installable from the Apple app store including Safari fails to render the site. All have the UNDERTOW error.

Tested with Mac OSX - latest updated version - also fails with the UNDERTOW error.

I logged a bug report with Apple. Problem is though that a substantial amount of users are effected by this due to having to access the Web app via their iPhone or iPad.

What else can I do to expedite this?


Solution

  • To resolve this error disable HTTP/2 on WildFly 13 with:

    Follow instructions from this post on how to disable HTTP/2:

    https://developer.jboss.org/message/984394?et=watches.email.thread#984394

    From the ./jboss-cli.sh cli just run:

    /subsystem=undertow/server=default-server/https-listener=https:write-attribute(name=enable-http2,value=false)
    

    Restart / reload the server and all is well.