Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
324 stars 56 forks source link

Python 3.6 NotSupportedException with a Node.js backend #1082

Open jannekem opened 1 year ago

jannekem commented 1 year ago

Describe the bug

We are using Static Web Apps with a managed Node.js backend but sometimes we get a System.NotSupportedException with the following message: "Version 3.6 is not supported for language python".

Call stack:

System.NotSupportedException:
   at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcWorkerDescription.ValidateRuntimeVersion (Microsoft.Azure.WebJobs.Script, Version=4.15.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/RpcWorkerDescription.cs:150)
   at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcWorkerDescription.ValidateDefaultWorkerPathFormatters (Microsoft.Azure.WebJobs.Script, Version=4.15.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/RpcWorkerDescription.cs:126)
   at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcWorkerDescription.FormatWorkerPathIfNeeded (Microsoft.Azure.WebJobs.Script, Version=4.15.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/RpcWorkerDescription.cs:199)
   at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcWorkerConfigFactory.AddProvider (Microsoft.Azure.WebJobs.Script, Version=4.15.0.0, Culture=neutral, PublicKeyToken=null: /src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/Configuration/RpcWorkerConfigFactory.cs:156)

Some exception properties:

Message: Version 3.6 is not supported for language python
Exception type: System.NotSupportedException
Failed method: Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcWorkerDescription.ValidateRuntimeVersion
Problem Id: System.NotSupportedException at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcWorkerDescription.ValidateRuntimeVersion
Assembly: Microsoft.Azure.WebJobs.Script, Version=4.15.0.0, Culture=neutral, PublicKeyToken=null
Device type: PC
Client IP address: 0.0.0.0
SDK version: azurefunctions: 4.15.1.1
FormattedMessage: Failed to initialize worker provider for: /azure-functions-host/workers/python

To Reproduce

Generally, our application has a low amount of traffic but there are spikes during which the APIs may be called about 1500 times within a 10 minute period. During these times we see the NotSupportedException.

The staticwebapp.config.json is configured to use the node:16 API runtime.

{
  "platform": {
    "apiRuntime": "node:16"
  }
}

Expected behavior

I would expect not to get Python related errors with a Node runtime.

Screenshots

Exception graph from Application Insights:

image

Gherdty commented 1 year ago

Experiencing the same problem in my node application when Http requests spike

harouny commented 10 months ago

This exact issue started to show up in my Application Insights starting from 26th of October (without any changes from my side)

image

My staticwebapp.config.json is configured to use the node:16 API runtime.

{
  "platform": {
    "apiRuntime": "node:16"
  }
}
benscattergood-empyrean commented 10 months ago

Same issue here, node:16 receiving thousands of python 3.6 errors.

nerblock commented 10 months ago

Well, we used to get answers here but Microsoft apparently withdrew their support people from Github. I guess they want us to pay for a support plan.