Christopher Jeffrey (JJ)

Results 182 comments of Christopher Jeffrey (JJ)

Note: if you are experiencing this in a runtime which *does* support es2016 (i.e. a modern runtime), please post the runtime/browser/platform here. If there is actually a popular runtime out...

@hedi-edelbloute is this affecting iOS, Android, or both? Which versions? I can't easily check to see if a Safari web view would cause this right now, but I would be...

In the meantime you could try this monkey patch: ``` js if (!(Buffer.alloc(1).subarray(0, 1) instanceof Buffer)) { Buffer.prototype.subarray = function subarray() { const result = Uint8Array.prototype.subarray.apply(this, arguments); Object.setPrototypeOf(result, Buffer.prototype); return...

Is your Android web view somehow using an old version of chrome? Is there any way to check? I'm not an expert on mobile web views, but I'm certain chrome...

@vweevers, agreed. I think ledger might be in an unfortunate situation though. Their ecosystem is comprised of a number submitted apps from many different developers who are probably expecting `subarray`...

Here's a smaller test case you can use for testing the subarray behavior of the web view: ``` js 'use strict'; function TestBuffer(...args) { const buf = new Uint8Array(...args); Object.setPrototypeOf(buf,...

@overcat, okay, I just want to make sure I have this right: 1. The device prints `true` when running the above test code. 2. `Buffer#subarray` *does not* return a `Buffer`...

@overcat, if that's the case then I see only two possibilities for the errors produced by the [code][1] mentioned [above][2]: 1. `subarray` was actually being called on a plain Uint8Array....

> Update: I just noticed that browserify is not using the latest version of buffer. Ahh, case solved. That was definitely a rollercoaster. Started questioning reality for a second there....

@overcat, hmmm, okay, I guess that makes sense since buffer v5.7 does handle subarray properly, but still doesn't explain our issue then. @hedi-edelbloute, yeah, it would be useful if you...