Just did a bit of a discovery session as I still have issues using rc8.0, there are several Board Libraries that will break rc8.0. Passing on this info so others more knowledgeable than me on the inner workings of IDE 2.0.0-rc8 can digest and resolve if practicable.
If these Board Libraries are added for use in IDE 2.0.0-rc8.0, via the "Additional Boards Manager URLs", it breaks the Board manager and Library Manager. Nothing will be shown in either list.
Removing the library from the list, then restarting IDE2, resolves the issue and the other existing Board Manager and Library Manager lists show correctly.
There may be more but I have not proceeded further as yet.
The bug where the IDE is non-functional when the package index is invalid has been fixed:
The fix was made after the 2.0.0-rc8 release you are using, so currently it is only available when using the nightly build. The nightly build links are listed here:
That fix is only about being resilient to invalid data. The boards platforms from the invalid package index will still not be available from Boards Manager, but the IDE will not be otherwise affected.
The problem with this one is the DFRobot developers used the horrible "UTF-8 BOM" encoding in this file. This is in violation of the JSON specification:
Implementations MUST NOT add a byte order mark to the beginning of a
JSON text.
The problem with this one is the trailing comma on the packages[0].platforms[0].toolsDependencies object:
},
],
This is invalid JSON:
A member of the community submitted a fix for this, as well as the invalid filename, two years ago, but this obvious, simple, non-controversial contribution has been ignored by DFRobot:
If they are not capable of such basic tasks as producing valid JSON files and maintaining their repository, it makes me wonder about the quality of the hardware they sell...
I was not able to find any problem with this one.
If you start the Arduino IDE from the command line, it will print an error message when there is an invalid package index.
For example, here is what it shows when you have https://raw.githubusercontent.com/DFRobot/DFRobotDuinoBoard/master/package_dfrobot_iot_mainboard.json in your preferences:
root ERROR Uncaught Exception:
root ERROR Error: The index of the cores and libraries must be updated before initializing the core gRPC client.
The following problems were detected during the gRPC client initialization:
- code: 9, message: Loading index file: loading json index file c:\Users\per\AppData\Local\Arduino15\package_dfrobot_iot_mainboard.json: parse error: syntax error near offset 1312 of '],
...'
at isIndexUpdateRequiredBeforeInit (C:\ide 2\rel\2.0.0-rc8\resources\app\node_modules\arduino-ide-extension\lib\node\core-client-provider.js:293:11)
at CoreClientProvider.evaluateErrorStatus (C:\ide 2\rel\2.0.0-rc8\resources\app\node_modules\arduino-ide-extension\lib\node\core-client-provider.js:161:23)
at ClientReadableStreamImpl.<anonymous> (C:\ide 2\rel\2.0.0-rc8\resources\app\node_modules\arduino-ide-extension\lib\node\core-client-provider.js:151:36)
at ClientReadableStreamImpl.emit (node:events:394:28)
at endReadableNT (node:internal/streams/readable:1331:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
So you might give that a try to see if it provides
I think the second file is clearly just bad data, but the first is maybe borderline. As the JSON specification says:
In the interests of interoperability, implementations
that parse JSON texts MAY ignore the presence of a byte order mark
rather than treating it as an error.
So it might be worth considering adding support for this encoding if it isn't too difficult.
If you would like, you can submit a request for that to the Arduino developers. The tool that handles the package index files is actually Arduino CLI (Arduino IDE 2.x uses Arduino CLI under the hood), so it is that issue tracker where the request should be submitted:
I was also able to reproduce the problem when using that Boards Manager URL directly with Arduino CLI.