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.

Base64 encoding doesn't work in Safari's web workers

See original GitHub issue

Reported here:

https://github.com/kaepora/miniLock/issues/53

It turns out in Safari atob and btoa are not available in web workers:

https://bugs.webkit.org/show_bug.cgi?id=55663

Not sure if we should re-implement base64 ourselves or just wait for Safari to fix it (probably the latter). Until then, it’s good to have this issue opened so that people know about this and use something else for base64 encoding if they use web workers in Safari.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dchestcommented, Jun 10, 2016

For everyone’s information, this was recently fixed in WebKit https://bugs.webkit.org/show_bug.cgi?id=158576

1reaction
alaxcommented, Oct 3, 2015

@mdp React Native doesn’t use Webkit, it just uses JavaScriptCore, which is a wrapper around Webkit’s Javascript engine. That also means that you won’t have secure random number generator, so unless you’ve implemented one yourself, TweetNacl won’t even work under React Native.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PDF.JS with base64 data uri doesn't work on safari
I am using PDF JS demo app and I give a base64 pdf from the server to the viewer. This does work very...
Read more >
atob() - Web APIs - MDN Web Docs
The atob() function decodes a string of data which has been encoded using Base64 encoding. You can use the btoa() method to encode...
Read more >
Cross Browser Compatibility of Web Workers in Safari 14
Web Workers is Fully Supported on Safari 14. ... Base64 encoding and decoding ... Run Test On macOS Using Selenium Safari Driver ...
Read more >
Sending web push notifications in Safari and other browsers
Safari doesn't support invisible push notifications. Present push notifications to the user immediately after your service worker receives them. If you don't, ...
Read more >
Browser comparison | Can I use... Support tables for HTML5 ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
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