2 Replies Latest reply on Aug 1, 2018 9:22 AM by George Labuschagne

    HTTP/2 PUSH broken on iOS and Mac OSX when running HTTPS TLS on WildFly 13 with Java EE 8 preview enabled.

    George Labuschagne Newbie

      Good day


      I was fortunate to get my immediate problem resolved by disabling HTTP/2 on WildFly 13. However, going foward we are migrating the application to JSF 2.3 fully as well as ensuring to stabilise on Java 11 LTS as the language future set. So getting the below to work out-of-the-box without having to disable HTTP/2 for Apple devices will be great. Hence the post.


      We are using WildFly 13 in Java EE 8 preview mode with TLS enabled for HTTPS


      However, since updating the POM file and a few places in the code itself, we are able to run JSF 2.3.5.SP1 with PrimeFaces 6.2.7 and OmniFaces 3.1 on all devices and browser combinations apart from Apple products without any issue.


      When connecting with a non Apple based device to the site in, there are zero warnings or errors in the log file, connecting over HTTPS via TLS from CA authority issued certificate.


      Connecting using an Apple based device fails to load the site correctly as the log file (relevant snippets included below) shows lots of resources failing to load. The weird thing is that this only happens with iOS (even on iOS 12 beta 3) and latest Mac OSX (don’t have older version of Mac OSX to test with). And it only happens when connecting to the HTTPS version of the site. Connecting to the HTTP version works 100% Disabling HTTP/2 resolves the issue for now 100% with zero warnings or errors to the logs.


      I logged this as a bug on Apple’s site but it is my personal opinion based on past experience that the chances of getting a speedy reply from Apple on this is slim.


      The error log starts with these long one line errors:


      2018-07-30 09:09:18,741 ERROR [io.undertow] (default task-3078) UT005085: Connection io.undertow.server.protocol.http2.Http2ServerConnection at 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


      It then iterates over all the javax.faces.resources, giving one long error line per resource as above.


      Then  it ends with long PrimeFaces warnings starting with:


      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


      This is followed by a stack trace dump from PrimeFaces.


      But like I said previously, this only happens when browsing via iOS or Mac OSX… CentOS 7.5 with Chrome latest and FireFox Developer Edition latest as well as Windows 10 with all browsers works 100% no warnings or errors.


      Kind regards,