• Resolved positivit

    (@positivit)


    PDFs don’t show in Safari, Chrome or any mobile browsers I could check.

    Nginx Php-Fpm server, have added mjs to mime.types

    Got this in Chrome inspector –

    pdf_viewer.js:298 Uncaught (in promise) Error: The API version “5.3.93” does not match the Viewer version “5.4.449”. at new PDFViewer (pdf_viewer.js:298:13) at Object._initializeViewerComponents (app.js:544:41) at Object.initialize (app.js:266:16) at async Object.run (app.js:783:5)

    Any help welcome.

    Thanks.

    I tried downgrading to 2.2.3 which made things worse.

    Is this since last WP update?

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Thomas McMahon

    (@twistermc)

    This is a caching issue in your browsers I think. I tested the URL in multiple browsers with no issue. Try clearing your browsers caches. I’ll see if I can find out where this is happening and work around it.

    Thread Starter positivit

    (@positivit)

    Thanks Thomas,

    I did clear server, site and browser caches..

    Best regards.

    Plugin Author Thomas McMahon

    (@twistermc)

    I just pushed a new version to add cache busing to additional assets so that you shouldn’t have this issue in the future.

    Thread Starter positivit

    (@positivit)

    Great stuff Thomas,

    I can confirm the update is good in all my devices/browsers.

    thanks again..

    Version 3.01 works fine, but 3.02 does not!

    3.01 can work normally even without setting mjs, but 3.02 still cannot work properly with mjs set and cache cleared

    • This reply was modified 2 months, 1 week ago by zhangweibo.
    Plugin Author Thomas McMahon

    (@twistermc)

    Please provide a URL so I can see the issue on your site.

    https://guoxueyouke.com/download/bazi/534.html

    Please take a look. What’s the problem?

    Plugin Author Thomas McMahon

    (@twistermc)

    Somehow, you have two different versions of files. Message: The API version "5.4.449" does not match the Worker version "5.3.93".

    3.0 updated to PDFJS 5.4.456 which confuses me that you say 3.01 worked as there’s no way that should have worked.

    Here are some things to try:

    • If you have any caching on your site, please clear your caching.
    • If you’re using a CDN, clear the cache on the CDN
    • Delete the plugin and re-install it.

    There doesn’t appear to be any issues with the code that I can see at the moment. If there was, I’d expect a lot more people reporting issues.

    Let me know if any of those things work.

    No CDN, no cache (accessed with a new device), I also reinstalled it, but it still doesn’t work properly

    So I can only roll back to 3.01

    • This reply was modified 2 months, 1 week ago by zhangweibo.
    Plugin Author Thomas McMahon

    (@twistermc)

    I see it’s working now, but I fear it’s not really fixed. Did you roll back to 3.0.1 or how far back did you go?

    Your site says it’s running PDFJS 5.3.93 but in 3.0.x it should be running 5.4.456. Plugin version 3.0.1 and PDFjs version 5.3.93 should never work together.

    Do you have multiple PDFjs plusins installed? I see this in the source:

    https://guoxueyouke.com/wp-content/plugins/interactive-3d-flipbook-powered-physics-engine/assets/js/pdf.min.js?ver=4.3.136

    If so, that’s the issue. You have two plugins that integrate PDFjs and that will create issues.

    Rollback to 3.01

    There are indeed other PDF plugins installed called 3D FlipBook

    Thank you. If the problem is due to two PDF plugins, then I will try to solve it

    Plugin Author Thomas McMahon

    (@twistermc)

    This all makes more sense now, but fixing it is tricky. The underlying issue is that both plugins are loading Mozilla’s PDFjs library, and they both have the same global object. Thus, they are interacting in ways that neither plugin author took into account, as we didn’t think someone would be running two PDF plugins. I have some ideas on how to fix, but right now, I feel this is very edge case.

    Because before, we have been looking for plug-ins can CORS load pdf, so that pdf do not have to be saved locally, 3D FlipBook plug-ins can achieve this, but the display is not as good as PDF.js Viewer plug-ins, so that I’m very entangled, this time to find that the 2 plug-ins can not coexist, I can only give up a, but it takes quite a bit of time to replace. I hope our plug-ins can also realize the CORS function, so it would be perfect!

    • This reply was modified 2 months, 1 week ago by zhangweibo.
Viewing 14 replies - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.