What was reported:
Issue firebase/firebase-js-sdk#576 (closed, 13 comments): Uploading a base64-encoded image to Firebase Storage with putString() fails in React Native (and Node) with a confusing "invalid character" error, even though the same code works on web.
What works:
Two environment problems, both with workarounds, per commenter adelphes. First, there is no atob in React Native or Node, and the Firebase web SDK uses atob to decode base64 input: import or implement an atob function and attach it to the global object. Second, Firebase tries to use the native Blob class, but React Native's Blob incorrectly converts Uint8Array data to a string and corrupts the upload. Workaround: temporarily delete the Blob class from the global object before calling putString, which forces Firebase to fall back to its own bundled Blob implementation, then restore it after the upload.