Failed to load response data with Chrome on HTTPs - javascript

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,

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.

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.

Related

how to get load my site from server without clean storage in browser console?

I am working on angularjs web application, after hosted web application to server then not working perfectly.
whenever clear the browser console then only my site working perfectly, and following error is there in my console
Failed to load resource: net::ERR_CONNECTION_RESET
If I login and logout from my site then hit the reload button then same problem only images are loading, So here again have to
clear the storage in browser console then it will work fine.
why it is happening, every time irritating me any other solution is there please help me.
Different ways to look into this issue :
start Chrome in incognito mode with extensions disabled (ctrl+shift+n) and see if your page works now. Note that by default all extensions will be already disabled in incognito mode unless you've specifically set them to run (via chrome://extensions).
Reference : https://stackoverflow.com/a/9590757/4116300
If you are requesting the resources over SSL it is likely the certificate is invalid. Either it is self-signed and has not been added to your browser/OS exceptions or it is otherwise invalid.
Try the URI directly in the same browser and inspect the certificate.
Reference : https://stackoverflow.com/a/22083823/4116300

Embedded Devices - Javascript Debugging

I work on embedded devices but am not able to install any software on them (e.g. programs like gdbserver are out). I need to monitor javascript events on those browsers. For example, if we run a web app on the EWB, the device it's on might have a keyboard pop-up. I need a way to see what triggers this event.
I am thinking along the lines of perhaps embedding something into the HTML or javascript that automatically reports any events back to a workstation somewhere.(I already have logs, but they are not live and it's difficult to pinpoint what happens - even beartailing them... wish I could have something like Firebug, but since it's embedded I can't)
Has anyone seen anything along those lines?
To get a debug connection to a web app or page running on a remote device:
Install vorlon using npm
Download ngrok
Start the vorlon server, the server port will probably be localhost:1337 and the following steps assume this
From a terminal/command prompt run ngrok with ngrok http 1337 and it should report an ip address for the other end of the tunnel, something like def01234.ngrok.io available via http and https.
Instead of the local script tag which vorlon suggests, use the remote ngrok address, e.g. <script src="https://def01234.ngrok.io/vorlon.js"></script>. ngrok exposes both http and https - as this is over the public internet I would strongly recommend using a secure connection.
Log onto the vorlon server on your local machine.
If the above test works you are going to want to do two more things:
Get an account at ngrok (or an alternative secure tunnel service) to get a fixed address.
Configure vorlon authentification according to the instructions on this page. By default it is insecure so ANYBODY with the exposed ngrok address could log onto the dashboard and mess with your embedded devices.

Safari SSL certificate issue and external javascript

My site is running on SSL. On one of the pages I am calling an external javascript required for integration of Birt iHub into our application. The iHub application is running separately on of o our servers and javascript also resided in same application. Now when I try to acces the javascript without SSL it is blocked as my site is running on SSL. So I also put the iHub app on SSL so tha my website communcate with javascript over SSL. Now it works fine for both Chrome, Firefox and IE but in case of Safari it worked for few days then suddely an SSL error shows up. I have delete the SSL certificates from cache and the access the site again and IT worked again but afeter some days same issue occurs. AndI have to delte it again to make it work.
Can anyone tell me whay this is happening and what could be done to avoid this

Samsung S4 - Default browser not loading webpage

We have developed a webpage which uses ssl hence https:// and it loads fine on all (*the ones we have tested so far) just fine...
however when attempting to load on the Samsung Galaxy S4 - it just shows "This web page is not available"
This is Samungs default browser (which apparently when conducting browser checks still shows as Chrome 18) - loading the site on the chrome browser (which comes installed by default) works fine.
So the question is what do we need to do for the device to load the web page.
Have you freshly installed SSL for that website?
When you install a SSL on your website (static IP from the server changes to the new IP in which you have installed SSL) So just wait for 24-48 hrs(Max) as it needs to propagate in all the dns servers. It is also a good idea in such cases to clear up your browser’s cache and try visiting your website

Javascript web application does not show certificate not trusted in Chrome

I have an application using https to do a jsonp call on my server which is self signed.
If I use the corresponding url in the Chrome address bar, then a warning is showing with 'The site's security certificate is not trusted!'. There the user can proceed anyway.
Now in my web application, there is no such warning and the request just remains pending indefinitely. I can see that in Developer tools. I would expect having something showing on chrome similar to the above behavior.
Chrome version is currently 25.0.1364.172.
Is this normal?
What should I do to address this problem?
Thanks!
Unfortunately this is normal. Try to browse via firefox, backup the Certificate and install it in Chrome again.

Categories

Resources