-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Extension version: Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO 1.0.0 (GA)
Hosting plan: Azure Functions Flex Consumption (Linux, Node.js 22)
Works on: 1.0.0-beta.3, Linux Consumption plan
Problem
All socketiotrigger functions fail to execute on the Flex Consumption plan. The extension throws an unhandled System.InvalidOperationException on every inbound webhook from Web PubSub:
System.InvalidOperationException: The given header was not found. at System.Net.Http.Headers.HttpHeaders.GetValues(String name) at Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO.Utilities.IsValidationRequest(...) at Microsoft.Azure.WebJobs.Extensions.WebPubSubForSocketIO.WebPubSubForSocketIOTriggerDispatcher.ExecuteAsync(...)
Root cause
Utilities.IsValidationRequest calls HttpHeaders.GetValues("WebHook-Request-Origin"), which throws when the header is absent. On Flex Consumption, this header is not present on event delivery requests (only on validation requests). The beta.3 build uses TryGetValues, which handles the missing header gracefully.
Impact
No socketiotrigger function can execute on Flex Consumption — connected, disconnected, and all user events are silently dropped. HTTP-triggered functions are unaffected.
Workaround
Downgrade to 1.0.0-beta.3 in extensions.csproj.
Suggested fix
In Utilities.IsValidationRequest, replace GetValues with TryGetValues (matching the beta.3 implementation).