Problem with configuration

Hello,

I added one more property to my VAF configuration (although that probably isn't the issue here) and installed the VAF and sometime later I tried to set a value for the new configuration property and started getting this error:

[Void OnConfigurationUpdated(TSecureConfiguration, Boolean, Boolean)], IL:27, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[Void PopulateFromConfiguration(Boolean)], IL:33, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[Void PopulateFromConfiguration(TSecureConfiguration, Boolean)], IL:1070, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[System.Nullable`1[System.DateTimeOffset] GetNextExecution(System.Nullable`1[System.DateTimeOffset])], IL:144, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[System.Nullable`1[System.DateTimeOffset] GetNextExecution(System.Nullable`1[System.DateTimeOffset])], IL:260, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[Boolean Any[TSource](System.Collections.Generic.IEnumerable`1[TSource])], IL:21, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[Boolean MoveNext()], IL:43, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[Void .ctor(System.Collections.Generic.IEnumerable`1[TElement])], IL:114, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[Boolean MoveNext()], IL:78, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[Boolean MoveNext()], IL:95, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[System.Nullable`1[System.DateTimeOffset] <GetNextExecution>b__0(MFiles.VAF.Extensions.ScheduledExecution.Trigger)], IL:0, Tyhjäarvon sallivalla objektilla on oltava arvo. 0x80131509)
[System.Nullable`1[System.DateTimeOffset] GetNextExecution(System.Nullable`1[System.DateTimeOffset], System.TimeZoneInfo)], IL:47, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[System.Nullable`1[System.DateTimeOffset] GetNextExecution(System.Nullable`1[System.DateTimeOffset], System.TimeZoneInfo)], IL:0, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
[System.Nullable`1[System.DateTimeOffset] GetNextExecutionIncludingNextDay(System.Nullable`1[System.DateTimeOffset], System.TimeZoneInfo, Boolean)], IL:79, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
Void ThrowInvalidOperationException(System.ExceptionResource)], IL:16, Tyhjäarvon sallivalla objektilla on oltava arvo. (0x80131509)
(M-Files 24.9.14055.3 2024-10-24T18:55:45.771Z)

Now I'm unable to save the configuration, it always gives out this error. Looks like it is coming from the recurrence-classes, but not quite sure what's the issue and which configuration property causes this as there is no mention of that.

I tried clearing the configuration by emptying all from the Advanced JSON-configuration window and then saving the configuration but I still get that same error. This is very puzzling as all the recurring task configurations have behaved very well so far and I haven't done anything different with my new configuration property either, it's very similar the existing ones that worked earlier. I'm not even sure if that's really the issue as I haven't tried to modify the configuration for a while so not quite sure when this problem might have actually started. Also it's quite weird that even clearing the configuration doesn't allow saving without that error.

I did upgrade yesterday to MFiles.VAF.Configuration 24.10.3 and MFiles.VAF.Extensions 24.10.73 and MFiles.VAF 24.5.714.1 so I wonder if there is some incompatibility issue somewhere?

Any ideas what to try next or how to debug the issue? I guess I would be happy if just could clear the whole VAF-configuration from the M-Files-server and just start with the default configurations from the VAF and then adjust what is needed, but not sure how I can even do that because I can't clear the configuration from the server.

Parents
  • Ok, can confirm that version updates to VAF-dependencies broke the configuration and by downgrading versions I got this working.

    This set works for me:

    <PackageReference Include="MFiles.Crypto">
    <Version>24.4.3</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF">
    <Version>24.1.706.3</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Configuration">
    <Version>24.4.3</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Configuration.Logging.NLog">
    <Version>24.4.3</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Extensions">
    <Version>24.2.67</Version>
    </PackageReference>
    <PackageReference Include="MFilesAPI.Extensions">
    <Version>23.3.2</Version>
    </PackageReference>

    And this breaks the configuration and along with it, recurring tasks:;

    <PackageReference Include="MFiles.Crypto">
    <Version>24.10.3</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF">
    <Version>24.5.714.1</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Configuration">
    <Version>24.10.3</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Configuration.Logging.NLog">
    <Version>24.10.3</Version>
    </PackageReference>
    <PackageReference Include="MFiles.VAF.Extensions">
    <Version>24.10.73</Version>
    </PackageReference>
    <PackageReference Include="MFilesAPI.Extensions">
    <Version>24.4.3</Version>
    </PackageReference>

    As there are multiple versions between those, can't say for sure what was the version where things broke, but I'll probably try updating later versions one-by-one to figure out what version breaks the configuration.

  • In general you should keep the package updates to be the same as those which are mandated by the nuget package (i.e. if MFiles.VAF requires exactly Interop.MFilesAPI version 24.6.2 then that is what you should have).

    These restrictions are in place for exactly this reason.  In general nuget should respect those version requirements but there are ways and means to override it.

  • Yeah, sounds like that's the issue here. What is the "main" dependency that one can/should update to latest version and then have every other version according to its dependency constraints? Would it be perhaps the Interop.MFilesAPI or MFiles.VAF...?

  • So you're using the VAF Extensions, which has a specific version dependency for MFiles.VAF...  So in your case it's the VAF Extensions.  For other applications which don't use that library then it's likely to be the MFiles.VAF library which is the one that drives the dependency constraints.

  • I upgraded the dependencies to latest versions which I think should be compatible but the error returned again.

    The dependencies that I have now are:
    [net472]:
    Top-level Package 
    > MFiles.VAF.Extensions 24.10.73
    > MFiles.VAF 24.10.720.1
    > MFiles.VAF.Configuration.Logging.NLog 24.10.3
    > MFilesAPI.Extensions 24.4.3
    > Interop.MFilesAPI 24.10.3
    > MFiles.Crypto 24.10.3
    > MFiles.VAF.Configuration 24.10.3

    Transitive Package Resolved
    > Newtonsoft.Json 10.0.3
    > NLog 5.0.1
    > NLog.Database 5.0.1

    And the dependency constraints seem to be:
    For MFiles.VAF.Extensions:
    - MFiles.VAF >= 24.5.714.1 so 24.10.720.1 should be ok
    - MFiles.VAF.Configuration.Logging.NLog >= 23.12.3 so 24.10.3 should be ok
    - MFilesAPI.Extensions >= 24.4.3 so 24.10.73 should be ok

    For MFiles.VAF:
    - Interop.MFilesAPI = 24.10.3 and that is there
    - MFiles.Crypto = 24.10.3 and that is there
    - MFiles.VAF.Configuration = 24.10.3 and that is there

    For MFilesAPI.Extensions:
    - Interop.MFilesAPI >=21.11.3 so 24.10.3 should be ok

    As far as I can see, that all looks ok to me, but when I install the VAF to M-Files, the configuration breaks. I can't modify and save it anymore without getting that initial error that I posted.

    Could you please review the above and maybe you can spot what is the problem with versions because as far as I can see, it all looks compatible according to version constraints. Even when I build the project, I get no errors from any version constraint violations so AFAIU, that also should confirm that all constraints are being followed properly.

  • I am on vacation but at first glance you look to be correct. I had a recollection that the Extensions had a specific-version constraint but it looks like that stopped a while ago.

    I haven't translated the exception details but if you're able to provide a project that reproduced the issue then I can take a look at some point next week perhaps. The fix may be to reinstate the version requirement on the Extensions.

  • FYI: The Extensions library is not an official package so you could of course drop the use of that and just use the VAF directly, then work within those package constraints.

    Alternatively, as the Extensions library is open-source, any issue/repro/pr to resolve the issue you've found would be appreciated. 

  • Ok, after doing some digging I can confirm that the bug was introduced in the latest version 24.10.73 of MFiles.VAF.Extensions. It works fine in 24.10.72!

    So something broke wrt configuration and the recurring tasks definitions in extensions between those versions.

    What I did was to remove all other M-Files related dependencies besides MFiles.VAF.Extensions and just let them come in as transitives. Not sure whey they were included as direct dependencies in the first place as I inherited this application from another consultant and they were there. But it seems to work just fine by having only MFiles.VAF.Extensions as direct dependency so that's enough for me.

  • Thank you for the report. It could well be a bug. I am out of the office for a few days though unfortunately. 

  • If you can share how you are defining that recurrence in your configuration (frequency vs whatever) then that would help. 

  • And also what you are changing the value to in the configuration?

    All of this code runs through the same method to calculate the next-execution datetime.  It seems in some situations the code is returning null, which is not being handled somewhere.  I need to try to replicate "where".

Reply Children