Skip to content

Product loading can expose an internal chainHead error instead of reconnecting #228

Description

@replghost

What users see

During product loading, a reload can end at:

Domain can't be reached

chainHead follow stopped (cause: ChainHead stopped)

This is an internal light-client error and should not be shown to users. Dotli should reconnect once and continue loading, or show a user-facing connectivity error if reconnection also fails.

Scope

This is a generic resolver recovery problem. It is not specific to a product: the affected retry wrapper serves Dot-name, owner, executable-manifest, and root-manifest resolution.

The self-contained fix is isolated in #229 against main; it does not depend on #185 or application runtime behavior.

Diagnosis

A chainHead subscription can stop when its connection or chain session resets. Dotli should retry once on a replacement resolver generation.

The protocol bridge discards the remote error discriminator, while the recovery check needs to distinguish the typed ApiStoppedError. The stopped response is therefore treated as an ordinary terminal error and reaches the page.

Fix

  • preserve typed error discriminators across the iframe and SharedWorker protocol bridge;
  • retry ApiStoppedError once for generic resolver requests;
  • retain compatibility with the older wrapped error;
  • keep a second stopped response and unrelated errors terminal;
  • cover successful recovery and retry exhaustion with browser regressions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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