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

"The provided value 'moz-chunked-arraybuffer' is not a valid enum value... " #6306

Closed
qingzhengzhuma opened this issue Aug 4, 2015 · 27 comments

Comments

@qingzhengzhuma
Copy link

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.

@CodingFabian
Copy link
Contributor

This should have been fixed by #5531 are you using a pdf.js newer than that?

@xlc
Copy link
Contributor

xlc commented Aug 4, 2015

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.

#5531 only remove feature detection for Chrome and Firefox build but not generic viewer so it doesn't really solve the warning for generic viewer.

@existentialism
Copy link
Contributor

@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

@nschloe
Copy link
Contributor

nschloe commented Aug 12, 2015

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.

@yurydelendik
Copy link
Contributor

Waity, why this is closed?

See #5531

@nschloe
Copy link
Contributor

nschloe commented Aug 12, 2015

I'm using pdf.js-dist 1.1.377 and still get this warning. I'll debug this in a bit.

@yurydelendik
Copy link
Contributor

You will get the warning but only once -- it will feature test ability to load data in chunks.

@nschloe
Copy link
Contributor

nschloe commented Aug 12, 2015

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.

@qingzhengzhuma
Copy link
Author

There seems to be a lot to discuss, I reopen it. Sorry about what I've done.

@nschloe
Copy link
Contributor

nschloe commented Aug 13, 2015

@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 #6126 (comment) as a possible fix, we can discuss everything over there.

@lenichols
Copy link

Any updates on this warning? im still getting it...

@Rob--W
Copy link
Member

Rob--W commented Feb 29, 2016

@lenichols This was fixed in #5531. Which version of PDF.js are you using?

@andreilazer
Copy link

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

@Rob--W
Copy link
Member

Rob--W commented Mar 1, 2016

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.

@JanCVanB
Copy link

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. 😩

@avindhawale
Copy link

getting same warning with v1.4.131.....

@Rob--W
Copy link
Member

Rob--W commented Mar 15, 2016

@timvandermeij This message seems to bother a lot of people. Should we add a simple conditional check for Chrome (e.g. !window.chrome && ...)?

@timvandermeij
Copy link
Contributor

@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.

@mustanggb
Copy link

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() {

@natcohen
Copy link

I'm still getting this warning... Using chrome 53 and latest pdf.js beta

@thj-dk
Copy link

thj-dk commented Jan 14, 2017

Still getting this warning on Chrome v55.0.2883.87

@ssougnez
Copy link

+1

3 similar comments
@ghost
Copy link

ghost commented Jan 27, 2017

+1

@Spatlani
Copy link

+1

@apokyro
Copy link

apokyro commented Jan 31, 2017

+1

@yurydelendik
Copy link
Contributor

locking the conversation (mostly because of +1's)

@mozilla mozilla locked and limited conversation to collaborators Jan 31, 2017
@yurydelendik yurydelendik changed the title Chrome browser is not supported very well. "The provided value 'moz-chunked-arraybuffer' is not a valid enum value... " Jan 31, 2017
@yurydelendik
Copy link
Contributor

Addressed by #8768

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests