metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

[Bug]: After updating to v7.10.0, deeplink with url no longer works if MM mobile is not already running in the background

Open davidliudev opened this issue 3 years ago • 20 comments

Describe the bug

When I clicked a deeplink that open MM mobile with a URL, in previous version, it works normally regardless of whether metamask is already running or not.

However when updated to v7.10.0 in iOS, it will only do the url redirection if MM is already running in the background. If no instance of MM is already running, it will open MM but never redirect to the URL.

This seemed to happen both in Android and iOS as reported by our dev team.

Combined with https://github.com/MetaMask/metamask-mobile/issues/7724 this essentially makes our application completely unusable on Android, as the workaround of this issue by killing MM every time on Android no longer works.

Expected behavior

The MM should always redirect to the specified url in deeplink

Screenshots/Recordings

No response

Steps to reproduce

  1. Kill all instance of Metamask
  2. Go to our app app.crossspace.io
  3. Click login using MM
  4. MM is opened, but with no url redirection

When MM is already running, repeat the above step, MM can redirect to the correct url.

Error messages or log output

No response

Version

v7.10.0

Build type

None

Device

iPhone 13 Pro Max

Operating system

iOS

Additional context

No response

Severity

No response

davidliudev avatar Nov 12 '23 04:11 davidliudev

same issue, any comment or workaround on that ?

sbalcin avatar Nov 13 '23 10:11 sbalcin

Hello, @sbalcin. Thanks for reporting! I will pass this on to the appropriate team for review.

anaamolnar avatar Nov 13 '23 10:11 anaamolnar

Hi @davidliudev, @sbalcin Can you please share the deeplink you're trying to open for us to replicate on our side?

christopherferreira9 avatar Nov 16 '23 10:11 christopherferreira9

Hi @christopherferreira9 please refer to https://github.com/MetaMask/metamask-mobile/issues/7724 's example as posted by one of our engineers.

davidliudev avatar Nov 17 '23 08:11 davidliudev

I'm going to close this in favour of https://github.com/MetaMask/metamask-mobile/issues/7724

christopherferreira9 avatar Nov 17 '23 09:11 christopherferreira9

hihi @christopherferreira9 please reopen as this is another issue separate from 7724

davidliudev avatar Nov 17 '23 12:11 davidliudev

@christopherferreira9

to add more context, this issue happened on both ios and android but 7724 only happened on android. this issue is about opening deeplink with url while MM is not running in bg and this issue is only introduced in 7.10.0 (previous version is working fine), while the 7724 issue has already existed before 7.10.0, so it is worth tracking separately

davidliudev avatar Nov 17 '23 12:11 davidliudev

Got it, because you referenced 7724 as steps to reproduce this one I assumed it affected both. Reopening

christopherferreira9 avatar Nov 17 '23 14:11 christopherferreira9

Oh sorry for the confusion.

I meant the deeplink there. Let me copy it here as well:

sign message deeplink : dapp://app.crossspace.io/async/async-sign?sid=52390eb9-858b-44c0-b199-f9e0e92268db

trade deeplink: dapp://app.crossspace.io/async/async-trade-keys?address=0x655008151f2dbeb52029Cf051bfaFa0ca7f479c4&abi=tradeAbi&function_name=sellShares&args=%5B%220xA30Eb0e0e2B632Df08a4328604be2fBbFe54B35d%22%2C%226551d203264ad02968234b30%22%2C1%5D&value=0&contractNetwork=80001&feedID=6551d203264ad02968234b30&orderInfo=%7B%22ticketPrice%22%3A%2218000000000000000%22%2C%22creatorKeyQuantity%22%3A%22382556488862933290%22%2C%22keyPrice%22%3A%228050466206443634%22%2C%22fee%22%3A%222605046620644362%22%2C%22totalPrice%22%3A%2223445419585799272%22%2C%22tradeType%22%3A%22sell%22%2C%22amount%22%3A1%7D&sid=6538cd4e-cf33-4602-9e04-1d9f60f3910e

davidliudev avatar Nov 17 '23 15:11 davidliudev

My App was also deeplinking users to the MetaMask browser smoothly until something happened; now it only deeplinks into Metamask browser if MetaMask App already running in bg (if metamask app not running in bg, the app opens but stays in the wallet interface, the metamask briswer does not open).

Thank you @davidliudev for figuring out it was the new update, it has been driving me crazy.

brianonchain avatar Nov 17 '23 16:11 brianonchain

Next week I will go back version by version to figure out what broke it, I'm sorry for the inconvenience.

christopherferreira9 avatar Nov 17 '23 17:11 christopherferreira9

Actually, I don't know if it's v7 that broke it, it could be earlier, as per this comment: https://github.com/MetaMask/metamask-mobile/issues/4760#issuecomment-1211754291

Maybe @tommasini will have some answers?

On Fri, Nov 17, 2023 at 9:55 AM Christopher Ferreira < @.***> wrote:

Next week I will go back version by version to figure out what broke it, I'm sorry for the inconvenience.

— Reply to this email directly, view it on GitHub https://github.com/MetaMask/metamask-mobile/issues/7766#issuecomment-1816852885, or unsubscribe https://github.com/notifications/unsubscribe-auth/A66FTPBQHJD47EL6E45WSH3YE6QHTAVCNFSM6AAAAAA7HXID52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWHA2TEOBYGU . You are receiving this because you commented.Message ID: @.***>

brianonchain avatar Nov 17 '23 18:11 brianonchain

Android:

  • 7.8 ✅
  • 7.9 ✅
  • 7.10 ❌
  • 7.11 ❌

Serve a static HTML Dapp: DEEPLINK

Steps to reproduce:

  1. Close MetaMask
  2. Tap the dapp deeplink -> See issue.

Expected Result: A inapp browser tab is opened with the crossspace dapp.

Actual Result: Nothing happens after MM opens

Extra data:

  • Biometric was enabled for the tests

Will make sure to check iOS when fixing this.

christopherferreira9 avatar Nov 23 '23 10:11 christopherferreira9

Is there any updates on this? Users are complaining that they cannot login using MM....

davidliudev avatar Dec 05 '23 01:12 davidliudev

We may have to stop using MM and force to switch to other wallet solutions if this is not working for too long.

davidliudev avatar Dec 05 '23 01:12 davidliudev

HI @davidliudev ! We are working on a fix for this and it should be available on the coming releases.

christopherferreira9 avatar Dec 14 '23 10:12 christopherferreira9

Hey @christopherferreira9 any updates on this one. Thanks

kkharji avatar Jan 14 '24 08:01 kkharji

Hi all! We haven't managed to work on this issue yet. We'll update this issue once we do. We're sorry for the delay

christopherferreira9 avatar Jan 15 '24 10:01 christopherferreira9

This PR resolves the issue: https://github.com/MetaMask/metamask-mobile/pull/8469

omridan159 avatar Feb 01 '24 09:02 omridan159

This PR resolves the issue: #8469

For my device, it is not working Android: version 13, Metamask: version 7.14.0

it is still working if I open metamask as a background application

kr-nikunj avatar Feb 08 '24 06:02 kr-nikunj