buttons.html5.min.js is throwing error in Chrome browser Version 45.0.2454.85 m

buttons.html5.min.js is throwing error in Chrome browser Version 45.0.2454.85 m

devpatildevpatil Posts: 5Questions: 2Answers: 0

buttons.html5.min.js is throwing
Uncaught TypeError: ((d.URL || d.webkitURL) || d).createObjectURL is not a function in Chrome browser Version 45.0.2454.85 m

Answers

  • devpatildevpatil Posts: 5Questions: 2Answers: 0

    Its working perfectly in IE11.

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    Can you link to a page showing the issue please.

    Allan

  • devpatildevpatil Posts: 5Questions: 2Answers: 0

    //cdn.datatables.net/buttons/1.1.2/js/buttons.html5.min.js
    Line Number 4
    this js file throwing error called:
    Uncaught TypeError: ((d.URL || d.webkitURL) || d).createObjectURL is not a function in Chrome browser Version 45.00

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    I'm sorry I wasn't clear before. Please can you link to a page which shows the error so I can debug it. Using this example with Chrome 48.0.2564.116 I don't have any issues.

    I can't downgrade to Chrome 45 since they don't allow that.

    Allan

  • devpatildevpatil Posts: 5Questions: 2Answers: 0

    this example http://datatables.net/extensions/buttons/examples/html5/simple.html is working in Chrome 45. i have used the same online links for my page, PDF functionality is not working.

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    If the example on this site is working, I would need a link to a page showing the issue so it can be debugged. I've already asked for such a link twice in this thread. I don't wish to be rude, but I won't ask for it again.

    Allan

  • professorplumbprofessorplumb Posts: 1Questions: 0Answers: 0

    I came across this same problem and it's caused by overriding the URL variable at the global level. The buttons plugin uses the window.URL object and if you've clobbered it by declaring var URL somewhere in your project you'll get this error. Rename the variable to fix it.

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    Thanks for this insight - that's really interesting.

    There is a document.URL which is used by the file saving aspect of the exporting code. Interestingly there is also a global URL object, which I must confess I didn't know about, but that isn't used in the Buttons code. Having said that, I'm not sure what would happen to document.URL if you clobber the global URL.

    Overall, probably best to avoid writing to either.

    Thanks for posting this!
    Allan

  • edwinspireedwinspire Posts: 1Questions: 0Answers: 0

    I downloaded a template from https://github.com/puikinsh/gentelella that comes with DataTable pluggin works very well as far as I 've had, but also the message I get :

    buttons.html5.min.js is throwing
    Uncaught TypeError: ((d.URL || d.webkitURL) || d).createObjectURL is not a function

    and do not know how to solve it, the same goes for all browsers I 've tried.
    Someone can guide me to reach the solution of the problem?

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    I've not seen that issue in the examples on this site. Can you link to a page showing the issue please.

    Allan

  • jonalexjonalex Posts: 2Questions: 0Answers: 0

    Hi allan, I encountered the same problem.

    buttons.html5.min.js:4 Uncaught TypeError: ((d.URL || d.webkitURL) || d).createObjectURL is not a function

    the error is found on a localhost wamp server with chrome and Mozilla browsers.

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    Does it occur for you on the examples on this site? To be able to offer any help I really need to be able to reproduce the issue so I can debug it. Can you publish your example online please.

    Allan

  • jonalexjonalex Posts: 2Questions: 0Answers: 0

    Hi, On the example you gave all works perfectly but on implementing it locally on my Wampserver it sucks except on IE browsers.

    How can I put it online ?? for you to access

  • allanallan Posts: 63,161Questions: 1Answers: 10,406 Site admin

    JSFiddle, CodePen, JSBin or similar can be be used to create examples online if you can't host it yourself.

    Allan

  • samir.sahusamir.sahu Posts: 1Questions: 0Answers: 0
    edited May 2016

    I am facing this error as well. please share a solution.

    Update: Found the problem.
    I was using gentelella template and in custom js they used a variable URL. Modifying the name and its instances did the trick.

  • raul.cruzraul.cruz Posts: 1Questions: 0Answers: 0
    edited June 2016

    Thanks samir.sahu i have the same mistake

This discussion has been closed.