Search code examples
azureazure-functionsazure-storage

I don't have a 'azure-webjobs-hosts' container in azure storage explorer, therefore my azure function app will not run


I've pulled in our development project and other developers have no issue.

I am running Azure Storage Emulation.

In my case, when I run it, I get a 404 error saying can't find the container.

Drilling into it, the container is 'azure-webjobs-hosts', and googling this shows this to be a standard container name, that stores webjob information.

I cannot find how this is first created though, and the code I have pulled in, which is based on a default new project, does not appear to create it.

I would like to how 'azure-webjobs-hosts' container is usually created, as I can't find anything online. Perhaps I need to install some kind of tool, library or SDK?

I would assume it is supposed to be created automatically if it is missing, but it would appear that I've missed a step somehow.

If I manually create the container, it then complains about a missing blob, and rather than try to patch this together myself I thought it would be better if I found out the root issue and resolved it.

Any suggestions?


Solution

  • I've solved this problem and it was very simple. I had break on all exceptions turned on.

    For some reason they decided that even though having no container is expected the first time, they would throw an exception. This exception is rethrown a few times, and eventually handled by something that creates the container.

    IMO this is bad design, considering the program expects there to be no container the first time you run it and will create it if needed, it shouldn't be an exception.

    Anyway, this was the reason. Hammering F5 or setting your exception settings to default so it doesn't catch runtime errors will fix the problem.