fubinator / react-native-userbase-poc Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
When calling global.crypto.getRandomValues() with a Uint8Array of a specified size the following error is thrown:
RangeError: Maximum call stack size exceeded.
Reproduction: Add the line global.crypto.getRandomValues(new Uint8Array(12));
in the useEffect function in the App.tsx
file
This breaks calling getDatabases and openDatabase and probably some more functions
The function is polyfilled with @peculiar/webcrypto
and gets actually called a huge number of times.
I get this error during sign in.
@Fubinator No need to spend time on your end figuring this out, I'm getting some odd errors trying to get the project up and running. Firstly, not that this is an error, but when running npm install
the postinstall
command is logging something interesting:
> rn-nodeify --hack --install
not overwriting "assert"
not overwriting "browserify-zlib"
not overwriting "console-browserify"
not overwriting "constants-browserify"
not overwriting "react-native-crypto"
not overwriting "dns.js"
not overwriting "domain-browser"
not overwriting "events"
not overwriting "@tradle/react-native-http"
not overwriting "https-browserify"
not overwriting "react-native-os"
not overwriting "path-browserify"
not overwriting "process"
not overwriting "punycode"
not overwriting "querystring-es3"
not overwriting "react-native-level-fs"
not overwriting "react-native-udp"
not overwriting "stream-browserify"
not overwriting "string_decoder"
not overwriting "timers-browserify"
not overwriting "tty-browserify"
not overwriting "url"
not overwriting "util"
not overwriting "react-native-tcp"
not overwriting "vm-browserify"
not overwriting "readable-stream"
not overwriting "react-native-randombytes"
not reinstalling buffer
not reinstalling inherits
not overwriting shim.js. For the latest version, see rn-nodeify/shim.js
Maybe that is expected? When going through your instructions, I couldn't find /node_modules/parse-asn1/node_modules/pbkdf2/lib/default-encoding.js
to make the one change but I have a feeling its because the postinstall
command failed.
Lastly, when running the project in XCode I am getting this error ld: 144 duplicate symbols for architecture x86_64
. Like I said, if you know what could be the issue off-hand let me know. Otherwise I'll keep researching. Just wanted to post this here other people's reference in case they have a similar issue.
react-native's BlobManager.js needs to be patched to support creating Blobs from ArrayBuffers. If that does not work we need to polyfill File
and Blob
from somewhere else or change userbase's implementation of getFile
.
We should add a config file, where the app id and credentials can be stored. The config file should be ignored by git. I think it makes sense to add an example config file, though.
We should test all functions of Userbase's JavaScript SDK.
Here is a list to keep track:
The local flag is the only thing that makes sense in mobile apps IMO. It's a good opportunity to check if the sessions is saved in the local storage polyfill.
I have submitted a PR that was merged, which fixes the bug, where you need to replace global."VERSION"
. This was released in the latest version of rn-nodeify
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.