Skip to content

Show more user friendly errors for unsupported profile version in both the frontend and the cli#6107

Merged
canova merged 2 commits into
firefox-devtools:mainfrom
canova:cli-update-tip
Jun 18, 2026
Merged

Show more user friendly errors for unsupported profile version in both the frontend and the cli#6107
canova merged 2 commits into
firefox-devtools:mainfrom
canova:cli-update-tip

Conversation

@canova

@canova canova commented Jun 17, 2026

Copy link
Copy Markdown
Member

Fixes #6105

I initially wanted to add extra information to the profile version errors in the cli, because currently we don't give any hint about how to update it. But while doing that, I realized that we could also improve the error handling of the frontend a bit more.

The old frontend error was a non-localized text. This commit creates a new localized text for this type of error and serializes it in a more friendly way. Probably it's a bit of an overkill for this error as it should ideally be not seen by the users, but there were existing errors with the same way, so I wanted to be consistent.

Also, the cli now shows a tip about how to update the cli.

Frontend:
Before:
Screenshot 2026-06-17 at 15 05 53

After:
Screenshot 2026-06-17 at 15 22 31

CLI:
Before:
Screenshot 2026-06-17 at 15 23 58

After:
Screenshot 2026-06-17 at 15 03 34

@canova canova requested a review from a team as a code owner June 17, 2026 13:28
@canova canova requested a review from mstange June 17, 2026 13:29
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 14.28571% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.35%. Comparing base (940b0b2) to head (53a3071).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/errors.ts 0.00% 7 Missing ⚠️
src/components/app/AppViewRouter.tsx 33.33% 2 Missing ⚠️
src/profile-logic/gecko-profile-versioning.ts 0.00% 1 Missing ⚠️
src/profile-logic/process-profile.ts 50.00% 1 Missing ⚠️
src/profile-logic/processed-profile-versioning.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6107      +/-   ##
==========================================
- Coverage   83.37%   83.35%   -0.03%     
==========================================
  Files         339      339              
  Lines       35929    35941      +12     
  Branches    10056    10058       +2     
==========================================
+ Hits        29955    29957       +2     
- Misses       5546     5556      +10     
  Partials      428      428              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread locales/en-US/app.ftl Outdated
# This error message is displayed when the profile is in a newer format version
# than this build of the Profiler is able to read.
AppViewRouter--error-profile-version =
This profile was recorded in a newer format than this version of

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can simplify this?

AppViewRouter--error-profile-version =
    This profile uses a format that is not supported by this version of { -profiler-brand-name }.
    Try refreshing the page to check if there is an update available for { -profiler-brand-name }.

Do you have a version number for the format to display in the error?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, updated the text.

Yeah it's included in the Error message below, but it's not localized. I thought it is too much technical detail, that's why I didn't add them, but happy to reconsider if you think otherwise.

This is the message, only the top sentence is localized and the below is coming from the thrown out error:
Screenshot 2026-06-17 at 15 22 31
(currently none of our messages below are localized)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we were only showing this string. If we're showing the version number below, that works.

canova added 2 commits June 18, 2026 11:20
This will allow us to see the package name from the cli source code and
suggest updating it via npm.
…h the frontend and the cli

I initially wanted to add extra information to the profile version
errors in the cli, because currently we don't give any hint about how
to update it. But while doing that, I realized that we could also
improve the error handling of the frontend a bit more.

The old frontend error was a non-localized text. This commit creates a
new localized text for this type of error and serializes it in a more
friendly way. Probably it's a bit of an overkill for this error as it
should ideally be not seen by the users, but there were existing errors
with the same way, so I wanted to be consistent.

Also, the cli now shows a tip about how to update the cli.
@canova canova enabled auto-merge June 18, 2026 09:21
@canova canova merged commit 4bd8b75 into firefox-devtools:main Jun 18, 2026
22 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.

Suggest running npm install -g to the user for the cli if a profile is failed to load due to version mismatch

3 participants