Android e2e: ten image checks pass without comparing, and NativeBuffer.spec rewrites a tracked snapshot
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- android, react-native, typescript
Research direction
Start with packages/skia/src/__tests__/setup.ts to understand how checkImage handles missing references, then inspect the listed Android e2e specs and packages/skia/src/renderer/__tests__/e2e/NativeBuffer.spec.tsx. Run the reproduction command on Android and check git status; done means checks compare with stored references or fail when references are missing, and the run leaves the working tree unchanged.
Written by the indexing model from the issue text.
Description
Description
On Android, ten e2e image checks have no reference image in the repository, so on a fresh checkout checkImage writes the image it received and returns 0: the check passes without comparing anything.
| spec | references it writes on Android |
|---|---|
Snapshot |
screens/snapshot6-android-ci.png, screens/snapshot7-android-ci.png (-android.png without CI) |
ParagraphGlyphs |
paragraph/paragraph-glyph-tight-bounds-android.png, paragraph-metrics-bounds-android.png, paragraph-path-segment-android.png |
ParagraphHeights |
paragraph/paragraph-glyph-bounding-boxes-android.png |
Text |
text/path-from-text-android.png, path-from-arabic-text-android.png |
TextPath |
text/text-path-arabic-android.png, text-path-arabic-component-android.png |
NativeBuffer.spec.tsx calls checkImage(image, "snapshots/platform-buffer.png", { overwrite: true }), so it never compares either, and every run rewrites the tracked snapshots/platform-buffer.png.
Expected: each check compares against a stored Android reference, or fails when there is none, and a run leaves the working tree unchanged.
React Native Skia Version
3.0.3 (main at 5606b4155)
React Native Version
0.83.1 (the example app)
Using New Architecture
- Enabled
Steps to Reproduce
- Bundle the example with
CI=trueso it opens the Tests screen, build it, install and launch it on an Android device, and runadb reverse tcp:4242 tcp:4242. - From
packages/skia:E2E=true CI=true yarn test -i "e2e/(Snapshot|ParagraphGlyphs|ParagraphHeights|Text|TextPath|NativeBuffer)\.spec". git statuslists the ten references above as new files andsnapshots/platform-buffer.pngas modified, and none of the checks that wrote them failed.
On a phone Snapshot 1–3 also fail, against -android-ci references that come from the CI emulator; that part is expected.
Snack, Code Example, Screenshot, or Link to Repository
checkImagewrites the reference and returns0when none exists: https://github.com/wcandillon/react-native-skia/blob/5606b41552ae5909e30a28e91be52567acb3ab5f/packages/skia/src/__tests__/setup.ts#L61-L98- The
overwrite: truecall: https://github.com/wcandillon/react-native-skia/blob/5606b41552ae5909e30a28e91be52567acb3ab5f/packages/skia/src/renderer/__tests__/e2e/NativeBuffer.spec.tsx#L152
- Dominant language
- TypeScript
- Stars
- 8.6k
- Forks
- 653
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/react-native-skia
-
[iOS, v2/Ganesh] MetalContext over-releases the system MTLDevice once per exited thread, then Metal crashesPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Shopify/react-native-skia#4130 ·
-
[iOS] SIGABRT in makeImageSnapshot when canvas size is -1 — MTLTextureDescriptor width (uint64)-1 assertionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Shopify/react-native-skia#4029 · 3 comments ·
-
Android: every animated Canvas that draws paths fills its own 256 MB Graphite cache (N canvases ≈ N × 256 MB GPU memory)Possibly taken @pranav2012 claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
Shopify/react-native-skia#4159 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Shopify/react-native-skia#4158 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Shopify/react-native-skia#4154 · 1 comment ·
All issues in Shopify/react-native-skia
Similar issues
-
Flaky: mongodb-memory-server 'Port already in use' when another process starts a mongod concurrentlyOpenarea:testing bug effort:S priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
lens:agent lens:process process
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
thebristolsound/birdbrain#1772 ·
Maintainers usually reply within 1 day
-
bug priority:low ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/data-liberation-agent#685 ·
Maintainers usually reply within 1 day
-
Business
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day