question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unknown encoding: base64url with version 0.6.0

See original GitHub issue

Using tus-js-client on client side. On the latest version I started getting this error on every patch request.

backend_1       | 2022-05-27T01:32:25.110Z tus-node-server:stores:s3store [621fc6ab24f75100564f1c19/628b88ca3d32db002ab6bfe4/H/image/c04d6e51-11be-4614-846f-f3ee44e7ab3f.621fc6ab24f75100564f1c19_1653702287033_main] retrieving metadata
backend_1       | 2022-05-27T01:32:25.110Z tus-node-server:stores:s3store [621fc6ab24f75100564f1c19/628b88ca3d32db002ab6bfe4/H/image/c04d6e51-11be-4614-846f-f3ee44e7ab3f.621fc6ab24f75100564f1c19_1653702287033_main] metadata from cache
backend_1       | 2022-05-27T01:32:25.364Z tus-node-server:stores:s3store [621fc6ab24f75100564f1c19/628b88ca3d32db002ab6bfe4/H/image/c04d6e51-11be-4614-846f-f3ee44e7ab3f.621fc6ab24f75100564f1c19_1653702287033_main] retrieving metadata
backend_1       | 2022-05-27T01:32:25.364Z tus-node-server:stores:s3store [621fc6ab24f75100564f1c19/628b88ca3d32db002ab6bfe4/H/image/c04d6e51-11be-4614-846f-f3ee44e7ab3f.621fc6ab24f75100564f1c19_1653702287033_main] metadata from cache
backend_1       | 2022-05-27T01:32:25.515Z tus-node-server:handlers:patch [PatchHandler] TypeError [ERR_UNKNOWN_ENCODING] [ERR_UNKNOWN_ENCODING]: Unknown encoding: base64url
backend_1       |     at Buffer.toString (buffer.js:803:11)
backend_1       |     at randomString (project/node_modules/tus-node-server/lib/models/StreamSplitter.js:7:37)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Murderloncommented, May 31, 2022

base64url was a Node 15 feature (https://github.com/nodejs/node/pull/36952) but it was backported to Node 14. However, your version is a bit too old. It was backported to 14.18.0. Consider upgrading to that or ideally to latest LTS (16.15.0 at the time of writing).

I’m working towards tus-node-server@1.0.0 for which there will be official supported Node versions (`>14.18.0).

1reaction
tomgrecocommented, Jun 1, 2022

@Murderlon fair enough. Looking forward to more updates 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node JS Base64Url encoding is broken · Issue #147 - GitHub
It states in the documentation that you must provide a vendorlist JSON when creating a GVL. I have this code that's running and...
Read more >
base64url - npm
For encoding to/from base64urls. Latest version: 3.0.1, last published: 4 years ago. Start using base64url in your project by running `npm i ...
Read more >
base64 - Rust - Docs.rs
Several different encoding functions are available to you depending on your desire for convenience vs performance. Function, Output, Allocates. encode, Returns ...
Read more >
is base64 encoding url safe? - node.js - Stack Overflow
The alternative Base64 encoding called Base64url simply replaces those 2 troublesome characters with two safe characters.
Read more >
unblock: python-jwcrypto/0.6.0-1 - Debian Bug report logs
Copy sent to tjaalton@debian.org, Debian Release Team ... _key: + # Check that the value is base64url encoded + try: + base64url_decode(self ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found