Skip to content

Commit d9e9fa2

Browse files
docs: document LavaMoat popover positioning issue
Root cause identified in commit ed02ac2 which updated lavamoat-core and modified policies, blocking @popperjs/core DOM access needed for popover positioning in production builds. Affects ALL popover components in GitHub Actions builds while working correctly in local development and 13.5.0 branch builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d838472 commit d9e9fa2

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

LAVAMOAT_POPOVER_ISSUE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# LavaMoat Popover Positioning Issue
2+
3+
## Problem Description
4+
5+
All popover components in the MetaMask extension fail to anchor properly to their reference elements in production builds from GitHub Actions, but work correctly in local development and 13.5.0 release builds.
6+
7+
## Root Cause Analysis
8+
9+
**Issue identified in commit:** `ed02ac23e86fc3a20336901a2bef52365cdd6bb1` ("fix: lavamoat patch")
10+
11+
This commit:
12+
- Updated lavamoat-core from 16.2.2 to 16.7.1
13+
- Modified LavaMoat build-system policies
14+
- Is NOT present in 13.5.0 branch (explaining why it works)
15+
- IS present in main branch (explaining why it fails)
16+
17+
## Technical Details
18+
19+
### Console Error Evidence
20+
Production builds show "TypeError: e is not a function" in ui-14.js, indicating @popperjs/core functions are being blocked by LavaMoat policies.
21+
22+
### Build System Impact
23+
- **Local webpack builds:** Work correctly (LavaMoat policies may be applied differently)
24+
- **GitHub Actions Gulp builds:** Fail due to stricter LavaMoat enforcement
25+
- **13.5.0 branch CI builds:** Work correctly (don't contain the problematic commit)
26+
27+
### Affected Components
28+
ALL popover components are affected, including:
29+
- Global menu popover
30+
- Account menu popover
31+
- Network selector popover
32+
- Any component using @popperjs/core for positioning
33+
34+
## Proposed Solution
35+
36+
Review and update LavaMoat policies to allow @popperjs/core the necessary DOM access for:
37+
- `getBoundingClientRect()` calls
38+
- DOM positioning calculations
39+
- Element measurement operations
40+
41+
The policies should maintain security while allowing legitimate positioning functionality.
42+
43+
## Timeline
44+
- Issue started ~5 days ago from main branch
45+
- Commit ed02ac2 introduced the breaking change
46+
- 13.5.0 branch remains unaffected

0 commit comments

Comments
 (0)