Upon publishing the bot to Azure function, the Azure function goes down and doesnt respond to any request
I have followed the steps for publishing bot to Azure Function with resources created through the command line script
The Function App shows up the below error

And the status of the runtime shows as error

And the diagnosis says

⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
1.1.1
Chrome
Follow steps for Azure function as provided here
https://docs.microsoft.com/en-us/composer/how-to-publish-bot
The function should not error and the bot should reply over the bot channel registration test panel
Added above at relevant place
The function apps were created through the commandline script as provided in the documentation
@carlosscastro Can you take a look at this?
Any update please?
@carlosscastro Any update on this?
@saikumaru
Apologies for the delay in answering this. Azure Functions Bots are no longer supported. The architecture for putting bots on functions was for v3, not v4.
Pardon me but the documents says Azure Function is in Preview rather than Depreciated.
Are we referring to the same piece, if so would you please mind correcting the document so that we aren't misled?
https://docs.microsoft.com/en-us/composer/how-to-publish-bot
Enter a name for your publish file and select where you would like to publish your bot: Publish bot to Azure Web App (Preview), or Publish bot to Azure Functions (Preview).
My apologies. I didn't realize Composer was adding that functionality. I'll go ahead and reopen this issue, and reach out to a member of the composer team.
@saikumaru I also tracked the issue here if it has to do with the docs.
https://github.com/MicrosoftDocs/composer-docs/issues/11
team, would you have an update here please?
If we need to offer composer to our clients with Azure function as a PAYG option, this is just holding us down.
Assigning to @v-kydela as I'm unable to run composer at the moment.
@saikumaru - Have you tried this with an out-of-the-box echo bot?
Yes, that is exactly what I have tried to start off with.
@saikumaru - I get the same error from the function app: System.IO.FileSystem.Watcher: Error reading the D:\home\site\wwwroot\. directory.
I also notice that it says the function host is not running:

It appears that the Composer script does not deploy the function correctly
That is correct and glad that you can replicate. Also, I have no way to debug and see what the issue could be even if I try to download that code from functions and test.
Can you also advise when this can be resolved?
Any update team?
Hello, sorry I missed this thread. I'll follow the steps and troubleshoot tonight.
Was able to reproduce the bug. I'll work on a fix, most likely will go out on the next release of composer in early Nov. However once the change hits main, you could use composer from nightly build or from source. If the change only affects the runtime, then you could just update your runtime without updating composer. I won't be sure of the exact scope of the fix until I finish it. I'll update with details on how to get access when that happens.
This is an issue we are having as well with a bot we were hoping to put into production soon.
If you check PR #4570 , it captures the fix to make functions work again and some improvements to have it work in more environemnts. Options to get this fix are 1) wait for the next composer release or 2) eject your runtime and apply that fix to unblock right away. I'd wait until the PR is closed to adopt the fix to make sure we are happy with the final code.
Most helpful comment
If you check PR #4570 , it captures the fix to make functions work again and some improvements to have it work in more environemnts. Options to get this fix are 1) wait for the next composer release or 2) eject your runtime and apply that fix to unblock right away. I'd wait until the PR is closed to adopt the fix to make sure we are happy with the final code.