-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Blazor Hybrid is not supported on Macs running MacOS 11. #19613
Comments
It could be that as I mentioned in #18419 (comment), the numbers for the supported version could be wrong? That flag is set up specifically to only run on Mac Catalyst versions 13.3 and above, but I think that I could have confused the numbers. In short, the versions of Catalyst are tied to iOS versions, which then map to macOS versions. That flag was introduced on very recent MacOS version, so it probably is the case that the version number used here is wrong, and probably should be higher (maybe 16.x), which I think links to macOS 13.0+. It should be a simple fix, but I don't have the gear to check those versions and verify if it would actually work with it, nor the time to get said gear to check, and it should probably be owned by someone on the MAUI team. @Eilon it could be a good first issue for someone new on the team (or collaborating) to check. |
Thank you. Is there anything I can do to test the theory? |
So, Blazor Hybrid will never work on older Macs? |
Whenever this issue gets fixed, it should. That's up for the MAUI team to figure out how they wanna schedule it. I am not on the team, I'm just helping with issues when I have time and I have other obligations to Visual Studio, and I rather someone on the team handle it at this point. |
How do I get their attention? I haven't seen any reply from anyone on the Maui team regarding this. |
Awesome! |
How can I test this? |
In your app's MauiProgram.cs comment out the line that calls If that works and you want to disable this code for just Mac scenarios, you could change MauiProgram.cs to look more like this: #if DEBUG
#if !MACCATALYST
builder.Services.AddBlazorWebViewDeveloperTools();
#endif
builder.Logging.AddDebug();
#endif And that way in Debug builds on all platforms except MacCatalyst you'll get the dev tools. |
Thank you. |
@MeestorX were you able to try it? It could be that the error always happens in which case a patch will be required. |
Yes, just checked. A release build made on Sonoma (14.3) will not run on Big Sur (11.7). Same error as reported previously. |
@MeestorX I think I found a way you can patch affected apps. Check out this repo where I tried it out: https://github.com/Eilon/maui19613MacCatWorkaround The steps are:
Note that one limitation is that this class can't auto-detect whether you want Developer Tools enabled, so to switch that setting for MacCatalyst you'll need to edit this line: https://github.com/Eilon/maui19613MacCatWorkaround/blob/main/maui19613MacCatWorkaround/Platforms/MacCatalyst/CustomBlazorWebViewHandler.cs#L23 (or have it do something else smarter). I tried this out on my Mac and it worked, but my Mac is running a later macOS so I can't test the exact case you have. If you (or anyone else) can try it out, please let me know if it works! |
Sadly, no. I just cloned your repository and did a
|
Can you please re-open this issue as it's not actually resolved yet. |
@MeestorX thank you for trying out the workaround. In Also this issue is closed because the work to fix the bug was completed, though the fix is not yet released. As such, there is no further action to take on the core issue (aside from me trying to come up with a temporary workaround). |
That does not fix the issue. Same error. |
Hmm that's a bit surprising to me. As far as I could tell, that error comes from code that with my fix shouldn't even run. Perhaps I missed something and that code isn't even running? Are you able to set a breakpoint anywhere in the new code (like on this line) and see if it gets hit, so that we know it's actually running? |
Well, it does hit it in the debugger, but the debugger is on my Sonoma machine. I have to test actual builds on the Big Sur machine. So, to be clear, I build on Sonoma, I'm packaging and running on Big Sur. |
Yes that should be fine. The code in this case at compile time only cares about what platform is being targeted (for example, I wonder if there's a way to see what .NET code is running when the error happens? From the logs seen in other issues, that stack doesn't seem to show the .NET call stack. Is it possible it's due to NativeAOT? And maybe if the code is run without NativeAOT we can see the .NET call stack and try to understand why the 'bad' code is running when it shouldn't even be called? |
Copy. You copy that the error message is different with your code, right, in that it's choking on a different call?
I assume you're not asking me! Lol I have no idea, but damn, would that ever be helpful to have some logs! |
Oh I think I totally missed that the initial reports were about:
But with the 'workaround' you're now seeing:
I'll have to think about that some more... Unfortunately without a Mac with the older OS it's a bit hard for me to debug as well 😁 |
Which is where logs would be helpful, I'm sure. Would there be something in the MacOS error screen or logs that I can send you? |
Just tested with 8.0.201 and still the same error with the Maui Template and the workaround app you created. |
Description
Same exact issue as here: #18419
However, I cannot update the machine that's looking to run the app. It's on MacOS 11.7.10 and cannot be updated further.
Is there any way to build a Blazor Hybrid app that will run on this MBP?
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
MacOS 11.7.10
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: