Skip to content
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

POI Update failed::System.NullReferenceException: Object reference not set to an instance of an object #190

Closed
mrw298 opened this issue Jan 17, 2022 · 2 comments

Comments

@mrw298
Copy link
Contributor

mrw298 commented Jan 17, 2022

Mirroring seems to fail because of some null / string comparisons in CacheProviderMongoDB.cs

ocm-mirror-app {"EventId":0,"LogLevel":"Information","Category":"OCM.API.Worker.Worker","Message":"POI Update failed::System.NullReferenceException: Object reference not set to an instance of an object.\n at OCM.Core.Data.CacheProviderMongoDB.PopulatePOIMirror(CacheUpdateStrategy updateStrategy, ILogger logger) in /src/API/OCM.Net/OCM.API.Core/Util/CacheProviderMongoDB.cs:line 584\n at OCM.Core.Data.CacheManager.RefreshCachedData(CacheUpdateStrategy updateStrategy, ILogger logger) in /src/API/OCM.Net/OCM.API.Core/Util/CacheManager.cs:line 69","State":{"Message":"POI Update failed::System.NullReferenceException: Object reference not set to an instance of an object.\n at OCM.Core.Data.CacheProviderMongoDB.PopulatePOIMirror(CacheUpdateStrategy updateStrategy, ILogger logger) in /src/API/OCM.Net/OCM.API.Core/Util/CacheProviderMongoDB.cs:line 584\n at OCM.Core.Data.CacheManager.RefreshCachedData(CacheUpdateStrategy updateStrategy, ILogger logger) in /src/API/OCM.Net/OCM.API.Core/Util/CacheManager.cs:line 69","{OriginalFormat}":"POI Update failed::System.NullReferenceException: Object reference not set to an instance of an object.\n at OCM.Core.Data.CacheProviderMongoDB.PopulatePOIMirror(CacheUpdateStrategy updateStrategy, ILogger logger) in /src/API/OCM.Net/OCM.API.Core/Util/CacheProviderMongoDB.cs:line 584\n at OCM.Core.Data.CacheManager.RefreshCachedData(CacheUpdateStrategy updateStrategy, ILogger logger) in /src/API/OCM.Net/OCM.API.Core/Util/CacheManager.cs:line 69"}}

I'm not much of a C# developer so there's probably a better way to do this, but this seems to get it syncing if you want a PR

mrw298@ea9c127

@webprofusion-chrisc
Copy link
Member

Hi, yes go ahead an submit a PR please, we haven't been using the mirroring recently while we are on temporary servers so that's probably why it hasn't been a problem for us.

@mrw298
Copy link
Contributor Author

mrw298 commented Jan 20, 2022

The PR is #191, please let me know if you want any changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants