Skip to content

FR: Allow comparing non-public profiles #3589

Description

@mhansen

Hi there, I'm using Firefox Profiler internally with some secret stacktraces I can't upload (sorry!), so I have an internal web server hosting some profiles. It's mostly going pretty well! I just had this issue.

I'm trying to use the comparison function on two internally hosted profiles:

image

This gives me the error:

image

AppViewRouter--error-message-compare
Error: Only public uploaded profiles are supported by the comparison function.

The relevant code is here: https://github.com/firefox-devtools/profiler/blob/main/src/actions/receive-profile.js#L1521:

      const hasSupportedDatasources = profileStates.every(
        (state) => state.dataSource === 'public'
      );
      if (!hasSupportedDatasources) {
        throw new Error(
          'Only public uploaded profiles are supported by the comparison function.'
        );
      }

My state has dataSource="from-url". Is there a reason we don't support from-url profiles? Maybe this might be an easy fix to update this to accept from-url if not?

Here's the full stack, in case it helps:

Error: Only public uploaded profiles are supported by the comparison function.
    at receive-profile.js:1524
render @ AppViewRouter.js:89
Gi @ react-dom.production.min.js:187
zi @ react-dom.production.min.js:186
Gs @ react-dom.production.min.js:269
El @ react-dom.production.min.js:250
vl @ react-dom.production.min.js:250
yl @ react-dom.production.min.js:250
pl @ react-dom.production.min.js:243
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:18
jo @ react-dom.production.min.js:122
Vo @ react-dom.production.min.js:123
Wo @ react-dom.production.min.js:122
hl @ react-dom.production.min.js:244
notify @ Subscription.js:15
notifyNestedSubs @ Subscription.js:85
o @ Subscription.js:90
p @ redux.js:296
(anonymous) @ index.js:11
dispatch @ redux.js:659
(anonymous) @ receive-profile.js:1576
async function (async)
(anonymous) @ receive-profile.js:1507
(anonymous) @ index.js:8
n.<computed> @ bindActionCreators.js:9
componentDidUpdate @ ProfileLoader.js:93
ps @ react-dom.production.min.js:219
Tl @ react-dom.production.min.js:259
t.unstable_runWithPriority @ scheduler.production.min.js:18
jo @ react-dom.production.min.js:122
xl @ react-dom.production.min.js:252
pl @ react-dom.production.min.js:243
(anonymous) @ react-dom.production.min.js:123
t.unstable_runWithPriority @ scheduler.production.min.js:18
jo @ react-dom.production.min.js:122
Vo @ react-dom.production.min.js:123
Wo @ react-dom.production.min.js:122
Me @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73

Metadata

Metadata

Assignees

No one assigned

    Labels

    comparisonfeatureWork that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXhebhelp wantedThings ready to be worked on by anyone. Issues must include instructions on how to complete the task

    Type

    No type

    Priority

    None yet

    Jira

    None yet

    Severity

    None yet

    Estimate

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions