arkokoley/pdfvuer

The API version 2.5.207 does not match the Worker version 2.7.570

oddvernes opened this issue ยท 7 comments

It looks like there is a version mismatch between the pdfjs compiled in pdfvuer.umd.js and the pdfjs that gets installed as a dependency.
pdf.worker.js (which is loaded from the dependency) checks the version number in the message (from pdfvuer.umd) and throws an error.

Pinning the pdfjs dist works as a stopgap "pdfjs-dist": "2.5.207",

@micimize @oddvernes thank you for mentioning this. I'll pin the pdfjs-dist version going forward.

@arkokoley I guess that would work but I think ideally it would just be vendored

Just installed "pdfvuer": "^1.8.3", and while trying advanced example I get error:

UnknownErrorException {
message: "The API version \"2.5.207\" does not match the Worker version \"2.8.335\".", 
name: "UnknownErrorException", 
details: "Error: The API version \"2.5.207\" does not match the Worker version \"2.8.335\"."
}
details: "Error: The API version \"2.5.207\" does not match the Worker version \"2.8.335\"."
message: "The API version \"2.5.207\" does not match the Worker version \"2.8.335\"."
name: "UnknownErrorException"
__proto__: Error

So I guess this corresponds to what you guys said. What version is not affected by this, so I can downgrade to it?

@Uraharadono I don't think you need to downgrade, try just pinning the dist like I mentioned above

Pinning the pdfjs dist works as a stopgap "pdfjs-dist": "2.5.207",

@micimize Hey Michael,
Thanks a lot for your help. I was tired today and I missed totally that I need to install pdfjs-dist , I figured that pdfjs is used internally for build of this library.
So, after installing both:

"pdfjs-dist": "2.5.207",
"pdfvuer": "^1.8.3",

It works now. Even with the URL that points to download Action on server.
Thanks a million times mate.

Thanks to @micimize @oddvernes for bringing this issue to notice. Fixed this as part of v1.9.1