Skip to content

IDE does not start when directories.data is invalid #1777

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

Open
3 tasks done
kittaakos opened this issue Dec 16, 2022 · 1 comment
Open
3 tasks done

IDE does not start when directories.data is invalid #1777

kittaakos opened this issue Dec 16, 2022 · 1 comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

Describe the problem

Start IDE 2.0.3 with an invalid CLI config.

board_manager:
  additional_urls:
  - https://arduino.esp8266.com/stable/package_esp8266com_index.json
directories:
  data: /alma #invalid
  downloads: /Users/a.kitta/Library/Arduino15/staging
  user: /Users/a.kitta/Documents/Arduino

IDE never starts, and you will have a never-ending stream of error messages:

2022-12-16T10:36:30.423Z daemon INFO Error: invalid path creating config dir: /alma error: mkdir /alma: read-only file system

2022-12-16T10:36:30.423Z daemon ERROR Error: Error: invalid path creating config dir: /alma error: mkdir /alma: read-only file system
    at Socket.<anonymous> (/Applications/Arduino IDE 2.0.3.app/Contents/Resources/app/node_modules/arduino-ide-extension/lib/node/arduino-daemon-impl.js:219:42)
    at Socket.emit (node:events:394:28)
    at addChunk (node:internal/streams/readable:312:12)
    at readableAddChunk (node:internal/streams/readable:287:9)
    at Socket.Readable.push (node:internal/streams/readable:226:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
2022-12-16T10:36:30.423Z daemon INFO Starting daemon from /Applications/Arduino IDE 2.0.3.app/Contents/Resources/app/node_modules/arduino-ide-extension/build/arduino-cli...
2022-12-16T10:36:30.424Z daemon INFO time="2022-12-16T11:36:30+01:00" level=error msg="Error: invalid path creating config dir: /alma error: mkdir /alma: read-only file system"

2022-12-16T10:36:30.425Z daemon INFO Daemon exited with exit code: 7.

To reproduce

See description.

Expected behavior

IDE2 starts, CLI is not functional, but the user sees that there was a problem with the daemon process.

Arduino IDE version

2.0.3

Operating system

macOS

Operating system version

12.5.1

Additional context

No response

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
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Dec 16, 2022
@kittaakos
Copy link
Contributor Author

The error must be handled by parsing the stderr: arduino/arduino-cli#1762 (comment)

And this is incorrect:

return retry(
() => {
this.onError(err);
return this.start();
},
1_000,
5
);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

1 participant