Skip to content

Comments

fix(ios): element.takeScreenshot() invalid filename#4843

Merged
noomorph merged 1 commit intomasterfrom
fix/ios-screenshot-name
Oct 3, 2025
Merged

fix(ios): element.takeScreenshot() invalid filename#4843
noomorph merged 1 commit intomasterfrom
fix/ios-screenshot-name

Conversation

@noomorph
Copy link
Collaborator

@noomorph noomorph commented Oct 2, 2025

Description

Fixes errors like this:

ENAMETOOLONG: name too long, lstat '/Users/.../Library/Developer/CoreSimulator/Devices/B833321F-83AE-4B57-A042-835AC4460D0B/data/Containers/Data/Application/817BD36F-5DE8-4729-8FA8-740790D86D79/tmp/elementsScreenshot/ImageScreenshot_<RCTParagraphComponentView: 0x105b335e0; frame = (0 0; 60.3333 17); opaque = NO; tag = 244; layer = <CALayer: 0x6000002275c0>; attributedText = Say Hello{

          EventEmitter = {length = 8, bytes = 0xd858510300600000};
          NSBackgroundColor = "UIExtendedSRGBColorSpace 0 0 0 0";
          NSColor = "UIExtendedSRGBColorSpace 0 0 1 1";
          NSFont = "<UICTFont: 0x105c11f90> font-family: \".SFUI-Regular\"; font-weight: normal; font-style: normal; font-size: 14.00pt";
      }>.png'

This is... kinda a filename ↑. So, instead of %@, I suggest using %p (pointer), e.g.: ImageScreenshot_0x105b335e0.png.

@noomorph noomorph requested a review from asafkorem as a code owner October 2, 2025 16:47
@noomorph noomorph requested a review from markdevocht October 2, 2025 16:47
@noomorph noomorph force-pushed the fix/ios-screenshot-name branch from 2fd128f to 9409ee0 Compare October 3, 2025 13:01
@noomorph noomorph merged commit 519459e into master Oct 3, 2025
2 of 3 checks passed
@noomorph noomorph deleted the fix/ios-screenshot-name branch October 3, 2025 15:29
@noomorph noomorph self-assigned this Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant