Skip to content

[BUG] Offline Channel silently discards all messages received prior to configuration #2672

@peitschie

Description

@peitschie

Description/Screenshot

If I follow the exact setup in https://github.com/microsoft/ApplicationInsights-JS/tree/main/channels/offline-channel-js#npm-setup, the first messages are discarded due to the async nature of the channel configuration.

Specifically, the offline channel is configured via a scheduledTimeout:

Any calls to process items are discarded until this configuration is performed:

if (!!onlineStatus || !_offineSupport || !_endpoint) {

Steps to Reproduce

Run the exact setup code, and see that even when the persistence level is correctly set, the immediately messages sent are not stored by the channel.

Expected behavior

All logs should be recorded by the offline channel immediately.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions