When I use PDF.js open a chinese document in chrome, part of contents in some pages are missed. the console tells "The provided value 'moz-chunked-arraybuffer' is not a valid enum value of interface XMLHttpRequestResponseType."(webL10n/l10n.js,L829) and "The provided value 'moz-chunked-arraybuffer' is not a valid enum value of interface XMLHttpRequestResponseType."(pdf.worker.js,L1649), the chrome version is 43.0.2357.132.
This should have been fixed by #5531 are you using a pdf.js newer than that?
I can conform the moz-chunked-arraybuffer
warning is happening on the demo viewer on Chrome 44.0.2403.125 OS X 10.10.4
pdf.worker.js:1649 The provided value 'moz-chunked-arraybuffer' is not a valid enum value of type XMLHttpRequestResponseType.
However it is merely a warning Chrome displays during feature detection and doesn't indicate any sort of error.
@CodingFabian the feature detection bit still occurs if MINIFIED
or GENERIC
build targets are used:
https://github.com/mozilla/pdf.js/pull/5531/files#diff-e69d6af4eecbb05621622f83e6563b4cR78
Wait, why this is closed? I'm still getting the warning
The provided value 'moz-chunked-arraybuffer' is not a valid enum value of type XMLHttpRequestResponseType.
on Chrome 44.0.2403.130 (64-bit) with pdf.js 1.1.377.
Waity, why this is closed?
See #5531
I'm using pdf.js-dist 1.1.377 and still get this warning. I'll debug this in a bit.
You will get the warning but only once -- it will feature test ability to load data in chunks.
I understand. I guess it's all working as expected then, and everyone can ignore the warning. It's really quite funny though that there should be one.
There seems to be a lot to discuss, I reopen it. Sorry about what I've done.
@qingzhengzhuma I think it's fine to close this issue. We still have a warning here (which I would consider an issue indeed), but we're looking at https://github.com/mozilla/pdf.js/issues/6126#issuecomment-130462101 as a possible fix, we can discuss everything over there.
Any updates on this warning? im still getting it...
@lenichols This was fixed in #5531. Which version of PDF.js are you using?
I am using Pre-built v1.3.91 and also getting the warning
I also can see the warning on chrome on the demo page http://mozilla.github.io/pdf.js/web/viewer.html
Ah, that is right. There is no warning in the Chrome extension, because that code is removed during the build. But it is present in a generic build because it is not known upfront Firefox, or some other browser is used. Just ignore that warning.
I'm using v1.4.124 of pdf-dist from npm, and the warning The provided value 'moz-chunked-arraybuffer' is not a valid enum value of type XMLHttpRequestResponseType.
appears in Chrome console every time I render a page. I'm still in the middle of getting my document viewer to work, but I don't think it's related to any problems. I'm just here to whine that it's an annoying message. :weary:
getting same warning with v1.4.131.....
@timvandermeij This message seems to bother a lot of people. Should we add a simple conditional check for Chrome (e.g. !window.chrome && ...
)?
@Rob--W I agree that the message is not ideal. We want to avoid browser-specific code in the src
folder as much as possible, but if there is no other way then I guess we have to go for it. You can always submit a PR and see how other developers think about this.
Working version of @Rob--W's suggestion which prevents the warning.
pdf.worker.js - line: 8769
- var supportsMozChunked = (function supportsMozChunkedClosure() {
+ var supportsMozChunked = !(typeof navigator !== 'undefined' && /Chrome/.test(navigator.userAgent)) && (function supportsMozChunkedClosure() {
I'm still getting this warning... Using chrome 53 and latest pdf.js beta
Still getting this warning on Chrome v55.0.2883.87
+1
+1
+1
+1
locking the conversation (mostly because of +1's)
Addressed by #8768
Most helpful comment
Working version of @Rob--W's suggestion which prevents the warning.
pdf.worker.js - line: 8769