Skip to content

IDE hangs on startup due to missing library_index.json #2606

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
3 tasks done
axoking opened this issue Jan 3, 2025 · 1 comment
Closed
3 tasks done

IDE hangs on startup due to missing library_index.json #2606

axoking opened this issue Jan 3, 2025 · 1 comment
Assignees
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@axoking
Copy link

axoking commented Jan 3, 2025

Describe the problem

I installed Arduino IDE 2.3.4 on Windows 11 and it hangs on startup because the library_index.json file is missing. The IDE seems to not be prepareed for the case that this file is missing, so it just throws an error to stdout and hangs in startup forever.

To reproduce

I have no idea, I just installed Arduino normally using the installer (not the MSI one).

Expected behavior

expected behavior: There should be a library_index.json file, or if there's not, Arduino should create a new one instead of just hanging.

Arduino IDE version

2.3.4

Operating system

Windows

Operating system version

Win 11 Pro 24H2

Additional context

Here the logs:

Arduino IDE 2.3.4
Checking for frontend application configuration customizations. Module path: C:\Program Files\Arduino IDE\resources\app\lib\backend\electron-main.js, destination 'package.json': C:\Program Files\Arduino IDE\resources\app\package.json
Setting 'theia.frontend.config.appVersion' application configuration value to: "2.3.4" (type of string)
Setting 'theia.frontend.config.cliVersion' application configuration value to: "1.1.1" (type of string)
Setting 'theia.frontend.config.buildDate' application configuration value to: "2024-12-03T10:03:03.490Z" (type of string)
Frontend application configuration after modifications: {"applicationName":"Arduino IDE","defaultTheme":{"light":"arduino-theme","dark":"arduino-theme-dark"},"defaultIconTheme":"none","electron":{"windowOptions":{}},"defaultLocale":"","validatePreferencesSchema":false,"preferences":{"window.title":"${rootName}${activeEditorShort}${appName}","files.autoSave":"afterDelay","editor.minimap.enabled":false,"editor.tabSize":2,"editor.scrollBeyondLastLine":false,"editor.quickSuggestions":{"other":false,"comments":false,"strings":false},"editor.maxTokenizationLineLength":500,"editor.bracketPairColorization.enabled":false,"breadcrumbs.enabled":false,"workbench.tree.renderIndentGuides":"none","explorer.compactFolders":false},"appVersion":"2.3.4","cliVersion":"1.1.1","buildDate":"2024-12-03T10:03:03.490Z"}
Starting backend process. PID: 1988
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///c%3A/Users/Tom/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2025-01-03T16:04:58.566Z root INFO Backend Object.initialize: 2.6 ms [Finished 0.349 s after backend start]
2025-01-03T16:04:58.566Z root INFO Backend Object.configure: 2.0 ms [Finished 0.349 s after backend start]
2025-01-03T16:04:58.566Z root INFO Backend s.onStart: 1.0 ms [Finished 0.349 s after backend start]
2025-01-03T16:04:58.567Z root INFO Backend s.configure: 0.2 ms [Finished 0.363 s after backend start]
2025-01-03T16:04:58.567Z root INFO Backend d.onStart: 0.1 ms [Finished 0.363 s after backend start]
2025-01-03T16:04:58.567Z root INFO Backend d.configure: 0.1 ms [Finished 0.363 s after backend start]
2025-01-03T16:04:58.568Z root INFO Backend d.initialize: 14.0 ms [Finished 0.363 s after backend start]
2025-01-03T16:04:58.568Z root INFO Backend c.onStart: 0.2 ms [Finished 0.363 s after backend start]
2025-01-03T16:04:58.568Z root INFO Backend a.configure: 0.7 ms [Finished 0.364 s after backend start]
2025-01-03T16:04:58.569Z config INFO >>> Initializing CLI configuration...
2025-01-03T16:04:58.569Z root INFO Backend c.initialize: 0.2 ms [Finished 0.364 s after backend start]
2025-01-03T16:04:58.569Z root INFO Backend x.onStart: 0.4 ms [Finished 0.364 s after backend start]
2025-01-03T16:04:58.569Z config INFO Loading CLI configuration from c:\Users\Tom\.arduinoIDE\arduino-cli.yaml...
2025-01-03T16:04:58.570Z daemon INFO Starting daemon from C:\Program Files\Arduino IDE\resources\app\lib\backend\resources\arduino-cli.exe...
2025-01-03T16:04:58.570Z root INFO Backend a.initialize: 0.2 ms [Finished 0.365 s after backend start]
2025-01-03T16:04:58.570Z root INFO Backend w.onStart: 0.6 ms [Finished 0.365 s after backend start]
2025-01-03T16:04:58.570Z root INFO Backend r.configure: 1.0 ms [Finished 0.365 s after backend start]
2025-01-03T16:04:58.570Z discovery-log INFO start
2025-01-03T16:04:58.570Z discovery-log INFO start new deferred
2025-01-03T16:04:58.570Z root INFO Backend d.initialize: 0.2 ms [Finished 0.366 s after backend start]
2025-01-03T16:04:58.570Z root INFO Backend y.onStart: 1.0 ms [Finished 0.366 s after backend start]
2025-01-03T16:04:58.570Z root INFO Backend r.configure: 0.8 ms [Finished 0.366 s after backend start]
2025-01-03T16:04:58.570Z root INFO Backend a.onStart: 0.3 ms [Finished 0.367 s after backend start]
2025-01-03T16:04:58.570Z root INFO Backend h.configure: 0.2 ms [Finished 0.367 s after backend start]
2025-01-03T16:04:58.570Z root INFO Backend s.configure: 0.1 ms [Finished 0.367 s after backend start]
2025-01-03T16:04:58.570Z root INFO Backend l.configure: 0.0 ms [Finished 0.367 s after backend start]
2025-01-03T16:04:58.572Z root INFO Theia app listening on http://127.0.0.1:50626.
2025-01-03T16:04:58.572Z root INFO Finished starting backend application: 2.0 ms [Finished 0.369 s after backend start]
2025-01-03T16:04:58.572Z root WARN The local plugin referenced by local-dir:/c%3A/Users/Tom/.arduinoIDE/plugins does not exist.
2025-01-03T16:04:58.572Z root WARN The local plugin referenced by local-dir:/c%3A/Users/Tom/.arduinoIDE/extensions does not exist.
2025-01-03T16:04:58.572Z root WARN The local plugin referenced by local-dir:C:\Users\Tom\.arduinoIDE\plugins does not exist.
2025-01-03T16:04:58.582Z config INFO Loaded CLI configuration: {"board_manager":{"additional_urls":[]}}
2025-01-03T16:04:58.582Z config INFO Loading fallback CLI configuration to get 'directories.data' and 'directories.user'
2025-01-03T16:04:58.600Z root INFO Resolve plugins list: 30.3 ms [Finished 0.397 s after backend start]
2025-01-03T16:04:58.688Z config INFO Loaded fallback CLI configuration: {"directories":{"user":"C:\\Users\\Tom\\Documents\\Arduino","data":"C:\\Users\\Tom\\AppData\\Local\\Arduino15"}}
2025-01-03T16:04:58.688Z config INFO Merged CLI configuration with the fallback: {"directories":{"user":"C:\\Users\\Tom\\Documents\\Arduino","data":"C:\\Users\\Tom\\AppData\\Local\\Arduino15"},"board_manager":{"additional_urls":[]}}
2025-01-03T16:04:58.688Z config INFO Loaded the CLI configuration.
2025-01-03T16:04:58.692Z daemon INFO time="2025-01-03T17:04:58+01:00" level=info msg="arduino-cli version 1.1.1"
time="2025-01-03T17:04:58+01:00" level=info msg="Using config file: c:\\Users\\Tom\\.arduinoIDE\\arduino-cli.yaml"
time="2025-01-03T17:04:58+01:00" level=info msg="Executing `arduino-cli daemon`"
Daemon überwacht jetzt 127.0.0.1: 50628
{"IP":"127.0.0.1","Port":"50628"}
2025-01-03T16:04:58.692Z daemon INFO Daemon is running.
2025-01-03T16:04:58.695Z config INFO Mapped the CLI configuration: {"dataDirUri":"file:///c%3A/Users/Tom/AppData/Local/Arduino15","sketchDirUri":"file:///c%3A/Users/Tom/Documents/Arduino","additionalUrls":[],"network":"none","locale":"en"}
2025-01-03T16:04:58.695Z config INFO Validating the CLI configuration...
2025-01-03T16:04:58.696Z config INFO The CLI config is valid.
2025-01-03T16:04:58.696Z config INFO <<< Initialized the CLI configuration.
2025-01-03T16:04:58.710Z daemon INFO time="2025-01-03T17:04:58+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2025-01-03T16:04:59.063Z root INFO Deploy plugins list: 30.3 ms [Finished 0.860 s after backend start]
Opening channel for service path '/services/electron-window'.
Opening channel for service path '/services/ide-updater'.
2025-01-03T16:04:59.704Z root WARN A command editor.action.toggleStickyScroll is already registered.
2025-01-03T16:05:02.192Z root ERROR Detected an error response during the gRPC core client initialization: code: 3, message: Fehler beim Verifizieren der Signatur: signature expired: is your system clock set correctly?
2025-01-03T16:05:02.196Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Checking signature" index="C:\\Users\\Tom\\AppData\\Local\\Arduino15\\package_index.json" signatureFile="C:\\Users\\Tom\\AppData\\Local\\Arduino15\\package_index.json.sig" trusted=true
2025-01-03T16:05:02.197Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Loading hardware from: C:\\Users\\Tom\\AppData\\Local\\Arduino15\\packages"
2025-01-03T16:05:02.197Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Loading package builtin from: C:\\Users\\Tom\\AppData\\Local\\Arduino15\\packages\\builtin"
2025-01-03T16:05:02.197Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Checking existence of 'tools' path: C:\\Users\\Tom\\AppData\\Local\\Arduino15\\packages\\builtin\\tools"
time="2025-01-03T17:05:02+01:00" level=info msg="Loading tools from dir: C:\\Users\\Tom\\AppData\\Local\\Arduino15\\packages\\builtin\\tools"
2025-01-03T16:05:02.197Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:02.197Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:02.197Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:02.198Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:02.198Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:02.204Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Loading libraries index file" index="C:\\Users\\Tom\\AppData\\Local\\Arduino15\\library_index.json"
2025-01-03T16:05:02.204Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\Tom\\AppData\\Local\\Arduino15\\libraries" isSingleLibrary=false location=ide
2025-01-03T16:05:02.204Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Indexdatei wird geladen: lese library_index.json: open C:\Users\Tom\AppData\Local\Arduino15\library_index.json: Das System kann die angegebene Datei nicht finden.
2025-01-03T16:05:02.204Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\Tom\\Documents\\Arduino\\libraries" isSingleLibrary=false location=user
2025-01-03T16:05:02.206Z root ERROR The primary packages indexes are missing. Running indexes update before initializing the core gRPC client 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:
[library-index] - code: 9, message: Indexdatei wird geladen: lese library_index.json: open C:\Users\Tom\AppData\Local\Arduino15\library_index.json: Das System kann die angegebene Datei nicht finden.

2025-01-03T16:05:02.208Z daemon INFO time="2025-01-03T17:05:02+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2025-01-03T16:05:02.209Z root INFO core-client-provider [library-index] Index wird heruntergeladen: library_index.tar.bz2

2025-01-03T16:05:05.638Z daemon INFO time="2025-01-03T17:05:05+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2025-01-03T16:05:08.998Z root ERROR Detected an error response during the gRPC core client initialization: code: 3, message: Fehler beim Verifizieren der Signatur: signature expired: is your system clock set correctly?
2025-01-03T16:05:09.002Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Checking signature" index="C:\\Users\\Tom\\AppData\\Local\\Arduino15\\package_index.json" signatureFile="C:\\Users\\Tom\\AppData\\Local\\Arduino15\\package_index.json.sig" trusted=true
2025-01-03T16:05:09.002Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Loading hardware from: C:\\Users\\Tom\\AppData\\Local\\Arduino15\\packages"
2025-01-03T16:05:09.003Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Loading package builtin from: C:\\Users\\Tom\\AppData\\Local\\Arduino15\\packages\\builtin"
2025-01-03T16:05:09.003Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Checking existence of 'tools' path: C:\\Users\\Tom\\AppData\\Local\\Arduino15\\packages\\builtin\\tools"
time="2025-01-03T17:05:09+01:00" level=info msg="Loading tools from dir: C:\\Users\\Tom\\AppData\\Local\\Arduino15\\packages\\builtin\\tools"
2025-01-03T16:05:09.003Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:09.003Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:09.003Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:09.003Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:09.003Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Loaded tool" tool="builtin:[email protected]"
2025-01-03T16:05:09.009Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Loading libraries index file" index="C:\\Users\\Tom\\AppData\\Local\\Arduino15\\library_index.json"
2025-01-03T16:05:09.009Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\Tom\\AppData\\Local\\Arduino15\\libraries" isSingleLibrary=false location=ide
2025-01-03T16:05:09.009Z root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Indexdatei wird geladen: lese library_index.json: open C:\Users\Tom\AppData\Local\Arduino15\library_index.json: Das System kann die angegebene Datei nicht finden.
2025-01-03T16:05:09.010Z daemon INFO time="2025-01-03T17:05:09+01:00" level=info msg="Adding libraries dir" dir="C:\\Users\\Tom\\Documents\\Arduino\\libraries" isSingleLibrary=false location=user
2025-01-03T16:05:09.010Z root ERROR Uncaught Exception:  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:
[library-index] - code: 9, message: Indexdatei wird geladen: lese library_index.json: open C:\Users\Tom\AppData\Local\Arduino15\library_index.json: Das System kann die angegebene Datei nicht finden.

2025-01-03T16:05:09.010Z 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:
[library-index] - code: 9, message: Indexdatei wird geladen: lese library_index.json: open C:\Users\Tom\AppData\Local\Arduino15\library_index.json: Das System kann die angegebene Datei nicht finden.

    at C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:777546
    at v.evaluateErrorStatus (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:777562)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async a.<anonymous> (C:\Program Files\Arduino IDE\resources\app\lib\backend\main.js:2:777232)

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@axoking axoking added the type: imperfection Perceived defect in any part of project label Jan 3, 2025
@per1234 per1234 self-assigned this Jan 3, 2025
@per1234
Copy link
Contributor

per1234 commented Jan 3, 2025

Arduino should create a new one

It can't just create the file out of thin air. The file is downloaded over the Internet from Arduino's servers. After downloading, the cryptographic signature of the downloaded file is verified for security purposes. That verification failed on your computer:

2025-01-03T16:05:05.638Z daemon INFO time="2025-01-03T17:05:05+01:00" level=info msg="Starting download" url="https://downloads.arduino.cc/libraries/library_index.tar.bz2"
2025-01-03T16:05:08.998Z root ERROR Detected an error response during the gRPC core client initialization: code: 3, message: Fehler beim Verifizieren der Signatur: signature expired: is your system clock set correctly?

As the error indicates, this is caused by your system clock being set incorrectly. You can fix it by syncing the system time. I'll provide instructions you can follow to do that:

  1. Right click the Windows Start icon () on the taskbar.
    A context menu will open.
  2. Select "Settings" from the context menu.
    Windows "Settings" will open.
  3. Select "Time & language" from the navigation panel on the left side of the window.
  4. Select "Date & time" from the list at the right side of the Settings window.
    The "Date & time" settings section will expand.
  5. Click the "Sync now" button that is located under the "Additional settings" section of the window.
  6. Wait for the syncing process to finish.
  7. Close any Arduino IDE windows that are open.
  8. Start Arduino IDE again, as usual.

This time Arduino IDE should start up fully and work as expected.

The IDE seems to not be prepareed for the case that this file is missing, so it just throws an error to stdout and hangs in startup forever.

Although the signature verification was caused by a misconfiguration of your system, which can not be overcome by Arduino IDE, you are absolutely right to consider the fact that Arduino IDE can't gracefully handle such a problem to be a bug. We are already tracking that bug at #2042, so I will close this issue as redundant.

@per1234 per1234 closed this as completed Jan 3, 2025
@per1234 per1234 changed the title library_index.json missing on Windows 11 IDE hangs on startup due to missing library_index.json Jan 3, 2025
@per1234 per1234 added conclusion: duplicate Has already been submitted topic: code Related to content of the project itself labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants