firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.2k stars 391 forks source link

Error when navigating history in the compare interface #1736

Open julienw opened 5 years ago

julienw commented 5 years ago
  1. Load this profile
  2. Press the "Full Range" button at the top left
  3. Press the browser's "back" button

=> there's an error:

Error: Unable to get the track order from the given pid flow.js:147:10
    ensureExists flow.js:147
    getLocalTrackOrder url-state.js:106
    mapStateToProps GlobalTrack.js:225
    React 24
    onStateChange (index):972
    Redux 4
    _updateState UrlManager.js:57
    componentDidMount UrlManager.js:61
    goBack WebNavigationChild.jsm:72
    _wrapURIChangeCall WebNavigationChild.jsm:63
    goBack WebNavigationChild.jsm:72
    receiveMessage WebNavigationChild.jsm:30
    receiveMessage ActorManagerChild.jsm:160

And this is happening in:

   in Connect(GlobalTrackComponent) (created by Timeline)

┆Issue is synchronized with this Jira Task

ThobyV commented 5 years ago

Bug has been reproduced here too. Think maybe I can work on this? Also, any tips as to how and where to look? Most first issues are taken.

gregtatum commented 5 years ago

The fix for this one hasn't been specified as much. We don't currently have great testing around our URL handling, and I would like to make sure we have a test for anything we do to fix this issue. This increases the complexity of this patch a bit, since there aren't any really good tests written for the back behavior. This one would require a full component test, which is a bit trickier.

The URL handling behavior is a bit complex, but utilizes the following files:

https://github.com/devtools-html/perf.html/blob/master/src/components/app/UrlManager.js https://github.com/devtools-html/perf.html/blob/master/src/app-logic/url-handling.js https://github.com/devtools-html/perf.html/blob/master/src/reducers/url-state.js https://github.com/devtools-html/perf.html/blob/master/src/selectors/url-state.js

We also have a bunch of development docs here: https://github.com/devtools-html/perf.html/tree/master/docs-developer