macosui / macos_ui

Flutter widgets and themes implementing the current macOS design language.
https://macosui.github.io/macos_ui/#/
MIT License
1.81k stars 178 forks source link

App is blank on macOS Monterey #450

Closed whiplashoo closed 10 months ago

whiplashoo commented 1 year ago

Description

I received a report from a user that the app shows up blank after my latest update. Testing on my macOS Ventura devices works without issues, but when I ran it on macOS Monterey (12.5.1), I encountered the reported issue:

Screenshot 2023-07-06 at 7 09 42 AM

Running the example app,: the build is successful, the app is launched but it displays a blank screen (though the sidebar is visible). I can see that the widgets are inserted into the widget tree, but nothing shows up.

Running it from Xcode logs some errors:

Screenshot 2023-07-06 at 7 10 02 AM

validateComputeFunctionArguments:830: failed assertion `Compute Function(ciKernelMain): writes texture ([0]) whose usage (0x00) doesn't specify MTLTextureUsageShaderWrite (0x02)'
validateComputeFunctionArguments:830: failed assertion `Compute Function(ciKernelMain): writes texture ([0]) whose usage (0x00) doesn't specify MTLTextureUsageShaderWrite (0x02)'

I am now in the process of investigating this further, just letting you know if you have any ideas for a fix.

Steps To Reproduce

Logs

Logs ``` [✓] Flutter (Channel stable, 3.10.5, on macOS 12.5.1 21G83 darwin-arm64, locale en-GR) • Flutter version 3.10.5 on channel stable at /Users/dd/Developer/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 796c8ef792 (3 weeks ago), 2023-06-13 15:51:02 -0700 • Engine revision 45f6e00911 • Dart version 3.0.5 • DevTools version 2.23.1 [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use `flutter config --android-sdk` to update to that location. [✓] Xcode - develop for iOS and macOS (Xcode 14.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14C18 • CocoaPods version 1.12.1 [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). [✓] VS Code (version 1.79.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.68.0 [✓] Connected device (1 available) • macOS (desktop) • macos • darwin-arm64 • macOS 12.5.1 21G83 darwin-arm64 [✓] Network resources • All expected network resources are available. ! Doctor found issues in 3 categories. ```
GroovinChip commented 1 year ago

Are there any exceptions thrown or relevant logs on the Flutter side?

whiplashoo commented 1 year ago

No logs on Flutter's side. It surely has something to do with MacosWindowUtils; removing the config.apply() code displays the widgets again, but with broken theming.

jtdLab commented 1 year ago

No logs on Flutter's side. It surely has something to do with MacosWindowUtils; removing the config.apply() code displays the widgets again, but with broken theming.

Same on my mac running Monterey (v.12.5.1)

Adrian-Samoticha commented 12 months ago

This might possibly be related (although I do not think it is): https://github.com/macosui/macos_window_utils.dart/issues/24

GroovinChip commented 10 months ago

@whiplashoo did you ever figure this out with your customer?

whiplashoo commented 10 months ago

No, they eventually used Time Machine to get a previous working version. I have also been unable to debug it; using a VM to test on macOS Monterey was too slow to test and find what's wrong with the plugin.

GroovinChip commented 10 months ago

In that case, I am closing this issue.

thexaib commented 10 months ago

i am having same issue on Monterery 12.6.1, Flutter 3.18.3 stable, MacosUI v2.0.2

Screen Shot 2023-10-31 at 12 29 28 AM
yang282441848 commented 10 months ago

@GroovinChip This issue may not be fixed.

Example cannot work with macos m1 on Monterery. No complie errors,but runtime wraning.

flutter: Warning: Falling back on slow accent color resolution. 
It’s possible that the accent colors have changed in a recent version of macOS, 
thus invalidating macos_ui’s accent colors, which were captured on macOS Ventura.
If you see this message, please notify a maintainer of the macos_ui package.
image image
Adrian-Samoticha commented 10 months ago

Alright, I can reproduce the issue by running the macos_window_utils example apps on macOS 12.6. It appears that the issue was introduced in macos_window_utils 1.2.0, which is odd considering the relatively benign changes introduced in that version.

image

It is currently still unclear whether the issue was caused by a change in macos_window_utils or in Flutter itself since I assume the 1.2.0 example app was compiled in a newer Flutter version than the 1.1.2 example app.

yang282441848 commented 10 months ago

@whiplashoo Can you give me some advise?

Adrian-Samoticha commented 10 months ago

@whiplashoo Can you give me some advise?

@whiplashoo has stopped pursuing this bug because he found debugging it inside a VM to be too time-consuming.

I am the author and maintainer of the macos_window_utils package and am therefore likely in the best position to address it. I have installed macOS Monterey in a VM precisely to try and debug this issue (see my previous post).

thexaib commented 9 months ago

any update/work around for the issue? @Adrian-Samoticha

mukhtharcm commented 9 months ago

Did anyone found any solution/workaround for this?

Adrian-Samoticha commented 9 months ago

any update/work around for the issue? @Adrian-Samoticha

I unfortunately haven’t had much time to work on this issue lately.

cbenhagen commented 8 months ago

@jtdLab, @yang282441848, @thexaib, @mukhtharcm and anyone else affected by this issue please try my workaround in https://github.com/macosui/macos_window_utils.dart/issues/44#issuecomment-1869539049

thexaib commented 8 months ago

@jtdLab, @yang282441848, @thexaib, @mukhtharcm and anyone else affected by this issue please try my workaround in macosui/macos_window_utils.dart#44 (comment)

thank you. this worked. 👍🏻