Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught (in promise) DataCloneError: Failed to execute 'postMessage' on 'Worker' #172

Open
anzemur opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@anzemur
Copy link

anzemur commented Jan 22, 2025

I am using Nuxt 3 with vue-pdf, and everything works as it should (I have it wrapped in the client-only component, and displaying the pdf and working with annotations works). The problem occurs when I try to call any function exposed in the vue-pdf composable, like print()or download(). The error I get seems to originate from pdfjs-dist:

Uncaught (in promise) DataCloneError: Failed to execute 'postMessage' on 'Worker': #<Object> could not be cloned.
    at MessageHandler.sendWithPromise (@tato30_vue-pdf.js?v=3690f757:8805:19)
    at WorkerTransport.saveDocument (@tato30_vue-pdf.js?v=3690f757:12765:32)
    at PDFDocumentProxy.saveDocument (@tato30_vue-pdf.js?v=3690f757:11595:28)
    at M (@tato30_vue-pdf.js?v=3690f757:22403:57)
    at doSomething (PdfViewer.vue:24:11)
    at callWithErrorHandling (runtime-core.esm-bundler.js?v=3690f757:197:19)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js?v=3690f757:204:17)
    at HTMLDivElement.invoker (runtime-dom.esm-bundler.js?v=3690f757:713:5)

Additional context

  • vue-pdf: [1.11.3]
  • vue: [3.5.13]
  • nuxt: [3.15.1]
@anzemur anzemur added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant