Skip to content

Unable to subscribe using Sfdc.canvas.client.subscribe method from within the Canvas App #14

Description

@mpycio

Subscribing in the aura component works without any issues but when I try to subscribe from within the canvas app (cross domain hosting) I can see a warning in chrome network tab for Set-Cookie headers:

  • t=xxx; path=/cometd/; HttpOnly
  • sfproxy-id="xxx"; Max-Age=3600; HttpOnly

This Set-Cookie header didn't specify a "SameSite" attribute and was defaulted to "SameSite=Lax," and was blocked because it came from a cross-site response which was not the response to a top-level navigation. The Set-Cookie had to have been set with "SameSite=None" to enable cross-site usage.

And the subscribe call fails with the response:

[
    {
        "advice": {
            "interval": 0,
            "reconnect": "handshake"
        },
        "channel": "/meta/subscribe",
        "id": "2",
        "error": "403::Unknown client",
        "successful": false
    }
]

The handshake/subscribe sequence is repeated 3 times and stops.

Not sure if it fails due to the cookie not being sent back or if this is unrelated but there is no way to debug this any further. Any advice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions