"Unknown chunk index" error

Issue #427 resolved
YongYu created an issue

Hello, John! I did some testing on the issue of the "unknown chunk index" error message. The three platforms tested are MicroBlocks (Elite), MicroBlocks (Chinese community) and MicroBlocks.
Under the same program, both MicroBlocks (Elite) and MicroBlocks (Chinese community) will display an error.But not on MicroBlocks. After the error is displayed, you need to drag the blocks to burn to the development board.

MicroBlocks (Chinese community) display an error.

MicroBlocks

This is my test program.

Comments (7)

  1. John Maloney repo owner

    I have investigated.

    I did not get the "unknown chunk index" on any of the three versions of MicroBlocks: Elite, Chinese community, or MicroBlocks stable release.

    On each system, I connected to an ESP32 board (WROOM-32 module), cleared the IDE to an empty project, then dropped your test MicroBlocks program (出厂程序.ubp) onto the MicroBlocks to load it. After the loading animation in the top right was complete, I ran the program. In all my tests, the program ran for a second or two, then completed without giving a "missing chunk error".

    Thus, I suspect the problem is unreliable communications between MicroBlocks and your board.

    Your MicroBlocks program is quite large -- about 28k of compiled code and 73 functions (including the ones in the libraries). That is a lot of data that must be transferred to the board perfectly. If a byte gets dropped or misread once in a while, that might cause "missing chunk" errors sometimes but not always. Sometimes the data might be transferred to the board without error.

    Does loading your program always load and run in the MicroBlocks stable release (https://microblocks.fun/run/microblocks.html) while always failing on the other two systems? Does it make a difference if you clear the MicroBlocks IDE to to empty project first? Are you disconnecting and reconnecting the board? (I kept the board plugged in in my tests.)

    Since I cannot reproduce this problem, it may be a hardware issue. The problem could be with any of the components involved: the ESP32 board, the USB cable, the USB port, or even the computer you are using. If possible, I would to try load the exact same MicroBlocks project onto your ESP board from a different computer with a different USB cable. If you have another USB board, you could try with that as well.

    If you find a configuration that works 100% of the time, you could exchange one component at a time between that and the configuration that doesn't work. The goal is to narrow things down to a single component.

    I often see "missing chunk" errors on laptops with worn USB ports. Sometimes it helps to use a different USB port, sometimes all the ports are all worn out on a given laptop.

    I've also seen bad USB cables cause these problems. Some USB cables do not have very thick data wires. You could try some other USB cables. I hope it is just a bad USB cable; that is an easy problem to solve.

    It seems less likely to be an issue with your ESP board, although components that use a lot of power (e.g. motors, AI cameras) might cause communication issues. If you have such components, you might try disconnecting them to see if that helps.

    Good luck!

  2. John Maloney repo owner

    Are you still experiencing "Unknown chunk index" errors in the latest pilot version (v1.2.44)?

  3. John Maloney repo owner

    I believe this problem was fixed in v1.2.42. Feel free open another issue if you see this problem with v1.2.42 or later.

  4. Log in to comment