expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
33.71k stars 5.4k forks source link

Invalid image size on expo-gl takeSnapshotAsync on IOS #32088

Open grodriguesCP opened 1 week ago

grodriguesCP commented 1 week ago

Minimal reproducible example

Create draw with threejs and save

What platform(s) does this occur on?

iOS

Where did you reproduce the issue?

in a development build

Summary

On IOS when run method GLView.takeSnapshotAsync the generated image size is not correct. The size defined on rect is "width: 1013, height: 638" but image generated size is 1011x636 Code and example image in attach. Screenshot 2024-10-16 at 15 36 54 9B660B79-7D07-4791-BD26-57D1ACE7F993

Environment

expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.5
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 10.5.0 - ~/.nvm/versions/node/v18.20.2/bin/npm
      Watchman: 2024.08.19.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.15.2 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
    IDEs:
      Xcode: 15.4/15F31d - /usr/bin/xcodebuild
    npmPackages:
      @expo/metro-config: ~0.18.1 => 0.18.11 
      expo: ~51.0.8 => 51.0.32 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.74.1 => 0.74.1 
      react-native-web: ~0.19.6 => 0.19.12 
    Expo Workflow: bare

Expo Doctor Diagnostics

The following packages should be updated for best compatibility with the installed expo version:
  @react-native-community/datetimepicker@8.2.0 - expected version: 8.0.1
  @react-native-picker/picker@2.8.0 - expected version: 2.7.5
  @sentry/react-native@5.32.0 - expected version: ~5.24.3
  expo@51.0.32 - expected version: ~51.0.38
  expo-dev-client@4.0.26 - expected version: ~4.0.28
  expo-splash-screen@0.27.5 - expected version: ~0.27.6
  expo-updates@0.25.24 - expected version: ~0.25.27
  react-native@0.74.1 - expected version: 0.74.5
  react-native-gesture-handler@2.19.0 - expected version: ~2.16.1
  react-native-reanimated@3.15.2 - expected version: ~3.10.1
  react-native-safe-area-context@4.10.1 - expected version: 4.10.5
  react-native-screens@3.34.0 - expected version: 3.31.1
Your project may not work correctly until you install the expected versions of the packages.
Found outdated dependencies
Advice: Use 'npx expo install --check' to review and upgrade your dependencies.

One or more checks failed, indicating possible issues with the project.
grodriguesCP commented 1 week ago

I have already update the packages to the expo doctor versions and the problem remains.

Expo doctor result: ✔ Check Expo config for common issues ✔ Check package.json for common issues ✔ Check if the project meets version requirements for submission to app stores ✔ Check dependencies for packages that should not be installed directly ✔ Check for common project setup issues ✔ Check npm/ yarn versions ✔ Check for issues with metro config ✔ Check for app config fields that may not be synced in a non-CNG project ✔ Check Expo config (app.json/ app.config.js) schema ✔ Check that packages match versions required by installed Expo SDK ✔ Check for legacy global CLI installed locally ✔ Check that native modules do not use incompatible support packages ✔ Check that native modules use compatible support package versions for installed Expo SDK ✔ Check native tooling versions

Didn't find any issues with the project!