I'm trying to create a bitcoin wallet from a mnenomic phrase using bip32 in an expo app, for that I need to use the module tiny-secp256k1, but it has proven to be difficult due to the apparent incompatibility with the expo framework, I believe I have solved various issues when implementing this module in expo but I am stuck now.
First I had the problem explained and solved in this metro issue
Then I had problems with RNRandomBytes.seed being null, I used this "react-native-randombytes" issue to solve it.
But now I'm facing this new problem
TypeError: (0, fs_1.readFileSync) is not a function. (In '(0, fs_1.readFileSync)((0, wasm_path_cjs_js_1.path)("secp256k1.wasm"))', '(0, fs_1.readFileSync)' is undefined)
I don't know if this problem is due to one of the solutions I implemented above or if it's something else entirely.
In my expo app I'm using rn-nodeify believing it would help me solve incompatibility issues and while it has worked installing some dependencies that were missing it has not solved the issue with tiny-secp256k1.
For testing proposes I've just been instancing tiny-secp256k1 in my app.js file, just doing that it's enough for the error mentioned above to appear.
import ecc from "tiny-secp256k1";
Any help would be appreciated.
Related
After I upgraded React Native from 0.59 to 0.69, and dealing with some various errors, there is one last one I can't seem to solve..I noticed after running my react-native run-android command the following error:
/node_modules/react-native-splash-screen/android/src/main/java/org/devio/rn/splashscreen/SplashScreenModule.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReactApplicationContext;
it actually generates about 20 errors, all mentioning various sub libraries beneath react.bridge. I've been quite stuck on what to do here and thought maybe I need to rewrite something.
The error references a splash screen module I was using (which I upgraded to the latest) located at: https://www.npmjs.com/package/react-native-splash-screen
Is com.facebook.react.bridge no longer used, or do I need to reinstall something and maybe the upgrade caused some sort of problem? I am using Android Studio (which I also had to upgrade) if that helps.
Thank you so much for any help you can provide!
I have been experimenting mono repositories with javascript, using react and react-native applications. However, I have been having some problems using external dependencies on a simple react-native application.
While trying to integrate react-navigation following this guide here, I always end up with a lot of errors like:
ERROR Invariant Violation: No callback found with cbID 18929 and callID 9464 for module . Args: '[1131]'
It even gets in loop. This starts happening when I import react-native-gesture-handler at index.js. I have been trying to understand the problem for days and tried a lot of different stuffs, since nohoist of dependencies, clearing dependencies, reset react-native caches, watchman links and so on. However, I always end up in this error.
I have been experimenting with it on ios.
I am not sure it is a problem with the libraries I have mentioned here, because if I have a standalone react-native project, I can use the react-native-gesture-handler.
So, initially, I thought it was a problem with the mono repository structure I have, however, I have tried to use other libraries like: styled-components, react-native-router, react-native-restart, and react-native-contacts, and those libraries work well.
Has anyone passed for this problem? I have a github repository here where I try to explain how to reproduce the error.
I have also been documenting, to my self, my experimentations with mono repositories here, step by step, in case it gives more context.
I do not know if it is the best place to make this question, however I do not know where to look more, any suggestion is welcomed.
Thanks!
I have a react-native app. I recently moved to react-native version 0.61.5 for which I took the long route of creating a new react-native app and porting my code over to avoid any linking issues since new version used PODFILE as the default linking mechanism. Ever since I moved to version 0.61.5, I don't get the correct location of code in error logs. I think this is mainly happening when the code is running in asynchronous fashion which most of the code is. For e.g., look at below screenshot:
It is reporting that it is not able to call map on some array which is apparently undefined but the place where the error is reported is completely incorrect. I have no such file in my codebase and it is probably pointing to some file in some react-native package.
I am using Sentry #sentry/react-native": "^1.1.0". I don't think Sentry can cause issue with the sourcemaps reported during development.
I am not sure how to debug this problem. This problem is causing a lot of issues in debugging any errors as I have to manually figure out where the error happened. Please let me know if you have any tips on how to fix this problem.
I'm learning React Native and trying to add a component to an Expo Snack for testing. I can't even get the example app to work though.
Is it something different about how Snacks work vs. a desktop development environment? I've encountered that type of difference using JSFiddle, for example.
I straight copy-pasted the code from the Github repo into snack.expo.io and it gave me an error:
Device: (946:881) Unable to resolve module 'module://expo-font.js'
Evaluating module://expo-font.js
Evaluating module://react-native-numeric-input.js
Evaluating module://App.js
Loading module://App.js
I've gotten this error before, but I've never been able to figure out why. Is it an issue with the package, which was updated just 7 days ago, or something else? Please advise.
It may be due to missing of node modules in your project compared to the Github project. As the Stack.expo browser won't give us full freedom to install custom modules, I suggest you to download VS Code and open the Github project in it, then do "npm install" from cmd and "react-native run-android/ios".
Despite the app running perfectly in test builds, when I publish the app or put in in production mode the app builds once that takes a while, then several times within short succession as seen below:
After it stops I then receive the errors:
"Module AppRegistry is not a registered callable module (calling
runApplication)"
and
"undefined is not a function (evaluating
'babelHelpers.objectDestructuringEmpty(d.actions)')"
I have looked up this issue and found that those 2 error messages tend to be vague "catch-all" errors, however none of the posts I found had the rapid build issue I have, so that may a key part to solving this. I have tried restarting the app several times, npm install-ing, updating react and expo to their latest versions, and other small non-code related fixes however none have worked.
Here is a link to my repo: https://github.com/tc1240/AT-Assist. If anyone has had this or can take a look at my code any help is appreciated. Thank you,
Also this is my first question asked on stack so I apologize in advance if my question does not follow some of the guidelines.
I've been experiencing this lately, since I tried publishing for Android and iOS.
I'm currently unable to build additional projects in Expo other than the one I'm working on, so I can't test your project, but:
Can you add the android.package key in your app.json file and try running again? Restoring this back into my project seemed to fix the issue for me.