-
Notifications
You must be signed in to change notification settings - Fork 450
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
DryIoc.ContainerException : Scope disposed{no name, Parent=disposed{no name, Parent=disposed{no name}}} is disposed and scoped instances are disposed and no longer available #4989
Comments
Some initial questions in case anyone comes across this (we haven't been able to reproduce this yet):
Thanks for the help. |
I have the same issue as the one described in the stackoverflow post. My azure function stopped suddently to work, I guess due to the new Azure functions runtime release. |
I am seeing this issue as well. For me it occurs in all my timer trigger functions. I cannot reproduce it locally as I seem unable to get the newest runtime SDK. Pinning the Azure Functions runtime to 2.0.12673.0 makes the code work again without any changes as reported by @TechWatching Fortunately only my dev environments has been updated so far. Can see prod still runs on 2.0.12673.0. As emergency action I need to pin the version in prod but in reality you could just have killed my prod environment without me being able to do anything. Please fix this asap |
/cc @fabiocav @TechWatching / @rasmustherkelsen -- can either of you share with me the details of your DI setup? We don't yet have a repro for this error and we're trying to establish the pattern that causes it. We suspect the error is due to a fix in another DI area (specifically the fix for #3399, which was PR #4923). If you're not able to share publicly, would you be able to email me (my microsoft email is in my profile) and share some of your code with us? |
@brettsam I was experiencing the same issue, but mine was with a Topic Trigger. The only dependency I was taking was an I was having another issued when I downgraded as well. One of my other Topic Trigger functions was taking a class parameter so the runtime would deserialize the message body into my class for me. We typically do this for all functions that are listening to topics. While this works for the others, this particular function was throwing a deserialization exception. I was forced to take a string parameter instead to get past this for the time being. |
@vrossi -- yes, if you're able to send me some code via email that would help immensely. Once we have a root cause we can figure out how we can get both issues resolved. |
I also have this issue. It works locally but when deployed it to Azure I get this error. |
@brettsam I just sent you an email with some code (object email is "GitHub issue 4989"). Tell me if you need there is other things you need to investigate. |
Thanks for the help @vrossi and @TechWatching! I've been able to reproduce this with a simple app that registers Can anyone confirm if this is what you're seeing as well? It's possible there are other permutations of getting into this bad state, but this has worked 100% of the time for me. The current workaround is to set the |
Interesting. I will try to reproduce this behaviour tomorrow as it is getting a bit late here in Europe now. |
I had same issue. I applied the workaround recommended by brettsam it is working for now, until a fix is provided. Thanks brettsam! |
I did not test it since, but I can confirm you @brettsam that I had the issue just after running the function through the "Run" button of the portal. |
Thanks all -- we have a fix in #4999 and will be working to roll it out. |
We'll start the hotfix rollout this morning. Thanks again for reporting, for all the information shared and the patience while we investigated the problem! |
I can confirm that with the latest run-time (Runtime version: 2.0.12742.0 (~2)), I am no longer receiving this error. #5060 |
This was globally deployed and resolved with the patch mentioned by @brettsam. Closing as resolved. |
I have the same problem |
This is a fairly generic error that can occur for a number of reasons. We have another fix coming soon that addresses another code path that could hit this: #5330. @a8775 -- if you have a repro that you can share with us (via github or even a gist), that would be very useful in seeing if this will be addressed with the fix. If so, could you please open a new issue and tag me in it? |
Could you please at least publish the full stack trace in the error message? We are basically clicking around until we can get lucky like a slot machine with error message. |
@ilayn full exception details will be available in Application Insights (or console if local). What logs are you looking at? |
There is nothing related to logs or App Insight. In our case the issue was the azure web interface was not refreshing after we deleted one subfunction from the function app. So it was still trying to find the deleted app in the frontend. We have succesfully deleted the same app at least three times consecutively until something triggered a refresh. In the meantime browser and even PC restart didn't solve anything. But it could have told us that there was a problem with the deletion instead of this not-so-helpful tongue twister. This error message can be just removed as it signals absolutely nothing to the user side other than disposed things are disposed. If it is for internal use then it can be avoided as a popup. Because it certainly doesn't help. |
From https://stackoverflow.com/questions/58129379/azure-functions-scoped-instances-are-disposed-and-no-longer-available
I am receiving below error when function app is running on the run-time version "2.0.12701.0" (FUNCTIONS_EXTENSION_VERSION = ~2 in App Settings). As soon I change the FUNCTIONS_EXTENSION_VERSION to 2.0.12673.0 in App Settings. function starts working without any code change or deployment.
The text was updated successfully, but these errors were encountered: