Skip to content

Installation: Failed to parse ... library_index.json #1171

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

Closed
climategadgets opened this issue Apr 13, 2020 · 8 comments
Closed

Installation: Failed to parse ... library_index.json #1171

climategadgets opened this issue Apr 13, 2020 · 8 comments

Comments

@climategadgets
Copy link

Describe the bug
"Problem occured" dialog box pops up, with the following message:

Failed to parse json file "${eclipse-installation-location}/arduinoPlugin/library_index.json"
java.io.EOFException: End of input at line 149641 column 19 path $.libraries[6779].checksum

Note: the file at the specified path doesn't exist.

To Reproduce
Steps to reproduce the behavior:

  1. Initiate "Install Sloeber Product" from Ecipse Marketplace
  2. See error.

Expected behavior
Product installs.

Screenshots
N/A

Desktop (please complete the following information):

@jantje
Copy link
Member

jantje commented Apr 13, 2020

I guess there was a glitch during install that made the download fail.
Sloeber deletes the file and the reference to it in case files fail to download

@climategadgets
Copy link
Author

Are there any actions that can be taken so that this error doesn't happen? It is pretty reproducible, up to wiping out the whole Eclipse installation and starting afresh.

@jantje
Copy link
Member

jantje commented Apr 13, 2020

It doesn't happen here.
The file that Sloeber tries to download is http://downloads.arduino.cc/libraries/library_index.json
Maybe you can try https://downloads.arduino.cc/libraries/library_index.json
If you do not have the file you don't have the Arduino provided libraries.
As far as I understand starting a second time the error should no longer be.

@jantje
Copy link
Member

jantje commented Apr 13, 2020

try to install the product from https://eclipse.baeyens.it/ I'm not sure how the market place handles product installs

@climategadgets
Copy link
Author

Indeed, manually downloading the file into that location when Eclipse is down and then starting it up makes the "Finishing the installation" get to the next step. Wonder why can't the installer do it on its own, doing it with wget takes a split second. Is there a log that installer keeps somewhere so it can be diagnosed what it's doing and where it's failing?

@jantje
Copy link
Member

jantje commented Apr 13, 2020

From your error log you can see the file is truncated
It could be your virus checker

@climategadgets
Copy link
Author

The file doesn't exist (not even the zero length). The platform is Linux, there are no virus checkers.

I've got the issue resolved (manual download), so I'll close it now - but if you feel like getting to the root cause and making your product better - I'm willing to help.

@jantje
Copy link
Member

jantje commented Apr 13, 2020

As I said. The file is deleted when it fails to parse. Sloeber does so to avoid the same problem to happen again. It also removes the file from the index files to .. avoid the same thing to happen again.
I do realize this does not help "problem solving"

The parsing is done by a json parser that -in your case- says there is an unexpected end of file. Given the other info: the file is not empty. So it must be a download issue, a local issue, or the file changed recently and it manifests on linux (Last tests on linux are from some days ago) and not on windows (just tested it)

If it is consistent on your system it would be great if you could debug. The easiest is to compile the SDK and start a debugging session.
https://github.com/Sloeber/arduino-eclipse-plugin#developing-improving-the-plugin
The problem is probably here https://github.com/Sloeber/arduino-eclipse-plugin/blob/master/io.sloeber.core/src/io/sloeber/core/api/LibraryManager.java#L309

jantje pushed a commit that referenced this issue Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants