Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expo-camera/next onResponsiveOrientationChanged event type mismatch #28429

Open
Landro3 opened this issue Apr 24, 2024 · 6 comments
Open

expo-camera/next onResponsiveOrientationChanged event type mismatch #28429

Landro3 opened this issue Apr 24, 2024 · 6 comments

Comments

@Landro3
Copy link

Landro3 commented Apr 24, 2024

Minimal reproducible example

https://github.com/Landro3/expo-camera-orientation

What platform(s) does this occur on?

iOS

Did you reproduce this issue in a development build?

Yes

Summary

The event object from onResponsiveOrientationChanged has a type definition to be one of four strings, shown below. However, the event.orientation value is actually a number instead of one of the strings in its type definition.

image

Environment

expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.4.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.1 - ~/.volta/tools/image/node/20.11.1/bin/node
Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 10.2.4 - ~/.volta/tools/image/node/20.11.1/bin/npm
Watchman: 2023.11.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
IDEs:
Xcode: 15.3/15E204a - /usr/bin/xcodebuild
npmPackages:
expo: ~50.0.14 => 50.0.17
react: 18.2.0 => 18.2.0
react-native: 0.73.6 => 0.73.6
Expo Workflow: managed

Expo Doctor Diagnostics

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check for issues with metro config
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!

@Landro3 Landro3 added the needs validation Issue needs to be validated label Apr 24, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels Apr 24, 2024
@expo-bot
Copy link
Collaborator

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

@github-actions github-actions bot removed the needs review Issue is ready to be reviewed by a maintainer label Apr 24, 2024
@alanjhughes
Copy link
Collaborator

Hi @Landro3 - I've pulled your repro and this is what I am seeing. Where are you seeing a number?
Screenshot 2024-04-24 at 21 42 04

@alanjhughes
Copy link
Collaborator

@Landro3 - Are you referring to the target property that is also returned?

@Landro3
Copy link
Author

Landro3 commented Apr 24, 2024

interesting, so this is the block of code that has the log statement in it

<CameraView
  style={{ flex: 1, borderWidth: 1 }}
  responsiveOrientationWhenOrientationLocked
  onResponsiveOrientationChanged={(e) => {
    console.log(e.orientation);
  }}
/>

i'm using an iPhone 13 Pro connected to my expo server running npm run ios and these are the logs i'm seeing from the app when i rotate the phone
image

@alanjhughes
Copy link
Collaborator

@Landro3 - very strange, I'm also using a 13 pro 🤔 what version of iOS?

@Landro3
Copy link
Author

Landro3 commented Apr 24, 2024

my phone's on 17.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants