firefox-devtools / firefox-devtools/profiler

Fix "Failed to find the thread indexes for given tab ..." warnings in tests

Open
#6,049 3 comments 0 reactions 1 assignee Claimed by @w3lld1 View on GitHub
code maintenance tests
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 5h
Merged PRs (30d)
30

Description

Similar to #6048, since it's easier to spot the warnings, I also see these:

```
PASS browser src/test/url-handling.test.ts
● Console

console.warn
Failed to find the thread indexes for given tab 123

808 | // This is not really a possible path. It might indicate a bug on the frontend
809 | // or backend.
> 810 | console.warn(`Failed to find the thread indexes for given tab ${tabID}`);
| ^
811 | return globalTracks;
812 | }
813 |

at warn (src/profile-logic/tracks.ts:810:13)
at filterGlobalTracksByTab (src/profile-logic/tracks.ts:774:18)
at src/actions/receive-profile.ts:1389:45
at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
at Object.dispatch (src/test/url-handling.test.ts:2116:5)

console.warn
Failed to find the thread indexes for given tab 321

808 | // This is not really a possible path. It might indicate a bug on the frontend
809 | // or backend.
> 810 | console.warn(`Failed to find the thread indexes for given tab ${tabID}`);
| ^
811 | return globalTracks;
812 | }
813 |

at warn (src/profile-logic/tracks.ts:810:13)
at filterGlobalTracksByTab (src/profile-logic/tracks.ts:774:18)
at src/actions/receive-profile.ts:1389:45
at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
at Object.dispatch (src/test/url-handling.test.ts:2128:5)

console.warn
Failed to find the thread indexes for given tab 123

808 | // This is not really a possible path. It might indicate a bug on the frontend
809 | // or backend.
> 810 | console.warn(`Failed to find the thread indexes for given tab ${tabID}`);
| ^
811 | return globalTracks;
812 | }
813 |

at warn (src/profile-logic/tracks.ts:810:13)
at filterGlobalTracksByTab (src/profile-logic/tracks.ts:774:18)
at src/actions/receive-profile.ts:267:45
at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
at dispatch (node_modules/redux/src/applyMiddleware.ts:52:38)
at dispatch (src/actions/receive-profile.ts:216:5)
at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
at dispatch (node_modules/redux/src/applyMiddleware.ts:52:38)
at dispatch (src/actions/receive-profile.ts:176:13)
at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
at dispatch (node_modules/redux/src/applyMiddleware.ts:52:38)
at dispatch (src/actions/receive-profile.ts:423:11)
at Object.dispatch (node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14)
at dispatch (src/test/url-handling.test.ts:112:11)
at Object._getStoreWithURL (src/test/url-handling.test.ts:2153:26)
```

I don't know yet if they are real issues or just warnings because we didn't add/update the pages array. Would be good to get rid of them too.

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-1307)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.