WalletConnectProvider from react-native-dapp not working - react-native

I am trying to implement a functionality in my react-native app where in I can connect my app with metamask or any other non-custodial wallet app. The library I am using for this is https://www.npmjs.com/package/#walletconnect/react-native-dapp.
The following is the code snippet:
<WalletConnectProvider
redirectUrl={Platform.OS === 'web' ? window.location.origin : 'yourappscheme://'}
storageOptions= {{
asyncStorage AsyncStorage,
}}>
<>{/* awesome app here */}</>
</WalletConnectProvider>
However, when I try to run the app, it shows the following errors:
TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[0], "./providers").WalletConnectProvider')
Error: Requiring module "node_modules\#walletconnect\react-native-dapp\dist\providers\index.js", which threw an exception: TypeError: Object prototype may only be an Object or null.
Any idea why this issue?

I was facing the issues due to the use of npx rn-nodeify --install --hack.
Tried using "node-libs-react-native" inside the devDependencies as suggested at
https://github.com/WalletConnect/walletconnect-monorepo/issues/753

Related

react native open api generated client [Unhandled promise rejection: Error: not implemented]

I have a hello world with open api from this tutorial
API schema is in here as JSON
as in the tutorial I just call the generated API client
<Button title='API' onPress={()=> Api.Pet.getPetById(42)}/>
but is not working and getting the error
[Unhandled promise rejection: Error: not implemented]
at node_modules/react-native/Libraries/Blob/URL.js:195:10 in get__search
at Api/generated/common.ts:91:48 in setSearchParams
at Api/generated/api.ts:502:12 in getPetById
This is because React Native/iOS doesn't fully implement the URLSearchParams. See here: https://github.com/facebook/react-native/issues/23922
You need to polyfill it.
yarn add react-native-url-polyfill
then
import 'react-native-url-polyfill/auto';
at the top of your entry file.

Nativescript-Vue: 'tns preview' error with loading Vuex?

For a trivia app I'm developing for mobile, I'm using Nativescript-Vue to develop. The app runs fine and without errors when running it with xcode iOS emulator. However, when I try to run a preview (with the terminal command: 'tns preview') the app runs but when I try to start a game the app throws an error:
CONSOLE ERROR file:///app/tns_modules/nativescript-vue/dist/index.js:2129:20: [Vue warn]: Error in render: "TypeError: undefined is not an object (evaluating 'this.$store.getters')"
found in
---> <App> at App.vue
<Frame>
<Root>
LOG from device iPhone CONSOLE ERROR file:///app/tns_modules/nativescript-vue/dist/index.js:2129:20: [Vue warn]: Error in nextTick: "TypeError: undefined is not an object (evaluating 'this.$store.getters')"
I'm trying to run it using the playground app on my iPhone SE and scanning the qr-code. I'm thinking it has something to do with the app not being able to access the VueX store or something. But I'm kind of at a loss. I've seen the 'tns preview' command work, but that was with a Vue app without Vuex. Do you know what I might be doing wrong?
UPDATE: after adding Vue.prototype.$store = store in main.js, I get a slightly different error:
CONSOLE ERROR file:///app/tns_modules/nativescript-vue/dist/index.js:2129:20: [Vue warn]: Error in render: "TypeError: this.$store.getters is not an Object. (evaluating 'val in this.$store.getters')"
Still don't know what can be wrong, but I do know the tns preview works when disabling / commenting out all things related to the store in the code, so it defintely got something to do with that. Please help, I really want to show this app to somebody on their phone.
I've managed to solve this problem by adding in main.js this line, right after importing store:
import store from './store'
Vue.prototype.$store = store

react-native-signature-canvas not working properly in expo IOS

react-native-signature-canvas is not working properly in Expo, it throws an error "Unable to open URL".
I am using package of react-native-signature-canvas signature using env Expo.
What is going on here? I just simply copy and paste this code from React Native Signature Component based Canvas for Android && IOS && expo.
I used the same code example provided on above page.
Error Message:
RemoteConsole.js:80 Possible Unhandled Promise Rejection (id: 0):
Error: Unable to open URL: ReactABI32_0_0-js-navigation://postMessage?data%253Aimage%252Fpng%253Bbase64%252CiVBORw0KGgoAAAANSUhEUgAAAuQAAAVWCAYAAAD ... YII%253D
I solved this error, this error throws because of remote debugger is on after i stop remote debugging it works fine.

react-native 0.57.4, `_typeof3 is an instance of Object` error

I followed instruction steps to start a new project with react-native v0.57.4.
With everything installed correctly (I've re-checked a few times),
I create native project with react-native init MyProject.
but then I got this error after build iOS project:
Unhandled JS Exception: _typeof3 is not a function
(In '_typeof3(typeof Symbol === "function" ? Symbol.iterator : "##iterator")',
'_typeof3' is an instance of Object)
Did anyone have experience on this? Thanks.

get undefined is not an object when trying to stripe.init

I am trying to use tipsi-stripe and when calling stripe.init I am getting the following error
Code
import stripe from 'tipsi-stripe'
stripe.init({
publishableKey: 'key',
// merchantId: 'merchant_id', // Optional
})
Error
I have seen this error before when I forgot to link native modules. It seems like you have not linked a native module.
Make sure you do
react-native link tipsi-stripe
or
rnpm link