MetaMask / MetaMask/snaps

`console.log`s from Snap's context don't seem to make it to Firefox extension's `background.html` console

Open
#722 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type-bug
Dominant language
TypeScript
Stars
853
Forks
662
Avg merge
2d 8h
Merged PRs (30d)
8

Description

Tried in both the published extension and latest develop. Steps to reproduce:

1. Load the "template snap" basic MetaMask Snap
2. In the `"hello"` handler of `onRpcRequest`, add a `console.log` before `return`ing
3. Run the template snap with `yarn start`
4. Go to Settings > Extensions > and Inspect the MetaMask background.html process
5. Open `localhost:8080` in Firefox
6. Connect the snap
7. Call the "hello" function
8. Observe the lack of console.log in the Firefox debugger

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the template snap's onRpcRequest "hello" handler, run it with yarn start, and reproduce the issue in Firefox's MetaMask background.html debugger. Verify whether the console.log output reaches that console; done means logs from the snap context are visible there when the hello function is called.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.