MetaMask / MetaMask/metamask-extension

ci- `Run build` fails intermittently with `Error: Lavamoat could not parse policy at '/home/runner/work/metamask-extension/metamask-extension/lavamoat/build-system/policy.json': Unexpected end of JSON input`

Open
#36,604 1 comment 0 reactions 0 assignees View on GitHub
area-CI Sev2-normal team-extension-platform type-bug
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### What is this about?

`Run build` fails intermittently with `Error: Lavamoat could not parse policy at '/home/runner/work/metamask-extension/metamask-extension/lavamoat/build-system/policy.json': Unexpected end of JSON input`

Example:
- https://github.com/MetaMask/metamask-extension/actions/runs/18304383780/job/52118299844
- https://github.com/MetaMask/metamask-extension/actions/runs/18305764653/job/52122473631

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the two linked GitHub Actions runs and the `Run build` step, then inspect how `lavamoat/build-system/policy.json` is produced and read. Reproduce the intermittent failure and verify that `Run build` completes without an incomplete-policy parse error.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.