mootools / mootools-core

MooTools Core Repository
https://mootools.net
2.65k stars 505 forks source link

creating 404 error for video preroll ad on adding just library. #2799

Closed ArmanGrewal closed 6 years ago

ArmanGrewal commented 6 years ago

Hi,

environment - windows/chrome Please refer below code-

<!DOCTYPE html>

JW version 8 test page

It is creating following error on just adding library reference. Can you please look, why library is trying to get something that is not present-

error - bridge3.198.2_en.html:438 GET http://imasdk.googleapis.com/js/core/undefined 404 (Not Found)

Thanks

swhiteman commented 6 years ago

This is neither relevant to, nor a bug in, the MooTools library.

As you can see by commenting out mootools-core.js, the error is in your JWPlayer library.

timwienk commented 6 years ago

Thanks for responding so quickly, Sandy!

swhiteman commented 6 years ago

I still leap at the chance to do anything Moo. 👍

ArmanGrewal commented 6 years ago

Thank you for quick response.

I am not seeing any error in "JWPlayer library". Are you seeing any error? I am only seeing "404" errors only adding library and it is slowing down video load.

timwienk commented 6 years ago

The JWPlayer library in turn loads other files, among which are several JavaScript files and somewhere along the way the file that's causing an error as well.

MooTools Core does not load any extra files, unless you tell it to, using Request.

The errors (404 or otherwise) you are seeing, are caused by what the JWPlayer is loading. It may not be JWPlayer's fault either (perhaps it's something of or about the video that doesn't exist?), but I'm afraid we can't quite help either way.

ArmanGrewal commented 6 years ago

Hi,

Sorry but I am seeing the errors only adding "mootools" library. You might need to check it local site(may be created by IIS / apache) If you see it just saving file as .html then you will see protocol errors not actual error. I have just included few lines of code from mootools/core/Core/Core.js-

Code: ```html JW version 8 test page
```

on commenting out following code, I am not seeing any console error - ('Array', Array, [ 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift', 'concat', 'join', 'slice', 'indexOf', 'lastIndexOf', 'filter', 'forEach', 'every', 'map', 'some', 'reduce', 'reduceRight', 'contains' ]); else it is showing four 404 errors and including whole library creating 20-30 errors. I have tried compact/ non compact. I am seeing same error. Thanks,
swhiteman commented 6 years ago

You must isolate the code in your JWPlayer script that is triggering the issue.

Perhaps JWPlayer is attempting its own extensions of native objects. Perhaps it has a bug in the way it uses ES5 Array functions. Perhaps there is an underlying implementation problem in MooTools, but this can't be known unless you show exactly where in the consuming code -- the code that uses the MooTools API -- the error is thrown.

Please use Markdown if posting code. If you have a running site that demonstrates the error, post the link. If you have more questions this would be better posted to the MooTools mailing list, not the bug tracker.

timwienk commented 6 years ago

@ArmanGrewal I've edited your message, so it's a bit more readable.

Either way - it's impossible to help you without being able to see what's actually going on. Like @swhiteman mentioned, a link to a working site (or JSFiddle) would help.

Since this is very unlikely to be a MooTools Core related problem, I agree with Sandy that it should be asked on the mailing list. Please take your question to https://groups.google.com/forum/#!forum/mootools-users if you still don't get it working.