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

fetch-tool fails to work with SharedTree ops #21866

Open
arafat-java opened this issue Jul 12, 2024 · 0 comments · May be fixed by #21867
Open

fetch-tool fails to work with SharedTree ops #21866

arafat-java opened this issue Jul 12, 2024 · 0 comments · May be fixed by #21867
Labels
bug Something isn't working

Comments

@arafat-java
Copy link
Contributor

Describe the bug

When fetch-tool is used to fetch all the ops it fails to fetch block of type="idAllocation" associated with SharedTree
This op usually comes with sequenceNumber=2 with Brainstorm sample app

The op data looks as follows

{
  "minimumSequenceNumber": 1,
  "sequenceNumber": 2,
  "clientId": "efc3d07f-dbc6-45ed-ab21-4165b61667fc",
  "expHash1": "-7346afd1",
  "contents": {
    "sessionId": "6150ee00-657c-4cc3-98c3-534ef1334d87",
    "ids": {
      "firstGenCount": 9,
      "count": 1,
      "requestedClusterSize": 512,
      "localIdRanges": []
    }
  },
  "clientSequenceNumber": 1,
  "traces": [],
  "type": "idAllocation",
  "referenceSequenceNumber": 1,
  "timestamp": 1720800605952
}

The error we get is as follows

ERROR: TypeError: Cannot read properties of undefined (reading 'type')
    at processOp (/Users/arafat/arafat_project/CEDIT/FluidFramework-docker-compose-up/FluidFramework/packages/tools/fetch-tool/dist/fluidAnalyzeMessages.js:459:48)
    at DataStructureAnalyzer.processOp (/Users/arafat/arafat_project/CEDIT/FluidFramework-docker-compose-up/FluidFramework/packages/tools/fetch-tool/dist/fluidAnalyzeMessages.js:180:13)
    at printMessageStats (/Users/arafat/arafat_project/CEDIT/FluidFramework-docker-compose-up/FluidFramework/packages/tools/fetch-tool/dist/fluidAnalyzeMessages.js:378:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fluidFetchOneFile (/Users/arafat/arafat_project/CEDIT/FluidFramework-docker-compose-up/FluidFramework/packages/tools/fetch-tool/dist/fluidFetch.js:37:5)

To Reproduce

Steps to reproduce the behavior:

  1. Clone https://github.com/microsoft/FluidExamples/tree/main/brainstorm
  2. Build and start the app using npm run start
  3. Create a document
  4. Use the document id in the fetch-tool (E.g. node dist/fluidFetch.js --dump:rawmessage --filter:messageType op --saveDir /Users/arafat/FluidFramework/packages/tools/fetch-tool/example 'http://localhost:3000/d/a0e5bd93-3f1c-44e3-b917-132a306d13d5')
  5. See the above mentioned error

Expected behavior

There should have been no error and instead the entire list of ops should have got printed on console

Logs

ERROR: TypeError: Cannot read properties of undefined (reading 'type')
    at processOp (/Users/arafat/arafat_project/CEDIT/FluidFramework-docker-compose-up/FluidFramework/packages/tools/fetch-tool/dist/fluidAnalyzeMessages.js:459:48)
    at DataStructureAnalyzer.processOp (/Users/arafat/arafat_project/CEDIT/FluidFramework-docker-compose-up/FluidFramework/packages/tools/fetch-tool/dist/fluidAnalyzeMessages.js:180:13)
    at printMessageStats (/Users/arafat/arafat_project/CEDIT/FluidFramework-docker-compose-up/FluidFramework/packages/tools/fetch-tool/dist/fluidAnalyzeMessages.js:378:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fluidFetchOneFile (/Users/arafat/arafat_project/CEDIT/FluidFramework-docker-compose-up/FluidFramework/packages/tools/fetch-tool/dist/fluidFetch.js:37:5)
@arafat-java arafat-java added the bug Something isn't working label Jul 12, 2024
@arafat-java arafat-java linked a pull request Jul 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant