Skip to content

fix(rum-legacy): tell the verification page's reader what went wrong - #39

Merged
Fiona2016 merged 1 commit into
publishfrom
fix/verification-page-diagnose-load-failure
Sep 1, 2026
Merged

fix(rum-legacy): tell the verification page's reader what went wrong#39
Fiona2016 merged 1 commit into
publishfrom
fix/verification-page-diagnose-load-failure

Conversation

@Fiona2016

Copy link
Copy Markdown
Collaborator

Two ways this page fails do not name their own cause, and both look like a broken SDK to whoever is running it.

Opening it straight from the repository

The first check fails with window.FC_RUM is undefined and everything stops. The reason is that verification/ holds only index.html — the built bundle lives in packages/rum-legacy/bundle/ and the repository does not carry it. The page is meant to be reached through scripts/verification-server.js, which serves the two together.

Nothing on the page said so. The message now does:

Stopped: fc-rum-legacy.js did not load. It has to be served from the same directory as this page. This repository does not carry the built bundle - run the package build, then open this page through scripts/verification-server.js, which serves the two together.

That also covers a copy served from someone else's host, where the same symptom means the file was not copied next to the page.

Serving it over file://

The session cookie check fails, because browsers refuse to write cookies for that protocol, and the same-origin intake has no origin to answer. Two red rows, no indication that the url was the problem.

The environment table now reports location.protocol, and spells out the consequence when it is file:, so the cause sits above the failing rows instead of having to be inferred.

Both matter most on the browsers this page exists to test, which frequently have no usable console to investigate with.

Verification

Served the patched page from a directory holding no bundle and pressed Run checks: the new message renders in full, and the environment table's first row reads location.protocol http:. The file: branch is the other arm of that same expression.

prettier --check passes.

Two failures on this page do not name their own cause, and both read
as a broken SDK to whoever is looking.

Opening the page straight from the repository fails the first check
with "window.FC_RUM is undefined" and stops. The bundle is not in the
verification directory and the repository does not carry it; the page
is meant to be served through scripts/verification-server.js, which
puts the built file next to it. The message now says that.

Serving it over file:// fails the session cookie check, because the
browser refuses to write a cookie for that protocol, and leaves the
same-origin intake with no origin to answer. The environment table now
reports location.protocol, and calls out file: where it appears, so
the reason is visible above the failing rows rather than inferred.

Both matter most on the browsers this page exists to test, where there
is frequently no console to investigate with.
@Fiona2016
Fiona2016 merged commit d0cd3e0 into publish Sep 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant