Comments (3)
I dont have much time to investigate this, but maybe you can suggest a quick fix.
do you have a suggestion for a fix?
can you point me to the code you think is the source of the issue?
@kowalski
from react-native-webview-crypto.
@sirpy I was going to ask a colleage to do a PR @Ofadiman
I think the fix is like
class PolyfillCrypto extends React.Component {
constructor(props) {
super(props);
this.props = props;
this.webViewRef = React.createRef();
}
shouldComponentUpdate() {
return false;
}
componentWillUnmount() {
resolveWorker = undefined;
+ workerPromise = new Promise((resolve) => {
+ resolveWorker = resolve;
+ });
}
So basically reset the promise that holds the reference when component is unmounting so that the next one can set the correct reference.
from react-native-webview-crypto.
@sirpy @Ofadiman added the pull request with the changes that fix it for us
from react-native-webview-crypto.
Related Issues (20)
- Verify works on android HOT 6
- Webview-crypto won't work with last versions of Chrome webview HOT 4
- Could not resolve dependency with react-native 0.63.4 HOT 3
- window.crypto.subtle is broken on iOS 15 Beta 3 onwards HOT 9
- Wait for webview to start, before sending messages HOT 1
- crypto.subtle.x() functions stuck when called on Expo Android HOT 6
- Storing image data base64 HOT 1
- Compatibility with React Native 0.69.5 HOT 2
- InvalidAccessError: key is not extractable HOT 1
- Encrypting Base64 Image data fails with "Maximum call stack size exceed" HOT 3
- Signing fails on ios for unknown reason HOT 4
- Possible Unhandled Promise Rejection when using crypto.subtle.decrypt on iOS / Android HOT 2
- FEATURE: batch calls into the webview HOT 1
- Use lodash https://lodash.com/docs#cloneWith HOT 1
- Add example repo
- Make sure saucelabs pics up CI successes
- new release
- Use new webview API for react native HOT 10
- Solving the getRandomValues problem HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-webview-crypto.