Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trace file for simple action: LHError.errors.NO_NAVSTART #14

Open
apenkov opened this issue Nov 26, 2019 · 3 comments
Open

trace file for simple action: LHError.errors.NO_NAVSTART #14

apenkov opened this issue Nov 26, 2019 · 3 comments

Comments

@apenkov
Copy link

apenkov commented Nov 26, 2019

I open the page with puppeteer, start the trace recording and do some action, turn off the record, then tracium.computeMainThreadTasks returns me the error /node_modules/tracium/lib/trace-of-tab.js:98
if (! navigationStart) throw new LHError (LHError.errors.NO_NAVSTART); But I want to record trace and read this trace with tracium, only for certain action, can I do it somehow?

@nolanlawson
Copy link

I observed the same thing. It seems that tracium only works if the trace file includes a navigation start event. For something like Lighthouse this makes sense, but for generic traces that may or may not contain a navigation start, it's unfortunate that it throws an error.

For the steps to repro, you can create a trace file without actually reloading or navigating to a page, then parse with Tracium.computeMainThreadTasks(). It will throw the error due to this line:

if (!navigationStart) throw new LHError(LHError.errors.NO_NAVSTART);

@patrickhulce
Copy link
Collaborator

@nolanlawson we're aware of this and slowly working on eliminating the dependency on navStart

for example GoogleChrome/lighthouse#11034 tracked by GoogleChrome/lighthouse#9519 and GoogleChrome/lighthouse#8984

@purefn
Copy link

purefn commented Dec 9, 2020

Is there any kind of workaround for this? We have a SPA and we want to use puppeteer to generate traces for different tasks. We'd like to break down each task into a set of distinct steps and generate traces for each step. Then we want to have hundreds or thousands of users performing each task concurrently. Finally, we want to use tracium to aggregate some of the metrics for analysis. But this issue is preventing us from using tracium the way we'd hoped.

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

No branches or pull requests

4 participants