I'm getting this error when trying to open a webpage that is on the same server as the PhantomJS code. PhantomJS can open any other webpage (ssl or not) but won't open any webpage that is on my server. I always get this error and there is very little information, actually none, what "Socket operation timed out" means for PhantomJS.
I'm running CentOS 6.6 and PhantomJS 1.9.8. I tried a few PhantomJS versions already, including the latest 2.1.1 and I'm getting the same error.
The dev version of my app runs perfectly on Ubuntu 14.04 but doesn't seem to work on my production server.
I did have some luck opening webpages on this server working from another server (remote access, essentially).
Is there anything on my server (that is just running Wordpress) that can be blocking PhantomJS? The only thing I can think of is the fact I have SSL installed, but non-SSL pages also don't work.
I've tried command line and both php-phantomjs and wkhtmlpdf and always get a 408 error, unless I try another webpage that has a different IP address (google etc).
Any clue on what might be the problem?
In my case i try to get page as picture with phantomjs on same machine. I put 127.0.0.1 mysite.app in /etc/hosts. I am running laravel homestead.
I try all possible combination of options with 1.9, at the end I have realised that there is something wrong with version 1.9, because when I have switched to version 2.1.1 status 408 gone and everything forks fine.
Try changing the default user agent used by PhantomJS
Related
I am running a Flask web app on localhost, for development. I do a Ctrl+F5 (after I have made a change to JS or CSS). Once in 3-4 such instances I get ERR_CONNECTION_RESET errors in the Chrome console, for SOME of the external JS/CSS (Bootstrap, Jquery etc) that I am fetching from CDNs. But there's no pattern to it. I am getting this from MaxCDN, cdnjs.cloudflare.com, and code.jquery.com, but not all at once.
Some of these errors are:
GET https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css net::ERR_CONNECTION_RESET
GET https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff2 net::ERR_CONNECTION_RESET
GET https://code.jquery.com/ui/1.12.1/jquery-ui.js net::ERR_CONNECTION_RESET
I am getting similar issues in Firefox:
Loading failed for the <script> with source “https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js”.
This is happening only on my laptop. On another laptop, running the same code on that laptop's localhost, and accessed and hard refreshed through that laptop's browser works fine.
This issue started occurring only recently after I reinstalled Windows on my laptop.
I looked at some of the other questions on SO such as this, but that didn't help.
I'm using Typescript and React on the client side, C# and ASP.Net Core on the server side and JetBrains Rider as IDE. Today suddenly the function "console.log()" doesn't print anything on the development page (localhost) (example
). But on the other pages it works as usual (example). What could it be?
The problem was in IDE, I reinstalled it and now the error is gone.
I want to try a WebSockets and I found this artcile on the internet Using WebSocket in .NET
I am sure that I did every step properly, I enabled WebSockets in IIS, I wrote all clases which are mention in article, I register HTTP Handler in web.config etc.. but when I want to try it I still get exception:
WebSocket connection to 'ws://localhost/CodeProjectWeb/WSHandler.ashx' failed: Error during WebSocket handshake: Unexpected response code: 404
I know that 404 probably means that URL is wrong, but how can be wrong? Some additional info: I am running on windows 10, IIS 10.0 Express, .NET 4.6, Visual Studio 2013, I tried it on Google Chrome, Firefox (both last versions).
To be honest, this is not first tutorial which I tried. I already tried antoher 3-4 articles about WebSocket in .NET, also I tried use SignalR but still with the same results. I just dont know, I think that I am missing some important little thing..
If you need some more information just ask but I hope I write everything
I finally figure it out (probably). I have to turn off Windows Firewall to make it work. So if you have similar problem just be sure that your Firewall is turn off.
I have JBoss wildFly 8.2 Up & Running on a windows machine with my war file deployed.
but my web page not able to load JS file and it shows error message in the web console as follows:-
"Failed to load resource: net:: ERR_CONTENT_LENGTH_MISMATCH"
I dig into the issue and found that server not able to load actual file size.
my js file is about to 90kb but server load 18kb and failed to load js file.
how to resolve this issue.
is this a Jboss configuration issue or Chrome issue.
please help me out.
I don't think it is related to jboss. I had the same issue of "net:: ERR_CONTENT_LENGTH_MISMATCH" when I was receiving a huge response in an ajax callback. It was working absolutely fine on Firefox and IE but the console error was there on chrome. Because of this the response was not loading on the UI. After further research I got to know, that Chrome was throwing this error for a special character i.e. "Æ" which was part of my json response body content. However, IE and Firefox were not having any complaint about this.
I corrected the DB value and removed the above special character from the server end. Everything started working fine on chrome as well.
My suggestion to check the body response you are sending from server end. It could be server side fix.
Regards,
Manoj
I've run into this repeatedly on different deployments, same issue every time.
I'm running nginx inside Ubuntu, on a vagrant box (ubuntu/trusty64). JS files never fully send. If I cat the files on the box, the entire content is there, but when I check (with chrome web dev tools) the content of what the browser receives for that file, it stops long before the end.
I don't know if this is an IDE (PHPStorm / WebStorm) issue, an nginx issue, ubuntu issue, or a vagrant limitation (I'm leaning towards either a PHPStorm/WebStorm issue, or an nginx issue... even though I've used the exact same nginx/site config on a non-Vagrant box and it seems to work fine).
Has anyone else run into this before or does anyone have any ideas?
Sigh. Of course I find the answer right after posting the question.
I found the answer in: JS and CSS files in vagrant not properly encoded when saved outside of the VM
Comment by adwww: "Same issue on Nginx with OS X as host. Again, setting sendfile off; in nginx.conf fixed this."