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

Slicing buffers fails in latest Microsoft Edge #86

Closed
oskbor opened this issue Dec 18, 2015 · 12 comments
Closed

Slicing buffers fails in latest Microsoft Edge #86

oskbor opened this issue Dec 18, 2015 · 12 comments

Comments

@oskbor
Copy link

oskbor commented Dec 18, 2015

slicing buffers fails in Edge 25.10586.0.0
it boils down to this:

var buf = new Buffer(100);
var arr = new Uint8Array(100);
buf instanceof Uint8Array; // true
Uint8Array.prototype.subarray.call(arr, 0, 0).length; // 0
Uint8Array.prototype.subarray.call(buf, 0, 0).length; // 100 ! 

Would you say this is an issue with Edge or with this lib?

@nolanlawson
Copy link
Collaborator

This sounds like an issue with Edge, especially if it's a regression from IE11. Should probably be filed on http://connect.microsoft.com/

@feross
Copy link
Owner

feross commented Dec 20, 2015

This sounds like a regression in Edge from IE11. Can you file a bug report with Microsoft and post the link here?

@feross
Copy link
Owner

feross commented Dec 20, 2015

Just added Edge to the test suite (#87) and for what it's worth, the tests all pass.

@oskbor
Copy link
Author

oskbor commented Dec 21, 2015

I have tested it some more all tests pass in Edge, as you said.
When i use Buffer from https://wzrd.in/standalone/buffer, I don't get these issues.
So it seems to be something in our tool chain that is causing this issue. Maybe some combination of Babel/browserify. I will continue down the rabbit hole, thanks for your assistance and for updating your tests to run on Edge

@oskbor oskbor closed this as completed Dec 21, 2015
@feross
Copy link
Owner

feross commented Dec 21, 2015

Thanks for updating this issue, @oskbor. If you end up discovering a bug, please open a new issue or comment in this one. Cheers!

@oskbor
Copy link
Author

oskbor commented Jan 5, 2016

@feross
Copy link
Owner

feross commented Jan 5, 2016

I just marked that I've also experienced the bug on the issue.

@oskbor
Copy link
Author

oskbor commented Jan 5, 2016

Thanks!
Do you have any ideas on why my build might fail while the one on wzrd.in does not? I spent all day trying to find the reason, but ended up no wiser 😕

@feross
Copy link
Owner

feross commented Jan 5, 2016

@oskbor Can you open a new issue?

@Sjors
Copy link

Sjors commented Mar 11, 2016

The test suite uses Edge 13 which is ancient. This bug doesn't occur in Edge 20. It does in Edge 25. There are no VM's out there running Edge 25 as far as I know; I spent a ton of time getting my hands on a physical machine to reproduce this :-)

@feross
Copy link
Owner

feross commented Mar 12, 2016

@Sjors EdgeHTML13 is actually pretty new. See: https://en.wikipedia.org/wiki/Microsoft_Edge#Release_history And there's no way to get a newer version with Sauce Labs right now.

To be clear, you're not reporting a new issue. Just saying that you got this bug using an old version of browserify/buffer?

@Sjors
Copy link

Sjors commented Mar 12, 2016

I see, good to know EdgeHTML has different versioning from the browser.

The issue went away for me as soon as I upgraded browserify*, so indeed I'm
not reporting a new bug.

  • = make sure grunt-browserify, if you use that, is also up to date and using browserify >=13

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

No branches or pull requests

4 participants