Automatic connections FAILED on local setup
- Dominant language
- TypeScript
- Stars
- 853
- Forks
- 662
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 8
Description
Hi team,
Today, I tried your new feature https://docs.metamask.io/snaps/how-to/allow-automatic-connections/ but immediately got some weird error that I couldn't debug myself. Please shed some light for my debugging. The error is thrown after I send RPC `wallet_requestSnaps` like below:
```js
return await provider.request({
method: 'wallet_requestSnaps',
params: {
[SNAP_ID]: snapVersion
? {
version: snapVersion,
}
: {},
} as any,
});
```
# The error:
# Environment:
- Chrome + Flask MetaMask
- Node v18.20.2
# Metamask dependencies `package.json`:
```json
"@metamask/eth-sig-util": "^7.0.1",
"@metamask/keyring-api": "^1.1.0",
"@metamask/snaps-sdk": "^5.0.0",
"@metamask/snaps-types": "^3.1.0",
"@metamask/snaps-ui": "^3.1.0",
"@metamask/utils": "^8.5.0",
```
# Snap Manifest:
```json
{
"version": "1.2.9-alpha.2",
"description": "Silent Shard creates a distributed self-custody account in MetaMask by generating a Distributed Private key between the browser extension and the Silent Shard mobile app using Multi-Party Computation (MPC). Thereby enabling a seamless 2FA experience for secure transactions.",
"proposedName": "Silent Shard",
"repository": {
"type": "git",
"url": "https://www.npmjs.com/package/@silencelaboratories/silent-shard-snap-staging"
},
"source": {
"shasum": "kgUGyPyxOt+5t2kbxCOHu4vPY0l+oj0EvWda5vOY8B4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
"iconPath": "images/silentShardLogo.svg",
"packageName": "@silencelaboratories/silent-shard-snap-staging",
"registry": "https://registry.npmjs.org/"
}
}
},
"initialConnections": {
"https://snap-staging.silencelaboratories.com": {},
"http://localhost:3000": {}
},
"initialPermissions": {
"endowment:keyring": {
"allowedOrigins": [
"https://snap-staging.silencelaboratories.com",
"http://localhost:3000"
]
},
"snap_dialog": {},
"snap_notify": {},
"snap_manageState": {},
"endowment:network-access": {},
"endowment:rpc": {
"allowedOrigins": [
"https://snap-staging.silencelaboratories.com",
"http://localhost:3000"
]
},
"snap_getEntropy": {},
"snap_manageAccounts": {}
},
"manifestVersion": "0.1"
}
```
Contributor guide
Research direction
Start by reproducing the wallet_requestSnaps call from the issue with the supplied Snap Manifest, Chrome Flask MetaMask setup, and Node v18.20.2. Compare the failure against the automatic-connections documentation and inspect the resulting error to determine whether the manifest or local origin is rejected. Done means the local setup succeeds or the required configuration is documented clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100