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

Calling readUInt32LE with no arguments throws an exception in buffer v4 #237

Closed
Borewit opened this issue Aug 10, 2019 · 1 comment
Closed

Comments

@Borewit
Copy link

Borewit commented Aug 10, 2019

Issue on buffer: 4.9.1.

Expected behaviour:
Call buffer.readUInt32LE() will read a 32-bit unsigned integer from the buffer start at position since this is how node.js buffer behaves.

Actual behaviour:
Throws an exception: "RangeError: offset is not uint"

There are likely other read function behaving the same. But this specific one, was an issue for me.

Although this issue is already fixed in v5, webpack v4 which relying on node-libs-browser, which is relying on buffer 4.9.1 and does not want to update to v5 for good or bad reasons.

Related issues:

  1. Offset is not uint Borewit/music-metadata-browser#15 (addressed by enforcing buffer v5)
  2. RangeError: offset is not uint Borewit/music-metadata-browser#28 (already addressed, by explicit provided offset)

Do you think it is worth releasing a 4.9 patch @feross?

@feross
Copy link
Owner

feross commented Aug 11, 2019

It's ridiculous that they won't update to the latest buffer. I would rather not support old major versions of packages. It's already so much work to maintain just the latest major version without also fixing old versions. If there's a severe issue affecting you that you can't work around, let me know and I'll consider it in the future. But for now it sounds like you were able to work around the problem, right?

Cheers!

@feross feross closed this as completed Aug 11, 2019
jeremymeng added a commit to jeremymeng/azure-sdk-for-js that referenced this issue Jun 2, 2023
The old version of `buffer` that webpack bundled has a bug causing
sample to fail.

feross/buffer#237

This PR upgrades webpack to v5 and adds required polyfills as in v5
they are no longer built-in.
jeremymeng added a commit to Azure/azure-sdk-for-js that referenced this issue Jun 5, 2023
The old version of `buffer` that webpack bundled has a bug causing
sample to fail.

feross/buffer#237

This PR upgrades webpack to v5 and adds required polyfills as in v5 they
are no longer built-in.
dgetu pushed a commit to dgetu/azure-sdk-for-js that referenced this issue Jun 5, 2023
The old version of `buffer` that webpack bundled has a bug causing
sample to fail.

feross/buffer#237

This PR upgrades webpack to v5 and adds required polyfills as in v5 they
are no longer built-in.
minhanh-phan pushed a commit to minhanh-phan/azure-sdk-for-js that referenced this issue Jun 12, 2023
The old version of `buffer` that webpack bundled has a bug causing
sample to fail.

feross/buffer#237

This PR upgrades webpack to v5 and adds required polyfills as in v5 they
are no longer built-in.
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

2 participants