Closed theAndEx closed 10 months ago
Hi @theAndEx ! How did you install the MetaMask wallet on the emulator?
Hi @theAndEx ! How did you install the MetaMask wallet on the emulator?
Hi @christopherferreira9, via Play Store.
Hi @theAndEx , can you please check if this issue is present when using a real device? We usually target our tests to real devices instead of emulators and simulators.
Hello, I have the same issue but on a real device. I use my samsung galaxy s22.
Hi @theAndEx , we are trying to find the root cause for these ReactNative issues as it doesn't seem to happen in every device at all times so we're trying to isolate the root cause itself. Also, in the meantime, can you try with the latest MetaMask SDK version we just released?
It is very strange. I see that on some devices (emulators) everything works, on others it doesn’t. I created a new device and everything started working.
So, my problem arose with version 0.5.6. If this is relevant, then I can try to reproduce the problem on the same device that I originally used with the latest version.
But now I have a problem with open Metamask app. I see that the same situation is in your demo project. When I have already gone to the application (Metamask), in the password entry page, I close the Metamask app and return to the original one. In this situation, I cannot redirect to the Metamask app again. Could I fix this somehow? @christopherferreira9
Thank you.
@theAndEx Could you check the android settings of your devices?
Open Android settings , search 'default' and select "Choose Default apps' > "Choose Default apps" > Opening Links > scroll down to MetaMask and tap it > Supported Web addresses > check if links are selected or "verified/trusted" by default (most importantly metamask.app.link). If they are not, then check them/it.
Let me know if it worked for you!
https://gyazo.com/f6902f43c489046fc9f7a703df860e84 https://gyazo.com/e15f4dc74d802102d87a18ce3c8af574
I see that there is a link to the application.
But the current problem is that when you press the "connect" button => the Metamask app opens, and at that moment, close it, go back to the original application and press the "connect" button again - nothing happens.
@theAndEx do you use a VPN or something similar?
@andreahaku when using the emulator - no, I don’t use it. I can record the screen if needed.
@theAndEx we are trying to replicate it and will keep you updated on our finding.
I did this.
And the "catch" does not always work correctly, but now you can reject the connection request/close the app (Metamask) and then try to sign in again.
try {
sdk.on(
EventType.CONNECTION_STATUS,
(_connectionStatus: ConnectionStatus) => {
if (
_connectionStatus === 'disconnected' ||
_connectionStatus === 'terminated' ||
_connectionStatus === 'timeout'
) {
sdk.terminate();
}
},
);
const result = (await ethereum?.request({
method: 'eth_requestAccounts',
})) as string[];
... some code ...
} catch (e) {
console.log('ERROR', e);
sdk.terminate();
Alert.alert('Something wrong!', 'Please wait and try again later.');
}
};
I did this.
And the "catch" does not always work correctly, but now you can reject the connection request/close the app (Metamask) and then try to sign in again.
try { sdk.on( EventType.CONNECTION_STATUS, (_connectionStatus: ConnectionStatus) => { if ( _connectionStatus === 'disconnected' || _connectionStatus === 'terminated' || _connectionStatus === 'timeout' ) { sdk.terminate(); } }, ); const result = (await ethereum?.request({ method: 'eth_requestAccounts', })) as string[]; ... some code ... } catch (e) { console.log('ERROR', e); sdk.terminate(); Alert.alert('Something wrong!', 'Please wait and try again later.'); } };
and does this solve the problem with the Android connection modal not showing up?
Hi all! We will be closing this issue since there has been no activity on it. We just updated the example dapps to the latest version of the SDK, can you please give those a try and open a new bug if needed?
Hi,
I took "reactNativeDemo" and did everything in the video (https://github.com/MetaMask/metamask-sdk/issues/249#issuecomment-1662747784), but after switching to the Metamask app, I got to the main screen of Metamask. There is no connection request.
My actions:
GIF - https://gyazo.com/6dce031dc4ef4cd5d0d2405b248babae
What could be the reason for this?