Reactiveui: [BUG] GetNamespaceExists: System.ArgumentNullException: 'Value cannot be null.' Parameter name: path1

Created on 2 Dec 2019  路  5Comments  路  Source: reactiveui/ReactiveUI

Describe the bug
When running in release mode I get this exception:

   at System.IO.Path.Combine(String path1, String path2) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\shared\System\IO\Path.cs:line 303
   at ReactiveUI.DependencyResolverMixins.GetNamespaceExists(String namespaceName) in d:\a\1\s\src\ReactiveUI\Mixins\DependencyResolverMixins.cs:line 128
   at System.Func`2.InvokeOpenStaticThunk(T arg)
   at System.Func`2.Invoke(T arg)
   at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext() in E:\A\_work\288\s\corefx\src\System.Linq\src\System\Linq\Where.cs:line 170
   at ReactiveUI.CompatMixins.ForEach[T](IEnumerable`1 this, Action`1 block) in d:\a\1\s\src\ReactiveUI\Mixins\CompatMixins.cs:line 16
   at ReactiveUI.DependencyResolverMixins.InitializeReactiveUI(IMutableDependencyResolver resolver) in d:\a\1\s\src\ReactiveUI\Mixins\DependencyResolverMixins.cs:line 48
   at ReactiveUI.RxApp.<>c.<.cctor>b__10_0() in d:\a\1\s\src\ReactiveUI\RxApp.cs:line 87
   at System.Func`1.Invoke()
   at Splat.InternalLocator.RegisterResolverCallbackChanged(Action callback) in d:\a\1\s\src\Splat\ServiceLocation\InternalLocator.cs:line 117
   at Splat.Locator.RegisterResolverCallbackChanged(Action callback) in d:\a\1\s\src\Splat\ServiceLocation\Locator.cs:line 80
   at ReactiveUI.RxApp..cctor() in d:\a\1\s\src\ReactiveUI\RxApp.cs:line 80
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext* pContext) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\ClassConstructorRunner.cs:line 92

With the following message:

System.ArgumentNullException: 'Value cannot be null.' Parameter name: path1

10.5.30 works as expected

Seems like it has something to do with the following code added in PR: https://github.com/reactiveui/ReactiveUI/pull/2253

https://github.com/reactiveui/ReactiveUI/blob/25522a74e44d84e699efbd337760aa5b75bce896/src/ReactiveUI/Mixins/DependencyResolverMixins.cs#L125-L130

Steps To Reproduce

  1. Create Xamarin.Forms project
  2. Add and use ReactiveUI 10.5.31
  3. Build Release
  4. Run the App
  5. See error

Expected behavior
App runs without crash
Environment

  • OS: UWP
  • Version 1903
  • Device: PC

Greetings,
Eddy

bug outdated

Most helpful comment

Thanks @MattWhilden -- this was just a fix for some users who were getting exceptions when ReactiveUI attempts to load plugins for the various NuGet packages and users were getting confused by the caught exception. I will just revert to the old functionality. thanks for providing the link.

I sort of almost wish there was a "Assembly.TryLoadFrom"

All 5 comments

Hey @DevEddy :wave:,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially.

https://opencollective.com/reactiveui

PS.: We offer priority support for all financial contributors. Don't forget to add priority label once you start contributing :smile:

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!

Hello from the .NET team. This looks very similar to a UWP issue with the grpc library. You can find the discussion here in case that's helpful. The short answer is that Assembly.Location returns the empty string for .NET Native (aka RELEASE for UWP).

Thanks @MattWhilden -- this was just a fix for some users who were getting exceptions when ReactiveUI attempts to load plugins for the various NuGet packages and users were getting confused by the caught exception. I will just revert to the old functionality. thanks for providing the link.

I sort of almost wish there was a "Assembly.TryLoadFrom"

Thanks!

Glad to be helpful. Certainly let me know if there's other UWP related issues that crop up. Happy to take a look.

Was this page helpful?
0 / 5 - 0 ratings