JDK-8162979 : Website weibo.com cannot be loaded
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u112,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-08-02
  • Updated: 2016-08-29
  • Resolved: 2016-08-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u112Fixed 9Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Website http://weibo.com cannot be loaded.
This is a regression: it can be loaded with JDK9 b113/b116, but cannot with b122 and above.
To reproduce: load http://weibo.com into Webnode.
Comments
SQE is ok take the fix in 8u112
29-08-2016

Critical Request for October 2016 PSU: - Fix for Release : 8u112 - Justification : The updated webkit introduced in 8u112 caused this regression which was found during manual testing. The root cause is that the Websql functionality which was previously disabled, was partially enabled when we updated to the new Webkit, but as it is not completely enabled, it caused the regression. - Risk Analysis : Very Low - Webrev : http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/3c10f272abc7 - Testing (done/to-be-done) : Ran a full integration test + tested the specific web page and various other pages - Back ports (done/to-be-done) : already fixed in 9 and backported to 8u-dev (8u122) - FX Impact : YES
29-08-2016

Changeset: 23e40d8adf8b Author: mbilla Date: 2016-08-28 22:55 +0530 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/23e40d8adf8b Test case will be added as part of JDK-8164914
28-08-2016

Seems safest, then, to use: #if 0 // FIXME ...
25-08-2016

I think it is not possible to use macros like PLATFORM(JAVA) or ENABLE(SQL_DATABASE) inside IDL files, but it will be great to have if it works :) +1
25-08-2016

I will defer to Murali & Guru as to how the code is commented out. As long as it works, and there is a "FIXME" comment, I am satisfied. As for the unit test, I agree that we should have one. Given the tight timeline for 8u112 it seems best to file a follow-on JBS issue for the test.
25-08-2016

I can confirm that Murali's patch fixes the problem. I tested on both Mac and Windows. +1
25-08-2016

Regarding Guru's comment, do you think adding back in a reference to a now-removed ENABLE flag is wise? Or might it be better to use test for PLATFORM(JAVA) ? Either way, I do agree that a // FIXME is needed. so something like this #if !PLATFORM(JAVA) // FIXME ... or #if 0 // FIXME ...
24-08-2016

[~kcr] In earlier webkit (164K), Websql feature is disabled and in current webkit (187K) feature is enabled by default (i mean feature flag is removed) and incomplete. Since currently websql feature is incomplete and other features like localstorage which will share some of the common functionality with websql also will not be working. So with the proposed fix, i dont see loss of functionality compared to 8u112-ea.
24-08-2016

[~mbilla] Is there any lost functionality as a result of the proposed fix? By this, I mean is there anything that works today in 8u112-ea that will stop working?
24-08-2016

webrev: http://cr.openjdk.java.net/~mbilla/8162979/webrev.00/ This webrev is a work around to mask the incomplete implementation of websql feature. In mini.js, if openDatabase call does not succeed and returns (here page loads successfully). So we disabled openDatabase as a workaround. if (!G.openDatabase) { _.status = -1; return; } ................................ $ = G.openDatabase(_.name, "", "", _.size); $.transaction(function($) { $.executeSql("CREATE TABLE IF NOT EXISTS " + _.tbName + " (key unique, value)"); }, function($) { _.status = -1; throw "SQLError:" + $.message; }); Since Proper implementation of websql features involves implementation of certain APIs like exceededDatabaseQuota, listDirectory etc.. we will address these API implementation as part of new enhancement (JDK-8164732)
24-08-2016

instead of "#if 0" use #if ENABLE(SQL_DATABASE) with // FIXME : WebSql is not currently supported or suitable note which was used until https://trac.webkit.org/changeset/178575 and removed completely. Adding Unit test case wont be difficult i.e assertEquals(webengine.execute('window.openDatabase') , "undefined"). Please raise a follow on bug for missing WebSql feature and link to this bug as "relates to".
24-08-2016

[ Investigation In Progress] Dumped the response data at URLLoader::AsynchronousTarget::didReceiveData by loading http://weibo.com to a file (attachment: weibo_dump.txt) and analyzing currently. Compared the wireshark http logs for 8u111 and JDK 9 webkit (attachments: http_logs_8u111.txt and http_logs_JDK9.txt) and below are the sequence of GET request and 200 OK. As per below info, 1st and 2nd GET requests are being sent in JDK 9, but 3rd and subsequent GET request is not initiated. Currently investigating whether cross origin/domain and navigation policy issues are causing this issue. 1) GET /visitor/visitor?entry=miniblog&a=enter&url=http%3A%2F%2Fweibo.com%2F&domain=.weibo.com&ua=php-sso_sdk_client-0.6.23&_rand=1470420239.3577 HTTP/1. HTTP/1.1 200 OK 2) GET /js/visitor/mini.js HTTP/1.1 Referer: http://passport.weibo.com/visitor/visitor?entry=miniblog&a=enter&url=http%3A%2F%2Fweibo.com%2F&domain=.weibo.com&ua=php-sso_sdk_client-0.6.23&_rand=1470420239.3577 HTTP/1.1 200 OK 3) GET /visitor/visitor?a=incarnate&t=bn3XWRaXZmeqza8W11oW5AHOd9PuPGFhWJpJltyD%2F7A%3D&w=1&c=095&gc=&cb=cross_domain&from=weibo&_rand=0.5231244147289544 HTTP/1.1 HTTP/1.1 200 OK window.cross_domain && cross_domain({"retcode":20000000,"msg":"succ","data":{"sub":"_2AkMg6VDnf8NhqwJRmP0QzWLgZIl-ygDEieLBAH7sJRMxHRl-yT83qkJftRAUPw_xmINbzCepFDRZuTwNYxuFAQ..","subp":"0033WrSXqPxfM72-Ws9jqgMF55529P9D9W5_y1AJc94MnEpYRc5m5WJo"}}); 4) GET /visitor/visitor?a=crossdomain&cb=return_back&s=_2AkMg6VDnf8NhqwJRmP0QzWLgZIl-ygDEieLBAH7sJRMxHRl-yT83qkJftRAUPw_xmINbzCepFDRZuTwNYxuFAQ..&sp=0033WrSXqPxfM72-Ws9jqgMF55529P9D9W5_y1AJc94MnEpYRc5m5WJo&from=weibo&_rand=0.9002046682871878 HTTP/1.1 HTTP/1.1 200 OK window.return_back && return_back({"retcode":20000000,"msg":"succ","data":null});
20-08-2016

Tested by reverting https://trac.webkit.org/changeset/173423 and issue is still reproducible. I referred GTK port and i guess we need to override below API in java port as well (similar to other ports) GTK: WebCore\platform\network\soup\ResourceResponseSoup.cpp CertificateInfo ResourceResponse::platformCertificateInfo() const { return CertificateInfo(m_certificate.get(), m_tlsErrors); } Currently we have default base class definition in webcore (\Source\WebCore\platform\network\ResourceResponseBase.h) , which does not initialize with relevant certificate. CertificateInfo platformCertificateInfo() const { return CertificateInfo(); }; and is not overridden in java port in Source\WebCore\platform\network\java\ResourceResponse.h.
10-08-2016

Debugging this issue... Looks like there is a issue with 302 Redirection (https://passport.weibo.com/visitor/visitor?entry=miniblog&a=enter&url=http%3A%2F%2Fweibo.com%2F&domain=.weibo.com&ua=php-). If i load directly weibo.com/login.php, then able to load the weibo.com page. Below is the cap log: GET / HTTP/1.1 Accept-Language: en-us;q=0.8,en;q=0.7 Accept-Encoding: gzip Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/602.1 (KHTML, like Gecko) JavaFX/8.0 Safari/602.1 Cache-Control: no-cache Pragma: no-cache Host: weibo.com Connection: keep-alive HTTP/1.1 302 Moved Temporarily Server: WeiBo Date: Tue, 02 Aug 2016 18:10:36 GMT Content-Type: text/html Transfer-Encoding: chunked Connection: close Expires: Mon, 26 Jul 1997 05:00:00 GMT Last-Modified: Tue, 02 Aug 2016 18:10:36 GMT Pramga: no-cache Cache-Control: no-cache, no-store Location: https://passport.weibo.com/visitor/visitor?entry=miniblog&a=enter&url=http%3A%2F%2Fweibo.com%2F&domain=.weibo.com&ua=php-sso_sdk_client-0.6.23&_rand=1470161436.9567 DPOOL_HEADER: leto59 Set-Cookie: YF-Ugrow-G0=5b31332af1361e117ff29bb32e4d8439;Path=/ LB_HEADER: venus244
08-08-2016

This issue is not reproducible on 8u111 and reproducible on 8u112.
06-08-2016

Tested on latest JDK 9 on windows and issue is reproducible.
02-08-2016