Skip to content

WebPubSubForSocketIO 1.0.0 — IsValidationRequest crashes on Flex Consumption (regression from beta.3) #877

@convergenceboy

Description

@convergenceboy

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions