FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

fetch-tool is broken for "rawmessage" and other options

Open KRyan opened this issue 6 years ago • 2 comments

Describe the bug

The fluid-fetch tool is failing with an error on multiple options.

To Reproduce

  1. npm i and npm run build:fast in the repo
  2. Fetch keys from tools/getKeys following the readme instructions
  3. Navigate to packages/tools/fetch-tool/bin.
  4. Run the tool on a fluidpreview document with the option --dump:rawmessage. Note this also repros with stat options.
  5. See the error below.
ERROR: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert_1.strict(innerContents.type !== undefined)

    at Object.unpackRuntimeMessage (C:\git\FluidFramework\packages\runtime\container-runtime\dist\containerRuntime.js:76:22)
    at processOp (C:\git\FluidFramework\packages\tools\fetch-tool\dist\fluidAnalyzeMessages.js:420:52)
    at DataStructureAnalyzer.processOp (C:\git\FluidFramework\packages\tools\fetch-tool\dist\fluidAnalyzeMessages.js:183:13)
    at Object.printMessageStats (C:\git\FluidFramework\packages\tools\fetch-tool\dist\fluidAnalyzeMessages.js:386:30)
    at async fluidFetchOneFile (C:\git\FluidFramework\packages\tools\fetch-tool\dist\fluidFetch.js:32:5)
generatedMessage: true
code: "ERR_ASSERTION"
actual: false
expected: true
operator: "=="

Expected behavior

Successful fetch

KRyan avatar Oct 01 '20 22:10 KRyan

@KRyan @jatgarg Have either of you run the tool between now and Jatin's fix 2 days ago? I just tried running it from tip of main and I'm seeing this (new?) error:

ERROR: TypeError: Cannot read property 'type' of undefined
    at processOp (/Volumes/Macintosh HD - Data/b/GitHub/FluidFramework-1/packages/tools/fetch-tool/dist/fluidAnalyzeMessages.js:429:40)
    at DataStructureAnalyzer.processOp (/Volumes/Macintosh HD - Data/b/GitHub/FluidFramework-1/packages/tools/fetch-tool/dist/fluidAnalyzeMessages.js:184:13)
    at Object.printMessageStats (/Volumes/Macintosh HD - Data/b/GitHub/FluidFramework-1/packages/tools/fetch-tool/dist/fluidAnalyzeMessages.js:387:30)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async fluidFetchOneFile (/Volumes/Macintosh HD - Data/b/GitHub/FluidFramework-1/packages/tools/fetch-tool/dist/fluidFetch.js:32:5)

heliocliu avatar Oct 08 '20 05:10 heliocliu

I will try it out.

jatgarg avatar Oct 08 '20 15:10 jatgarg