We've been running into a rather nasty scope related issue, one that only comes up intermittently and can be quite difficult to reproduce.
In our case we where communicating with an azure sql database, had a IUserComposer with a database query to cmsDictionary and cmsLanguageText and a later component then used IContentService GetRootContent.
At that point we would get a NullReferenceException on the instance of UmbracoDatabase and it's property Transaction when Umbraco 8 core attempted to access that property inside SqlServerSyntaxProvider's ReadLock()
We first attempted a fix using autoComplete: true as a parameter of CreateScope() however unbeknownst to us that scope apparently was a nested scope as that had no effect. Manually completing these cmsDictionary and cmsLanguageText however ended up doing the trick.
Likely this situation was a combination of factors since i was unable to reproduce it in a fresh project with similar code unless i ended up copying the binary folder over....
We did try out building Umbraco locally and using 8.6.4 since it mentioned azure fixes but that did not help.
Scope usage in u8
We've been running into a rather nasty scope related issue, one that only comes up intermittently and can be quite difficult to reproduce.
In our case we where communicating with an azure sql database, had a IUserComposer with a database query to cmsDictionary and cmsLanguageText and a later component then used IContentService GetRootContent.
At that point we would get a NullReferenceException on the instance of UmbracoDatabase and it's property Transaction when Umbraco 8 core attempted to access that property inside SqlServerSyntaxProvider's ReadLock()
We first attempted a fix using autoComplete: true as a parameter of CreateScope() however unbeknownst to us that scope apparently was a nested scope as that had no effect. Manually completing these cmsDictionary and cmsLanguageText however ended up doing the trick.
Likely this situation was a combination of factors since i was unable to reproduce it in a fresh project with similar code unless i ended up copying the binary folder over....
We did try out building Umbraco locally and using 8.6.4 since it mentioned azure fixes but that did not help.
is working on a reply...