I could not redirect to my application from Metamask after connecting wallet or signing message

I’m implement a MetaMask-sdk, and after follow the configuration example in MetaMask-sdk github. Then I can connect wallet in MetaMask and sign message, but there is a problem, after connecting a wallet, MetaMask didn’t automatically redirect to my application but it showed that “Please return to the app to continue using their services” though i configured my scheme in App.tsx and AndroidManifest.xml. Here is the code’s configuration: AndroidManifest.xml: `

`. App.tsx: `const sdkOptions = { enableAnalytics: true, // shouldShimWeb3: true, // timer: BackgroundTimer, useDeeplink: true, dappMetadata: { name: 'plaza', url: 'https://app-plaza.titancorpvn.com', baseUrl: 'https://app-plaza.titancorpvn.com', iconUrl: 'https://plaza.titancorpvn.com/img/logo_black.png', scheme: 'plaza', }, openDeeplink: (link: string, _target?: string) => { console.log(`App::openDeepLink() ${link}`); if (canOpenLink) { Linking.openURL(link); } else { console.log( 'useBlockchainProiver::openDeepLink app is not active - skip link', link, ); } }, storage: { enabled: true, }, i18nOptions: { enabled: true, }, logging: { developerMode: true, plaintext: true, }, };

let canOpenLink = true;

const WithSDKConfig = ({ children }: { children: React.ReactNode }) => {
const {
debug,
socketServer,
checkInstallationImmediately
} = useSDKConfig();

return (
<MetaMaskProvider
debug={debug}
sdkOptions={{ …sdkOptions, communicationServerUrl: socketServer, checkInstallationImmediately }}>
{children}

);
};

export default function App() {
return (






<NavigationContainer
ref={navigationRef}
onReady={() => SplashScreen.hide()}
>








);
}`

Please help me solve this problem soon! Thanks very much :sweat_smile:

Hi @ptrK could you reference the github repo and what MetaMask version are you using?

My MetaMask version is “^0.32.1”. Sry but my repo is private and i cannot give it to you, but i will provide the configuration with AndroidManifest.xml and App.tsx




Could u check around and see what happened ? If u need more information, just tell me, thanks very much!

No I’m sorry I meant the source code that you used, and version ^0.32.1 what is it. It’s not a MetaMask version

Oh sorry about the misunderstanding, I’m using react-native and the MetaMask version is 7.42.1

Thank you, I cannot really check this as you mentioned your repo is private. There are a few things

Are you participating in the MetaMask hackathon by any chance?

I very appreciated for ur help, i will check around these solutions and if there is problem, i will ask you. By the way, thank you very much !

1 Like