azure-functions-host: Proxies: Worker was unable to load function: The argument 'id' must be a non-empty string.
Error message cropped up today when locally running functions:
LanguageWorkerConsoleLog[error] Worker was unable to load function letsencrypt-proxy: ‘TypeError [ERR_INVALID_ARG_VALUE]: The argument ‘id’ must be a non-empty string. Received ‘’’
Haven’t changed proxy configs in a while - appears to be either unexpected schema change or bug/regression in Azure Functions Core Tools/Function Runtime.
Removed node_modules, bin, obj, etc and did npm i
. Same result.
Azure Functions Core Tools: 2.7.1373 - Commit hash: cd9bfca26f9c7fe06ce245f5bf69bc6486a685dd) Function Runtime Version: 2.0.12507.0
proxies.json (config hasn’t changed in a while)
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"letsencrypt-proxy": {
"matchCondition": {
"route": "/.well-known/acme-challenge/{*restOfPath}",
"methods": ["GET"]
},
"backendUri": "https://localhost/api/letsencrypt/{restOfPath}"
}
}
}
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 27 (3 by maintainers)
I shut down VS Code and manually killed two instances of Node.js. There were about 20 instances of the “Runtime Broker” process running (I had been writing code and testing for several hours) and I killed all of those. I restarted VS Code and was able to debug again. If I had to guess, I’d say there’s a process leakage bug.
Yes can confirm I see this too. @fabiocav @mhoeger @ColbyTresness it appears when using proxies in JavaScript it throws this error on
func start
. It does appear to be harmless in that the proxy still works locally and in cloud, but would be good to sort out.This happens for both v2 and v3, but my repro above was using the latest v3 core tools
Taking this for next sprint
As a quick workaround, I found that editing the method throwing the exception made the alarming message go away.
The source code for the NodeJS FunctionLoader seems to be here: https://github.com/Azure/azure-functions-nodejs-worker/blob/dev/src/FunctionLoader.ts
It’s possible that testing the value of
metadata.isProxy
will deal with the exception.File (on Windows) C:\Users\[YourUserName]\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\node\worker-bundle.js
Line 20055
@heyAyushh I believe this error does not actually functionally break anything. If you check your proxies they should still be working even though the error displays.
I have also had this for the past few weeks. The proxy still seems to run, but it’s unsettling to see this error every time the function starts
Same problem, came out of nowhere Also using Node
Similar issue. However, the error seems to be benign. The proxy seems to operate as expected in this simple case. Not sure if a more complex case would surface some issue: