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
Upgrade to version 8.0.2 failed to resolve IMvxMessenger on start #4347
Comments
Comment out stuff in your MainPageViewModel constructor untill you find out which dependency fails resolving. |
@Cheesebaron thank you for the hint, the constructor crashes on the following row:
any idea? |
I think I've seen other issues with regards to MvxMessenger breaking in other issues, where they just downgraded that package to 8.0.1. |
downgraded MvxMessenger to 8.0.1 but the issue is the same :-( |
Any Idea to unlock the situation? do you think it is better to rollback to 7 and wait for a future MVVM release? |
With Mvx 8.0.2, WPF, .NET 5. I'm having a similar problem when trying to publish a message from code called from MvxAppStart.NavigateToFirstViewModel() and the MvxMessenger is getting stuck waiting for the UI Thread. I'm processing the command line args to load a file and navigate to the correct viewmodel, the same code works when selecting a load button after the UI shows. This previously worked with Mvx 7 and lower. [Edit] Will raise a new bug as it's not quite the same. |
Could it be related to #4364? |
Thanks @entdark, yes is could be related that #4364, I've added my comment to that bug. I've just started to have a look at MvvmCross 8 code to see why it is blocking in 8 but not 7. |
Same here, but it happens only on iOS and only in release builds, I was able to catch it only by catching an exception in
Looks like a race condition that does not happen in slower debugging-enabled builds. Linker settings do not affect the crash. |
Solved the problem by adding this to
|
Could that be related: AppRopio/AppRopio.Mobile@2e19235? MvvmCross/MvvmCross/Core/MvxSetup.cs Line 396 in c67b773
And since it is using AsParallel() it is not waiting for result when iterating through all the plugins when loading them. So the app initialization happens faster than all the plugins get loaded.
|
By the way, there is no point in |
My hypothesis was wrong about parallel query (or maybe not - I will get to that topic later). But I found out another thing: that method returns MvvmCross/MvvmCross/Core/MvxSetup.cs Line 430 in c67b773
Even worse: if to try to load all possible attributes manually it still finds 0. So MvxMessenger never gets loaded.If that condition is commented out then things go fine. I am reminding that it happens in Release builds only. |
Seems like the proper place would be overriden
|
I tried the workaround mentioned earlier, but unfortunately, it didnt work for me. Additionally, I've completely removed MvxMessenger from the project. However, I'm still encountering the issue when running the app in Release Mode on iOS (stuck on splash screen then crashes), while Android works correctly. We haven't transitioned our app to MAUI yet, so we're currently stuck using Xamarin.Forms with MvvmCross 8.0.2. (7.1.2) works correctly. The iOS logs haven't provided any useful insights. Has anyone found a solution for this problem? MvvmCross 8.0.2 |
🔙 Regression
After upgrading from 7.x to version 8.0.2 the app throws a Failed to resolve first ViewModel
Old (and correct) behavior
App starts up normally.
Current behavior
on start throw the following exception
Reproduction steps
the exception raises here(***)
Configuration
Version: 8.0.2
Platform:
The text was updated successfully, but these errors were encountered: