facebook / memlab

A framework for finding JavaScript memory leaks and analyzing heap snapshots
https://facebook.github.io/memlab/
MIT License
4.35k stars 118 forks source link

"snapshot for the following tabs are missing:" error on find-leaks #62

Closed arunkumarv closed 1 year ago

arunkumarv commented 1 year ago
memlab find-leaks --baseline snapshots/Heap-baseline.heapsnapshot --target snapshots/Heap-target.heapsnapshot --final snapshots/Heap-final.heapsnapshot --snapshot-dir snapshots --work-dir workdir

Error: snapshot for the following tabs are missing:{ "1": { "name": "baseline", "url": "", "type": "baseline" }, "2": { "name": "target", "url": "", "type": "target" }, "3": { "name": "final", "url": "", "type": "final" } } The error is Use memlab help or memlab <COMMAND> -h to get helper text snapshot for the following tabs are missing: baseline target final

JacksonGL commented 1 year ago

There are three ways to specify inputs for the memlab find-leaks command:

  1. --baseline, --target, --final specifies each snapshot input individually
  2. --snapshot-dir specifies the directory that holds all three heap snapshot files (MemLab will assign baseline, target, and final based on alphabetic order of the file)
  3. --work-dir specifies the output directory of the memlab run or the memlab snapshot command

Please only use one of the three ways to specify the input. I guess your command failed because --work-dir is not the auto-generated working directory of the memlab run or the memlab snapshot command.

Can you try this command instead: memlab find-leaks --baseline snapshots/Heap-baseline.heapsnapshot --target snapshots/Heap-target.heapsnapshot --final snapshots/Heap-final.heapsnapshot

(Also double check that ls snapshots/Heap-*.heapsnapshot can list the files)

arunkumarv commented 1 year ago

That command worked. Thank you.