• Plugin Author Thomas McMahon

    (@twistermc)


    If you just updated to PDFjs 2.2, and it’s no longer working, there’s a good chance your host needs to add support for JavaScript modules (mjs) files.

    To do this, you can try one of the following.

    • Add AddType application/javascript .mjs to your .htaccess file if you’re on an Apache server.
    • If you’re on a nginx server, open your mime-types.conf.hbs file and update application/x-javascript js; to application/x-javascript js mjs;
    • Contact your hosting support and ask them to add a mime type support for mjs files.

    I’m sorry for the headaches this change is causing. Unfortunately, this plugin is just a wrapper for Mozilla’s PDFjs, and they started using mjs files, which means we have to too.

Viewing 7 replies - 91 through 97 (of 97 total)
  • @twistermc yes, it works great!

    2.2.1 works for me, except of the Macos Safari Browser.

    Plugin Author Thomas McMahon

    (@twistermc)

    I tested on MacOS Safari 17.6 and mine works fine. Can you share a URL?

    @twistermc, i am sorry. The strange things are happening here. Yesterday it was not working in Safari on two macbooks and today it is not working in Chrome on one of them and in Opera on the other one. It works on all browsers of Windows PCs, I have tried. It must be some cache magic here.
    But anyway, my url is https://hlinna.cz/2024/08/15/prehled-oprav-asfaltovych-povrchu-a-mostu-rsd-rok-2024/ There ar most of the articles using your plugin on that website.
    Hope it will stabilize soon and thank you for the plugin.

    luhas-wp

    (@sahulap)

    @twistermc, oh, no. It’s back. Not working in Safari on Macbook.
    e.g. here: https://hlinna.cz/uredni-deska/kontrola-cisteni-a-revize-spalinovych-cest-2024/

    [Error] ReferenceError: Can’t find variable: require
    (anonymní funkce) (viewer.js:5179)
    webpack_require (viewer.js:42)
    (anonymní funkce) (viewer.js:299)
    webpack_require (viewer.js:42)
    (anonymní funkce) (viewer.js:119)
    webpack_require (viewer.js:42)
    Kód modulu (viewer.js:107)

    Burt

    (@burt)

    Tested Chrome 127.0.6533.120, and Safari 17.6 on a MacBook Pro (14″, 2021) running macOS 14.6.1 (Sonoma). No extensions in Safari. 1Password, uBlock Origin loaded in Chrome.

    Both pages listed by @sahulap above loaded fine without any related console logs.

    Also just tried Chrome 127.0.6533.73, and Safari 16.5.1 on macOS Ventura using BrowserStack. The content loaded fine in the Chrome browser. In Safari, the PDF viewer chrome loaded, but not the PDF itself. Error in console is:

    [Error] TypeError: Promise.withResolvers is not a function. (In 'Promise.withResolvers()', 'Promise.withResolvers' is undefined)
    Module Code (viewer.js:12202)

    @sahulap What versions of macOS and browsers are you using?

    • This reply was modified 7 months ago by Burt.
    luhas-wp

    (@sahulap)

    I am sorry and thank you so much for the follow up @burt . Chrome looks OK now but Safari still doesn’t load documents.
    I am also using Safari 17.6 on a MacBook Pro (14″, 2021) running macOS 14.6.1 Sonoma. It must be some cache or adblock issue, because if I open the page in anonymous window, everything works fine.
    So I consider this issue as closed and thank you so much for your assistance.
    And I also want to thank you @twistermc once again for the plugin development. It is a great tool.

    • This reply was modified 7 months ago by luhas-wp.
    • This reply was modified 7 months ago by luhas-wp.
Viewing 7 replies - 91 through 97 (of 97 total)
  • The topic ‘?? PDFjs 2.2 Not Working?’ is closed to new replies.