dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.65k stars 1.62k forks source link

UIDevice.CurrentDevice.Orientation return Unknown in 8.0.20 works in 8.0.6 #21922

Closed JoacimWall closed 1 week ago

JoacimWall commented 1 month ago

Description

The photos get some meta data wrong or something the start to rotate image left. After update to 8.0.20 no code changes in the app.

MAUI 8.0.6

the phone is held in the standard position charging socket downwards and takes a photo. UIDevice.CurrentDevice.Orientation = portrait

image image

MAUI 8.0.20

the phone is held in the standard position charging socket downwards and takes a photo. UIDevice.CurrentDevice.Orientation = Unknown

image image

the UIImage Photo.Orientation = Right both for 8.0.6 and 8.0.20

Steps to Reproduce

Have a working app and update to MAUI 8.0.20 from 8.0.6. I have just spent 3 hours trying to solve this bug before I realized that it is probably a MAUI framework problem. You may know if you have been inside and changed something in this code.

Link to public reproduction project repository

Not yet sorry

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.6 SR1

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

revert to MAUI 8.0.6

Relevant log output

No response

zippo227 commented 4 weeks ago

I can confirm that this is happening to me as well. I refrained from updating from 8.0.6 to 8.0.7 and 8.0.10 because images in my application became strangely rotated. I updated to 8.0.20 and that particular issue with images in list views went away. However, photos taken with my app camera suddenly have the same issue as reported here.

zippo227 commented 4 weeks ago

I downgraded from 8.0.20 to 8.0.6 to temporarily resolve the issue. I would like to use 8.0.20 to support the android ripple fix updates. Anyone know if this rotation issue is being looked at?

RoiChen001 commented 3 weeks ago

Can repro this issue at iOS device on the latest 17.10 preview 4(8.0.10&8.0.20). MauiImageRegression-main (1).zip BTW,there is a similar issue https://github.com/dotnet/maui/issues/21314 but it has been closed.

JoacimWall commented 2 weeks ago

Still in 8.0.21 so we are still on version 8.0.6 as new bugs come in during stabilisation of MAUI.

zippo227 commented 2 weeks ago

Is someone actively looking into this issue? @jsuarezruiz

jfversluis commented 1 week ago

Looks like a duplicate of #21314 and fixed with #21458 which is currently only in the nightly feed. Would you be able to test that out and see if that fixes the issue? If yes, this should be fixed in an upcoming service release soon.

JoacimWall commented 1 week ago

Looks like it works.

zippo227 commented 1 week ago

@jfversluis I tested the nightly build. I went from version 8.0.6 to 8.0.40-nightly.10602 and the image rotation issues were fixed. I will wait for the release of 8.0.40 before putting it into my production apps. Do you know when that might be released?

jfversluis commented 1 week ago

Perfect, thanks for letting us know! I'll be closing this one then.

We never really comment on release dates so I don't have an exact date for you unfortunately, but releases happen pretty frequent so it should arrive soon.