Parse Server and React Native Boilerplate

Hey! I’m trying to migrate to Self Host with parse server, following the official guide.
I’m using the React Native boilerplate (https://github.com/ethereum-boilerplate/ethereum-react-native-boilerplate

i’ve successfully self hosted the server. now i’m trying to do the authenticate. but i’m having some problems.

First:

First step is, enableWeb3 and pass some arguments, after doing that and calling the action i get an error:

This is what i have right now in my code:

Help is appreciated, since, there are a lot of people dealing with the same issue, with no results.
An official guide to having this working in React Native is a must!

Thanks.

Did you use the authentication code specific to a self hosted server? The one that calls requestMessage cloud function in order to get the message to be signed

Hey! Well, in theory, that should be called later right?
You can see the code i’m running here:

I think i’m al ittle bit lost.

try to looks at this tutorial

maybe it helps

hey! That’s the guide i’m following!
if you take a look, in the github link i’ve sent you, i’m using react-moralis to get the enableWeb3 method.

when i try to use enableWeb3 method (to get the wallet and chainId, it throws an exception (see first attached image). So, in ressume:

i cannot call the requestMessage because im not able to get the wallet addr / chainId.

if i use the moralis cloud server instead of the self host one, i can get the wallet, sign the message and everything, using just authenticate().

you try to enable web3 with metamask provider in react native?

should be wallet connect used?

Already tried passing ‘walletconnect’ ‘wc’, even the connector object…
can’t believe this would be so difficult. Doc is messed up for RN.

I don’t know exactly how it should be done, you have to somehow use wallet connect

i mean, i can directly use walletconnect, get my wallet / chainId.
i think the moralis package is broken or something. because it doesn’t make any sense.

my enableWeb3 and authenticate use different parameters, distinct to the doc says (migrating from cloud to self host).

So… or moralis is using a different package for react native or i don’t know.
this should be simple but it isn’t

i’m stuck lol.

I think that you could try with a custom connector too for enabling web3

"moralis": "0.0.99",
"react-moralis": "0.2.7",

This old (alpha) React Native Boilerplate uses a very old version of moralis and react-moralis.

Another user managed to get it working with another old boilerplate, you can read the posts here.