Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (cherrypick): invoke_snap RPC requests inside the built-in browser #12928

Merged

Conversation

Prithpal-Sooriya
Copy link
Contributor

Description

Cherry-pick of d35a2a0 (#12923)

Related issues

Fixes: https://infura.atlassian.net/issues/MDD-117 / https://consensys.slack.com/archives/C027M10HGEA/p1736428038068929

Manual testing steps

  1. Visit this preview in the MM browser: https://metamask-docs-git-snap-debugging-branch-consensys-ddffed67.vercel.app/developer-tools/faucet/
  2. (optional) Press the "Debug Test" button, it should complete
  3. Press the "Connect MetaMask" button, it should complete

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

BUG:
The invoke_snap RPC calls kept failing, returning a `RPC Error: Property
'handleSnapRequest' doesn't exist`.

FIX:
The `handleSnapRequest` import was code-fenced as part of the keyring
snap, but should be available to all snaps. I moved the relevant import
outside of the codefence.

Fixes: https://infura.atlassian.net/issues/MDD-117 /
https://consensys.slack.com/archives/C027M10HGEA/p1736428038068929

1. Visit this preview in the MM browser:
https://metamask-docs-git-snap-debugging-branch-consensys-ddffed67.vercel.app/developer-tools/faucet/
2. (optional) Press the "Debug Test" button, it should complete
3. Press the "Connect MetaMask" button, it should complete

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-notifications Notifications team label Jan 10, 2025
@Prithpal-Sooriya Prithpal-Sooriya marked this pull request as ready for review January 10, 2025 15:48
@Prithpal-Sooriya Prithpal-Sooriya requested a review from a team as a code owner January 10, 2025 15:48
@Prithpal-Sooriya Prithpal-Sooriya added release-7.38.0 Issue or pull request that will be included in release 7.38.0 team-identity and removed team-notifications Notifications team labels Jan 10, 2025
@Prithpal-Sooriya Prithpal-Sooriya added the Run Smoke E2E Triggers smoke e2e on Bitrise label Jan 10, 2025
Copy link
Contributor

github-actions bot commented Jan 10, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 91aee2a
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/5de95d01-1e06-4468-a35e-c0ab571cdd2e

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sethkfman sethkfman merged commit 871b706 into release/7.38.0 Jan 11, 2025
35 of 41 checks passed
@sethkfman sethkfman deleted the cherry-pick-fix-snap-rpc-requests-in-browser branch January 11, 2025 00:11
@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.38.0 Issue or pull request that will be included in release 7.38.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-identity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants