paulirish / devtools-timeline-model

Unsupported
Other
173 stars 35 forks source link

Cannot read property error of undefined. #34

Open ssivanatarajan opened 6 years ago

ssivanatarajan commented 6 years ago

I am using Tracealayzer node module. got the below error in devtools-timeline module

promiserejection TypeError: Cannot read property 'error' of undefined
    at TimelineModel.TimelineModel._processMetadataEvents (chrome-devtools-frontend/front_end/timeline_model/TimelineModel.js:267:22)
    at TimelineModel.TimelineModel.setEvents (chrome-devtools-frontend/front_end/timeline_model/TimelineModel.js:174:31)
    at SandboxedModel.init (evalmachine.<anonymous>:133:25)
    at new ModelAPI (/Users/siva-6016/Documents/node scripts/puppeteer/node_modules/tracealyzer/node_modules/devtools-timeline-model/index.js:29:18)
    at init (/Users/siva-6016/Documents/node scripts/puppeteer/node_modules/tracealyzer/index.js:31:17)
    at Timeout.analyse [as _onTimeout] (/Users/siva-6016/Documents/node scripts/puppeteer/tracealyzer_test.js:5:24)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)
ssivanatarajan commented 6 years ago

Any update on this issue?

ssivanatarajan commented 6 years ago

@paulirish

goelayu commented 6 years ago

Sometimes this error is observed if your timeline trace has some missing samples. Try loading the trace using the graphic timeline viewer and see if the console gives you any error.

raviregina commented 4 years ago

@paulirish I got this same error while parsing the timeline profile.

Here is the log trace,

TypeError: Cannot read property 'error' of undefined at TimelineModel.TimelineModel._extractCpuProfile (chrome-devtools-frontend/front_end/timeline_model/TimelineModel.js:471:22) at TimelineModel.TimelineModel._injectJSFrameEvents (chrome-devtools-frontend/front_end/timeline_model/TimelineModel.js:482:31) at TimelineModel.TimelineModel._processThreadEvents (chrome-devtools-frontend/front_end/timeline_model/TimelineModel.js:505:23) at TimelineModel.TimelineModel.setEvents (chrome-devtools-frontend/front_end/timeline_model/TimelineModel.js:197:16) at SandboxedModel.init (evalmachine.:133:25) at new ModelAPI (/Users/ravi-6704/Documents/test/anonFunctionnew-copy/node_modules/devtools-timeline-model/index.js:29:18) at initial (/Users/ravi-6704/Documents/test/anonFunctionnew-copy/index.js:18:17) at Object. (/Users/ravi-6704/Documents/test/anonFunctionnew-copy/index.js:38:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

It would be very helpful if you provide the solution.

Thanks in advance!!!

lreher commented 3 years ago

Hey I know I'm 3 years late to the party, but if anyone is struggling with this issue take a look at the code for: https://www.npmjs.com/package/tracealyzer

The issue is some events need to be cleaned up before parsing.