-
Notifications
You must be signed in to change notification settings - Fork 452
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
Running Azure Functions works locally but fails upon deployment with "1 functions found (Custom) 0 functions loaded" #9720
Comments
will check and update.Thanks for reporting. |
I am seeing the same issue, however my function in written in C# .NET 8 isolated worker. |
Thank you! |
Thanks for sharing the link. I just read through the thread in that
discussion and I'm confused about what the solution was.
I see at one point that you recommended removing the try/pass statement.
Was that code breaking the function?
But then you also just recommended deploying from VS Code. But it looks
like the initial author had already tried that. Am I missing something?
…On Wed, Dec 6, 2023 at 9:11 AM bhagyshricompany ***@***.***> wrote:
pls go through this link.Azure/azure-functions-python-worker#1374
<Azure/azure-functions-python-worker#1374>
—
Reply to this email directly, view it on GitHub
<#9720 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGWECETGV2JPXJDW34O3HF3YIB4K5AVCNFSM6AAAAABAGQPEGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBSHE3DMNJRGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I deployed from both option vs2022 and vscode deployed perfectally. |
So you're saying I should just deploy again from VS Code? |
yes and share other details |
@patelchandni pls comment and confirm. |
Hey @jonmunm I made a small breakthrough yesterday. Not a very satisfying conclusion but it looks like switching from My Python script connects to a Postgres DB so I was using I still don't fully understand why this change resulted in a successful build. For one thing, both But the bigger problem I have with this process is that there was basically no visibility into the build failure within the function app. The logs simply showed "1 functions found (Custom) 0 functions loaded". We had no idea why they weren't loading and why the function would run locally but not in the cloud. |
Yes @seeess1 , of course. Somehow, deploying via VS Code make the function visible and loadable in Azure. That's why I posted both logs, from VS Code Deploy and Github actions, assuming that the last one is not doing "something" so that the function is loaded and visible ... I'm also have no idea why this happend. I think that is a third-party integration. That is, a VS Code deploy is "better" prepared to get things ready in Azure, and Github is not. That's way I'm running a test preparing DevOps Pipeline, which has fully integration with Azure. |
Is there problem solved? |
The same problem is here with .NET 8 isolated deployed from Azure DevOps. Is there any progress on tracing the cause of this issue? |
Same issue with Javascript v4 model deployed from VS Code. In my case I got it working but I'm still trying to determine if it was some kind of source code issue with one of the modules or was resolved by updating durable-functions dependency to the preview "alpha" package. |
/bot not-stale |
What should be the proper way to understand why the Azure Function can't load the found functions?! |
Would also love to know the proper way to understand why the Azure Function can't load the found functions. |
I faced the same issue, I was able to fix it after correcting the zip file structure. I am using Azure devops pipeline to create the zip file. i unchecked this option "Prepend root folder name to archive paths" and it started to work properly. |
worked for me, cleanup of the artifact and setting it up from scratch helped to be more exact in my case, instead of building function app artifact locally, i pushed the responsibility to azure:
|
Same issue ! I get 0 Functions loaded where as everything works locally. Happened several times, is there a way to get detailed logs of the issue and not the cryptic "0 function loaded" ?? |
The same issue - tried with a fresh project, deploying from the command line, deploying from VS Code. None works - just with the logs:
|
Same issue here:
I'm deploying it via Visual Studio. It looks like it is an issue with the required libraries in 'requirements.txt', as deploying a script without additional libraries (next to azure.functions and logging) works. Is there a way to troubleshoot which library is causing the issue without having to test one by one? |
did you find solutions ? |
same issue for me. |
My recommendation is to thoroughly double check all your imports and ensure the dependencies are being deployed. Basically what is different in your local environment vs what is getting pushed and installed in npm on Azure. If you have multiple functions, disable them all and go one by one until you find the culprit.
From: Guillaume ***@***.***>
Sent: Wednesday, April 24, 2024 8:49 AM
To: Azure/azure-functions-host ***@***.***>
Cc: Geoff Bruce-Payne ***@***.***>; Comment ***@***.***>
Subject: [EXT] Re: [Azure/azure-functions-host] Running Azure Functions works locally but fails upon deployment with "1 functions found (Custom) 0 functions loaded" (Issue #9720)
same issue for me.
AF works locally, I publish it on azure => deployment successful but no function loaded
Please help us !
—
Reply to this email directly, view it on GitHub<#9720 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKH3ANO7LZVDH4DEABCCKVDY66S4RAVCNFSM6AAAAABAGQPEGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZUHA3TCMZRGU>.
You are receiving this because you commented.Message ID: ***@***.******@***.***>>
…________________________________
This communication is private and may be confidential and contain information that is proprietary, privileged or otherwise legally exempt from disclosure and should be treated accordingly. If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message. In accordance with our guidelines, emails sent or received may be monitored.
|
as @k-krupka did, I stopped trying to deploy via DevOps Pipeline and I'm using Functions CLI to deploy and it works perfectly |
This is still happening! Reopen and tell us what is going on |
Same issue with dotnet-isolated|8.0. 1 functions found , 0 functions loaded. |
Hi all, I was running into the same issues mentioned above. I was using the Deployment Center in the Azure Function App to connect it to my GitHub, and no matter which packages I installed inside my requirements.txt file—even something as common as requests—the function trigger would not show up in the portal when deployed because it couldn't find the packages. The solution I found was to zip up the library packages during the GitHub build instead of letting Oryx do the remote build. Here are the changes I made to the GitHub workflow file to achieve this:
This way you can still use the V2 programming model and can use Github Actions instead of VSCode to deploy to the Azure Function. |
This is what fixed it for me. Appreciate it! I believe this happens if you're trying to load config variables from ENV variables and they're not set. |
Working with Functions CLI to deploy is the only way it is working right now. Regards |
I have the same issue using .NET and Azure DevOps. |
I have the same issue using .NET 8 dotnet-isolated and Azure DevOps. |
same issue over here, any suggestion how to fix it? downgrading to "Microsoft.Azure.Functions.Worker.Sdk" Version="1.15.1" fixed the issue with not loaded function, but after it has an issue with language worker |
.Net 8, same issue here as well. Tried Azure func CLI, tried changing the azure function app to run on windows, nothing helps. Runs locally absolutely fine. |
I am using .net 8 after switching to use windows hosting for azure function and changing the Microsoft.Azure.Functions.Worker.Sdk version to 1.15.1 and deploying via vs code, the function appeared in the function app. Deploying via azure function cli or via github actions, did not help. I was thinking if the downgrade does not work, I will try using .net 6. but did not have to. |
Works for me!! amazing |
The thing that changed it for me was using |
For anyone looking for a fix, for me this this occurs when there is code before the function handlers (at least in python) that errors. This code runs on function init, and therefore if there is errors in this code Azure will fail to find the functions. |
In our case we have a function application running on .NET 8.0 in the isolated worker model. Commenting out the 'extensionBundle' element of the host.json file allowed the application to deploy correctly.
|
This works like a charm, you are a legend, thank you. It appears that remote build is the source of all problems and it doesn't build all packages, please update this documentation somewhere |
To summarize the resolution for the The Azure Function app does not log the error from the The Azure Function app also will not have the necessary dependencies required to run your function build, particularly for non-.NET code like Node.js. Therefore, it is generally recommended to include all dependencies in the zip file when deploying functions. Additionally, try running the function build in a clean environment to detect any missing dependencies. For example, a Node.js package may need to have the |
Also worth mentioning that there was some kind of breaking change (probably in
Before everything was working using the same command in our CI pipeline. UPDATED: It turns out that folks decided to make a breaking change in MINOR version of GitHub upload artifact action that stopped including hidden files and folders: https://github.com/actions/upload-artifact/releases/tag/v3.2.0 Now you have to pass include-hidden-files flag to include
Hope it will be helpful for someone. |
That's such a strange inclusion on a minor change. Thank you so much mate, lifesaver! |
Very helpful, thank you!! Our function app was experiencing an outage, this saved the day. |
+1. That's a shame there is no informative logs about the root issue. |
Where did you find this comment? I cannot find it in the thread. Thanks :) |
In my case, Node.JS application, one of the packages used in the code was installed as dev dependency, and in deployment, I installed only prod. Fixed by moving the package to prod. |
I have an Azure Function that works locally. But when I deploy it to the cloud, it apparently doesn't load and therefore doesn't execute. The logs from the deployed code show:
1 functions found (Custom) 0 functions loaded
message. Here's what's happening in more detail:My application is running on Python 3.9. When I run it locally using the
Run and Debug
mode in VS Code, I can see it executes successfully in the terminal output.Then I try deploying from VS Code to my Function App:
And the terminal output shows the deployment is successful:
But when I go to the Function App in the Azure Portal, no functions are listed there:
And the log stream shows:
So it seems like the code is deploying but the Function App can't load it for some reason.
Have looked around for a solution but no luck yet. I found this thread but it looks like that was specifically related to functions failing locally, whereas my function runs locally but not when deployed to the cloud. Hoping this thread can help me figure out my particular issue.
The text was updated successfully, but these errors were encountered: