• Resolved rwalsh456

    (@rwalsh456)


    Hi There,
    I am trying to display PDF’s to my website and it is giving me the following error:

    Setting up fake worker failed: “Cannot read properties of undefined (reading ‘WorkerMessageHandler’)”.

    Any assistance would be greatly appreciated.
    Many Thanks,
    Ryan.

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi Ryan,

    The Fake Worker error is due to a conflict with caching tools and the PDF Embedder scripts. Please check the following on your site:

    1. Make sure that you are using the most up to date version of the plugin (Free v. 4.6.4, Premium v. 5.0.2, and Secure v. 4.4.5).
    2. While you do not need to exclude the PDF Embedder scripts with the majority of caching tools, you do still need to make one settings adjustment in the caching plugin to disable inline or aggregation of JS files. Please see: https://wp-pdf.com/kb/setting-up-fake-worker-failed-error-message/. Your plugin settings may differ and it may be necessary to reach out to the caching plugin support if you can not find this setting.
    3. Once the plugin has been updated, flush the cache to remove the old cached scripts. It may also be necessary to manually delete the minified script (/wp-content/cache/min/4d856323b4cef963c578dd7bd482e037.js):
    4. Finally, clear your browser cache and reload the page.
    Thread Starter rwalsh456

    (@rwalsh456)

    Hi There,
    im not sure if it is important or not but it works on the Preview screen but when i open it up on an incognito window it is giving the error.

    Hi @rwalsh456,

    The scripts are still being cached and are not loading on the page. I noticed that you are using WP Rocket. There is a specific setting for that caching plugin provided in our FAQ: https://wp-pdf.com/kb/setting-up-fake-worker-failed-error-message/

    Thread Starter rwalsh456

    (@rwalsh456)

    Hi There,
    I don’t seem to have the “Remove Query Strings from static resources” option on my WP Rocket. When I disable the “Combine JavaScript files (Enable Minify JavaScript files to select) and clear the cache it works correctly and shows the correct PDF but it then breaks other elements of the website including the images on the homepage.

    Thanks,
    Ryan.

    Hi Ryan,

    You may not have the query strings settings, but your test to disable the combine JS files confirms that the scripts are being cached.

    While it is not normally needed to exclude the scripts, I would recommend that you exclude those. Once you click the Minify box and see the Combine checkbox, below that is a field to Exclude JS files from the minification/concatenation processes. Depending on which version of the PDF Embedder plugin you are using (free vs. Premium vs. Secure), the file path will differ for what you enter here. Please see:

    Thread Starter rwalsh456

    (@rwalsh456)

    Hi There,
    I have copied the following text and pasted it into the ‘Excluded JavaScript Files’ section of WP Rocket.
    /wp-content/plugins/pdf-embedder/js/all-pdfemb-basic-4.6.4.min.js,
    /wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.min.js,and
    /wp-content/plugins/pdf-embedder/js/pdfjs/pdf-4.6.4.worker.min.js

    When i then clear the cache, nothing has changed. I have Minify JavScript Files and Combine JavaScript files selected.

    Perhaps i am going wrong somewhere,

    Any help would be appreciated.
    Thanks,
    Ryan.

    Hi Ryan,

    There is another error showing up in the console related to a “player” (Vimeo player API?). I would recommend resolving that error as well as errors in one JS-dependent element can cause cascading errors to other JS-dependent elements.

    Hello,

    Hello, thanks for posting information on how to upload a pdf and have it seen in other browsers other than Chrome and mobile too. After working on this for hours and using plugins like pdf embedder, it turns out that I looked on another site I was using which had Astra as the Theme. It worked fine. It is the 2022 Theme that isn’t working.

    When I switched from 2022 to Astra, it worked fine. Maybe this will help somebody.

    Thanks again.`

    Thanks for sharing your findings @doughall222. I will get this passed on to the developers for further investigation.

    Thread Starter rwalsh456

    (@rwalsh456)

    Hi @wppdfsupport, Im not sure what the Vimeo player API is and moreover what the issue is. Is there any guidance you could give on this?
    Thanks,
    Ryan.

    Hi @rwalsh456,

    The “player” error is what showed up in the console tab when viewing the page.

    Have you reached out to WP Rocket support since the issue has to do with caching. They may have some additioanl suggestions for their plugin settings that we are not aware of which could be helpful in your case.

    Thread Starter rwalsh456

    (@rwalsh456)

    Hi,
    Where can i contact WP rocket support?
    Thanks,
    Ryan.

    Hi @rwalsh456,

    You can contact them through their website: https://wp-rocket.me/support/

    Hi!

    I had the same problem with WP Fastest Cache, disabling JS combine (footer) solved my issue.

    Thx for the tip!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Error on PDF’ is closed to new replies.