Failed to load response data with Chrome on HTTPs

19,152

Solution 1

I was wrong, the issue was also appearing in Firefox.

I have found the root cause, it was due to the backend that uses a Kong cluster between the WebApp running in the web browser and the tomcat server that is located behind Kong.

An important things is that I'm also working in a DC/OS environment and between the WebApp and the Kong there's a marathon-LB !

Ok, the issue is the marathon-LB is dispatching the requests from the WebBrowser to one of the Kong from the cluster. Each Kong has its own self-signed certificate and as a consequence, the web browser gets responses from the same IP@ signed with different certificates (since each request is managed by a different Kong).

When I configure the Kong cluster with only one instance everything work well because it's always the same Kong that is responding and all requests are signed with the same certificate.

The solution is to configure the marathon-LB with a certificate and then only this one will be forwarded to the WebBrowser instead of the Kong certificate.

Solution 2

I guess it's due to using a self signed certificate,the newest Chrome Brower don't allowd trust self signed certificate,so your own certificate is not trust by chrome! You can into chrome://net-internals/#hsts in brower address blank,then delete 'localhost' in HSTS list.

Share:
19,152
sebastien
Author by

sebastien

Updated on June 04, 2022

Comments

  • sebastien
    sebastien almost 2 years

    I have some troubles to start my WebApp with Chrome (not always).

    My webApp is a simple Javascript App and it's loaded using HTTPs. The server providing the WebApp resources is using a self signed certificate that is not trusted by Chrome (same for Firefox...).

    When a user starts for the first time the WebApp (or after cleaning the Chrome's cache) using an URL like https://mywebapp:8443/ui the user gets a message that the website is not trusted (ERR_CERT_AUTHORITY_INVALID) but the user can continue (it's the expected behavior).

    Next, there's the issue: Chrome starts loading my webApp by getting the index.html and then the .css but it's unable to get the .js that contains the Javascript code of my webApp.

    In the Chrome Development tool, I can see the response of the HTTPs request to get the .js file is "Failed to load response data".

    I don't understand why there's this error with Chrome (it never happens with Firefox). Next, if I reload the page in Chrome, the WebApp is successfully loaded and displayed.

    I can reproduce this issue when I'm cleaning the cache in Chrome. If I'm not cleaning the cache the WebApp continues to work even after a Chrome restart.

    Can it be due to the self signed certificates? What can be the reason of this issue during the first start? Why it happens only with Chrome?

    Thanks for your help,

  • yuan zhu
    yuan zhu over 6 years
    something was wrong,delete your website domain in HSTS list. 'localhost' only be deleted when in local development environment
  • Tran Son Hoang
    Tran Son Hoang over 4 years
    I got same issue failed to load response data when I send a request to upload images on UAT which have web balancer for 2 servers. So Is it the same issue?