anakic/Jot

idFunc is null when calling GetStoreId

anders-eriksson opened this issue · 4 comments

I have just upgraded to version 2.1.11 via NuGet (.NET Framework 4.8)
Now I get System.NullReferenceException on the GetStoreId()
It's idFunc that is null!

in version 2.0.3 this worked.


// 1. get the tracking config for MainWindow
var cfg = Services.Tracker.Configure<Window>();
// 2. get the storeId of this window (do you have the window instance at this point? If not, you can use a throwaway window instance with the same Name)
var storeId = cfg.GetStoreId(this);
// 3. getting the values for the specified storeId
var dict = Services.Tracker.Store.GetData(storeId); // here I get a NullReferenceException 

Any idea on what could be wrong?

@anders-eriksson Thanks for the update. Just confirmed it's a bug... It's because of the hacky way I derived TrackingConfiguration<T> from TrackingConfiguration. I'll fix it some time this week.

OK, There is no panic. I have downgraded to 2.0.3
Which does what I want it to do!

But as always it's better to have the latest version...
Thank you for all the work you put into this!

@anders-eriksson I've just pushed a new version (2.1.12.) where this is fixed properly. Let me know if it fixes the bug for you and I'll close the issue if it does.

It works perfectly!
Thank you very much!

// Anders