On a mediaelement.js audio player I'm getting NaN on the progress bar and in the 'duration' indicator, but only when viewed in IE 11, in Firefox 26 everything is okay. This seems to imply that it's not a server issue but other reports I've seen say that it is.
Anyone have any ideas, and if it is likely to be a server issue what is it that I need to look at (Apache server)?
The following code from #BiscuitBaker will reproduce this issue:
$('document').ready(function() {
$('video,audio').mediaelementplayer({
audioWidth: 440,
audioHeight: 30,
// The file contains an audio watermark, so I've set the volume to 0 as I don't want this to be seen as self promotion.
startVolume: 0
});
});
.container {
margin-top: 50px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Standard mediaelement.js files, unmodified -->
<link rel='stylesheet' href='http://beta.musicvine.net/wp-content/themes/theMusicVine/library/js/mediaelement/mediaelementplayer.css' type='text/css' media='all' />
<script src="http://beta.musicvine.net/wp-includes/js/mediaelement/mediaelement-and-player.min.js"></script>
<div class="container">
<audio controls src="http://beta.musicvine.net/wp-content/uploads/edd/2015/02/joyful-moments-adi-goldstein-preview.mp3"></audio>
</div>
This appears to be caused by an issue in Internet Explorer, where if the server does not respond with a Content-Length header, the duration property of the audio element is Infinity. You can see this by running the following code in developer tools console.
document.querySelector('audio').duration
Here is a screenshot of the response headers for you server.
However, if I substitute the audio URL with one from a server that responds with the Content-Length header, such as this one, it works correctly.
https://archive.org/download/TESTTEST_174/asdfasdfasdfdfdszadfdsa.mp3
Screenshot of headers for the archive.org file.
I've also double-checked by serving your file off my local server, and it worked when the Content-Length is supplied.
So your problem is apparently a server configuration issue. In fact, all response headers for static files on your website lack the Content-Length header. I don't know what would cause an Apache server to not include this header, perhaps a mod_headers rule, but that's the cause of your issue.
Related
I wrote a simple web scraper to scrape expedia.com. Using Java Selenium HtmlUnitDriver, i was able to successfully scrape data from the site if i run it locally.
However, when i deploy this on to an EC2 Server, it always returns me the page where expedia detected it as a bot, thus, it displays this captcha to prove a human is accessing it.
I think it might have something to do with ip address of ec2 servers which got blacklisted by expedia.com somehow?
I've tried scraping different websites where they don't care / don't do human test.
Any idea how to go around this?
Things I tried but still detected as bot:
Changing user agent to something i use on my local browser
Setting a proxy
Update:
Actually setting a proxy server gives me a different error:
Current URL is https://www.expedia.com/things-to-do/search?location=Paris&pageNumber=1
The htmlString:
<!--?xml version="1.0" encoding="ISO-8859-1"?-->
<html>
<head>
<title>
500 Internal Server Error
</title>
</head>
<body>
<h1> Internal Server Error </h1>
<p> The server encountered an internal error or misconfiguration and was unable to complete your request. </p>
<p> Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error. </p>
<p> More information about this error may be available in the server error log. </p>
<hr>
<address> Apache/2.4.18 (Ubuntu) Server at www.expedia.com Port 443 </address>
</body>
</html>
Are you covering these topics:
-Which agent are you using? Make sure you are using the same agent which you would use in a human navigation, more details in this link.
-Are you inserting waits in your navigation? If as soon as a page load you try to click or navigate, this isn't simulating a regular navigation. More details.
-Which driver are you using, there is a trick with chromedriver to rename a internal variable "cdc_" to other name like "aaa_" then if there is a javascript code in the server trying to detect this variable (cdc_), it will fail. More details.
-There are more things to be studied if you really need to not be detected by the server:
-Is there a honeypot in place?
-Are your IP (EC2 IP) already blocked? You could redirect using a VPN tunnel.
Interesting articles:
https://www.kdnuggets.com/2018/02/web-scraping-tutorial-python.html
https://antoinevastel.com/bot%20detection/2017/08/05/detect-chrome-headless.html
https://intoli.com/blog/making-chrome-headless-undetectable/
File name too long: [client {CLIENT IP ADDRESS}:58749] AH00036: access to
/wp-content,_plugins,_wp-file-upload,_vendor,_datetimepicker,_jquery-ui-timepicker-addon.min.js,qver==4.6+wp-includes,_js,_jquery,_ui,_sortable.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_tabs.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_accordion.min.js,qver==1.11.4.pagespeed.jc.zgb126SHUb.js
failed (filesystem path
'/home/{DOMAIN HOME DIR}/public_html/wp-content,_plugins,_wp-file-upload,_vendor,_datetimepicker,_jquery-ui-timepicker-addon.min.js,qver==4.6+wp-includes,_js,_jquery,_ui,_sortable.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_tabs.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_accordion.min.js,qver==1.11.4.pagespeed.jc.zgb126SHUb.js')
This strange error log has appeared a few times over the last few months and I can't make much sense of it.
It looks like the client browser is trying to access the url http://domain.com/wp-content,_plugins,_wp-file-upload,_vendor,_datetimepicker,_jquery-ui-timepicker-addon.min.js,qver==4.6+wp-includes,_js,_jquery,_ui,_sortable.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_tabs.min.js,qver==1.11.4+wp-includes,_js,_jquery,_ui,_accordion.min.js,qver==1.11.4.pagespeed.jc.zgb126SHUb.js
Which isn't in the HTML at all, however there is:
<script type='text/javascript' src='http://domain.com/wp-content/plugins/wp-file-upload/vendor/datetimepicker/jquery-ui-timepicker-addon.min.js?ver=4.6.1'></script>
<script type='text/javascript' src='http://domain.com/wp-includes/js/jquery/ui/sortable.min.js?ver=1.11.4'></script>
<script type='text/javascript' src='http://domain.com/wp-includes/js/jquery/ui/tabs.min.js?ver=1.11.4'></script>
<script type='text/javascript' src='http://domain.com/wp-includes/js/jquery/ui/accordion.min.js?ver=1.11.4'></script>
It looks like the client browser is trying to request all of these files at once by adding "+" between them in one url.
I've never seen this before and over the last month haven't been able to find anything on Google.
One of the the clients browser was Chrome on Android 4.4.
Any help would be greatly appreciated.
If i test this in my localhost the file it's embeded like it's expected, but once that the server goes public this message shows up in the console:
Load denied by X-Frame-Options:
http://x.x.x.x/app/resources/pdf/somePDf.pdf does not permit framing.
That file is stored in the same server so i'm not violating the cross origin.
i load the file with angular, but then again loading it with angular it's not the problem.
What is the cause of the problem?
Edit:
I added to the spring security 4 file these lines:
<headers>
<frame-options policy="SAMEORIGIN" />
</headers>
Still not working as intended.
NOTE: Turns out it's only a firefox thing, chrome and explorer are working fine.
I am using dojo1.7.2 I got firebug error: Uncaught ReferenceError: require is not defined
Here is my piece of code:
<script type="text/javascript" src="../js/release/dojo/dojo.js"
data-dojo-config="packages:[ {'name':'com','location':'/myApp/js/com'}], async: false, parseOnLoad: true, isDebug: true">
</script>
<script language="JavaScript" type="text/javascript">
require(['dojo/dojo', "dijit/dijit", "dojox/dojox"], function () {
require(["dojox/mobile", "dojo/parser"], function(mobile, parser){
})
});
</script>
Where did I wrong here? Thank in advance.
Could be an error loading dojo from the src you specified, as I don't know the folder structure, I can't tell.
<script language="JavaScript" type="text/javascript">
require(["dojox/mobile", "dojo/parser"], function(mobile, parser){
alert("hi");
});
</script>
Here's a fiddle of it working http://jsfiddle.net/P4bvs/1/
This outer require ( require(['dojo/dojo', "dijit/dijit", "dojox/dojox"] ) is not required , though not what is causing your error.
I just solved this problem. It is very very possible that my solution will not help since this problem can be caused by a lot of different things. I have my web site being served off of server1.blah.com and dojo is being served off of server2.blah.com. Normally the site is working fine. Then we got a new user and the site was not working well at all. I got the error in the web console:
ReferenceError: require is not defined
The problem was that both servers are using https, but there is no certificate. (This is an intranet application). So when you go to server1.blah.com it will ask you if you want to continue and add an exception. BUT! There is no exception for server2! So I had my new user navigate to server2.blah.com/blah/dojo.js and add the exception there. Now everything works! (Think about it. require in this case is coming from dojo. If you can't load dojo due to many possible reasons, the require function will not be defined)
Also, I'm not advocating this as a best practice by any means. Just set up your certificates!
Initially you need to check for the dojo.js file where it is located.
the ultimate thing you need to focus is where is your dojo folders are located and what is the location given at src tag ""
We got that same issue at work, just to let other people know that if you got that error
Uncaught ReferenceError:require is not defined at dojo.js:29
dojo.js:29
and you are using single-spa or importing a fixed version of SystemJS, like so
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.21.5/system-production.js"></script>
that may be the cause.
So having the production build was throwing this exception in development in our case, this was use for {mountParcel} with single-spa.
You can specify a non-production ready systemjs from index.html or use a better approach to don't have a that inject systemjs in your html.
I am recieving an error in https
HTTP Status 404 - /cas/login
type Status report
message /cas/login
description The requested resource (/cas/login) is not available.
Apache Tomcat/7.0.23
when i open the same link in http it gives an output (an unknown language)
<html>
<head></head>
<body>
<pre>???�?? </pre>
</body>
</html>
Why is it so...? Is this an server issue or script issue? I feel it as a Server issue?? If so please share a remedy for it...
"The requested resource (/cas/login) is not available." generally indicates that cas was not correctly deployed or Tomcat couldn't load it properly. Could you plz examine the contents of either the catalina or the cas.log files and report back?