I ran into this JavaScript error: TypeError: 'undefined' is not an object (evaluating '__gChrome.suggestion.hasNextElement')
I have absolutely no idea where it came from or how it is reproduced. All I know is that it came from three different, unrelated (as in, different companies) people, months apart, all from different pages on our product.
__gChrome.suggestion.hasNextElement is not in our code anywhere so I think it's either a Chrome issue or an extension issue.
All the information I have about this is this (that I can show, the information that is omitted isn't useful anyways):
TypeError: 'undefined' is not an object (evaluating '__gChrome.suggestion.hasNextElement')
Function: send()
Rendering Engine: Mozilla
Browser: Netscape
Version: 5.0 (iPad; CPU OS 7_1 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/33.0.1750.21 Mobile/11D167 Safari/9537.53 (05200A98-5316-4F45-882D-7E55DB80E9D4)
Cookies: true
Platform: iPad
User Agent Mozilla/5.0 (iPad; CPU OS 7_1 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/33.0.1750.21 Mobile/11D167 Safari/9537.53 (05200A98-5316-4F45-882D-7E55DB80E9D4)
I have tried Googling it but can't find anything. Just curious if anyone has seen this or knows anything about it or can point me in the right direction.
Related
WHAT IS MY PROBLEM?
My website's live streaming player use hls.js. From my server's stat, there is many case where player get stuck in the middle of a buffered range.
Here is my server raw stat log(removed some useless params):
tm=2019-09-27 12:04:41`bufferLevel=8.447303999999974`currentTime=158.4`buffered=[6.024,166.832]`readyState=4`ua=Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36 QBCore/3.53.1153.400 QQBrowser/9.0.2524.400 Tencent AppMarket/4.8 GameCenter
currentTime is got by HTMLMediaElement.currentTime and buffered is got by HTMLMediaElement.buffered:
currentTime=158.4
buffered=[6.024,166.832]
readyState=4
From W3c:
If HTMLMediaElement.buffered contains a TimeRange that includes the current playback position and enough data to ensure uninterrupted playback:
Set the HTMLMediaElement.readyState attribute to HAVE_ENOUGH_DATA.
Playback may resume at this point if it was previously suspended by a transition to HAVE_CURRENT_DATA.
In this case, 613.3 is in the middle of [469.277,677.612], video should be progressing, but it is not.
Hls.js will periodly check currentTime has progressed every 100ms. if currentTime has not progressed for 1000ms, then hls.js will trigger STALL event and I will send a stall stat to server.
I cannot reproduce this problem on my side, it only appears on my server stat.
WHAT I'VE TRIED
shaka player has a module detect this case(https://www.ellealcatrase.eu/player2/docs/api/lib_media_stall_detector.js.html), Its comment shows that:
Some platforms/browsers can get stuck in the middle of a
buffered range (e.g. when seeking in a background tab). Detect when
we get stuck so that the player can respond.
but I cannot reproduce when my browser is in a background tab.
I'm trying to find out how to add headers to puppeteer js. I'm building something for the first time so I'm not familiar with this.
If set up my file with these, based on documentation but I'm not sure if I'm doing it correctly:
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36');
await page.setExtraHTTPHeaders({Referer: 'https://example.com/'});
Other than that tutorials that I've searched aren't adding the headers.
I want to add headers to replicate a real user in my case I’d like to replicate my browser as if I was using it manually. What is the correct way to do that?
This work for me, the english language is set by default when puppeteer visit the site.
await page.setExtraHTTPHeaders({'Cookie': 'language=en'});
In the browser you will find your data.
cookie on page
My company is hosting an ecom shop based on Infinity Shop System. Our logs say that there are HTTP calls to this path which lead to 404 errors since the file does not exist:
http://{domain}/{somePath}/skin/default/images/tb-collectingalarm-red-low_inject.png
However, this reference is not made by us as I cannot find this path in any line of our source code.
The logs also state that only (some?) Firefox users do this call:
User Agent Mozilla/5.0 (Windows NT 6.3; rv:35.0) Gecko/20100101
Firefox/35.0
So, since this does cause quite some 404 errors, does anyone know what could cause these requests?
We already followed the referrer URL which lead to one of our sites but within its html markup we could not find any reference.
I recently ran our website through our PhantomJS testing suite and ran into JavaScript errors that I can't reproduce in my browser manually. These errors are found in the Google maps api and the text returned by Capybara is as follows:
TypeError: Unable to delete property.
TypeError: Unable to delete property.
at :215
at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:19
at :214
at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:20 in cf
at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:21
at :176
at :31
at https://maps.gstatic.com/maps-api-v3/api/js/19/3/main.js:26 in Yf
at :178
Is this a known bug with Capybara, PhantomJS, or the Google maps API? Could the problem be caused by the user agent string in PhantomJS?
I'm using Cucumber / Poltergeist and I hacked around this in by creating the following extension:
/features/support/env.rb
Capybara::Poltergeist::Driver.new(app,
:extensions => ["features/support/ignore_gmaps_errors.js"]
)
/features/support/ignore_gmaps_errors.js
window.onerror = function(message) {
if (message == 'TypeError: Unable to delete property.') {
console.log('Ignoring gmaps error');
return false;
} else {
return true;
}
};
Google maps API experimental version was updated this morning (12/11) causing this breakage. By default when you include:
<script src="//maps.googleapis.com/maps/api/js?libraries=places"></script>
it uses the latest experimental version. Locking yourself to the latest release version:
<script src="//maps.googleapis.com/maps/api/js?v=3&libraries=places"></script>
should fix this.
Using the latest experimental version of Google Maps (v3.19), which includes a workaround, fixed this problem for me: https://code.google.com/p/gmaps-api-issues/issues/detail?id=7475#c20
[Edit] Google Maps v3.19 was released as the production version on 17 Feb 2015. Also, PhantomJS version 2 was released on 23 Jan 2015 incorporating an updated WebKit module which doesn't exhibit the Unable to delete property problem.
Try setting the user agent to
Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1
Google delivers JavaScript that is not entirely runnable with its default user agent. PhantomJS 1.x is based on a really old fork of QtWebKit which is comparable to Chrome 13 (the reason for that user agent string).
It looks like you can do this this way:
#session = Capybara::Session.new(:poltergeist)
#session.driver.headers = { 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1' }
This seems to only happen in Chrome (latest version 31.0.1650.48 m, but also earlier), but since it doesn't always happen it's hard to say for sure.
When streaming audio stored in Azure Blob storage, Chrome will occasionally play about 30-50% of the track and then stop. It's hard to reproduce, but if I clear the cache and play the file over and over again, it eventually happens. An example file can be found here.
The error is pretty much the same as what's described here, but I've yet to see the problem on any files hosted elsewhere.
Update:
The Azure Blog log only gives AnonymousSuccess messages, no error messages. This is what I get:
1.0;2013-11-14T12:10:10.6629155Z;GetBlob;AnonymousSuccess;200;3002;269;anonymous;;p3urort;blob;"http://p3urort.blob.core.windows.net/tracks/bd2fd171-b3c5-4e1c-97ba-b5109cf15098";"/p3urort/tracks/bd2fd171-b3c5-4e1c-97ba-b5109cf15098";c377a003-ea6b-4982-9335-15ebfd3cf1b1;0;160.67.18.120:54132;2009-09-19;419;0;318;7663732;0;;;"0x8D09A26E7479CEB";Friday, 18-Oct-13 14:38:53 GMT;;"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36";"http://***.azurewebsites.net/";
Apparently you have to set the content type to audio/mpeg3
Here's how I do it:
CloudBlockBlob blockBlob = container.GetBlockBlobReference(fileName);
blockBlob.UploadFromStream(theStream);
theStream.Close();
blockBlob.Properties.ContentType = "audio/mpeg3";
blockBlob.SetProperties();
From here: https://social.msdn.microsoft.com/Forums/azure/en-US/0139d27a-0325-4be1-ae8d-fbbaf1710629/unable-to-load-audio-in-html5-audio-tag-from-storage?forum=windowsazuredevelopment
[edit] - This didn't actually work for me, I'm trying to troubleshoot, but I don't know what's wrong, going to ask a new question.
This mp3 only plays for 1.5 min and then stops. When downloaded, the file plays fully...
https://orator.blob.core.windows.net/mycontainer/zenhabits.net.unsolved.mp3