MetaMask / MetaMask/metamask-sdk

[Bug]: Safari iOS: Unable to Connect within iframe after 0.27.0 Upgrade

Open
#973 10 comments 0 reactions 0 assignees View on GitHub
Bug Triage
Dominant language
TypeScript
Stars
338
Forks
260
PR merge metrics
No merged PRs in 30d

Description

### SDK

Web

### Provide environment information

web
sdk-react 0.27.0
safari 17.4

### MetaMask SDK Version

0.27.0

### MetaMask Mobile app Version

7.27.0

### What browser are you using? (if relevant)

Safari 17.4

### How are you deploying your application? (if relevant)

web

### Describe the Bug

With the new version 0.27.0, if we are using an iframe and hit `sdk?.connect()`, nothing happens. This behaviour occurs in Safari on iOS.

Video:

https://github.com/user-attachments/assets/8dcc9cb1-d27f-4ef6-88fc-2ad230cfcbbd

### Expected Behavior

We should be able to connect on Safari@IOS within an Iframe.

### Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

https://github.com/andremfaria/mm-iframe/

### To Reproduce

1. **Run the Project: https://github.com/andremfaria/mm-iframe/**

2. **Open Safari on iOS:**
- Ensure you are using an iOS device.
- Open the Safari browser.

3. **Access the Local Server:**
- In Safari, navigate to `http://:5173/iframe/index.html`.
- Replace `` with your actual local IP address.

4. **Trigger the Issue:**
- On the webpage, locate and click the "Connect" button.

Contributor guide

Open the contributing guide

Research direction

Run the linked mm-iframe reproduction project and start at the sdk?.connect() call described in the issue. Compare MetaMask SDK 0.27.0 behavior in Safari 17.4 on iOS when the page is loaded within an iframe. Done means the Connect action successfully establishes a connection in that environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, react, typescript
Domain
frontend, mobile-dev, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.