Skip to content

DATADIR (~/.arduino15 or equivalent) is not created automatically #6

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
shaunoneil opened this issue Aug 25, 2018 · 5 comments
Closed

Comments

@shaunoneil
Copy link

Arduino-cli appears to assume the IDE exists, and doesn't always handle the lack cleanly.

Example (release binary arduino-cli-0.2.0-alpha.preview-osx):

$ arduino-cli board listall
Error: loading json index file /Users/soneil/Library/arduino15/package_index.json: open /Users/soneil/Library/arduino15/package_index.json: no such file or directory
Failed to load https://downloads.arduino.cc/packages/package_index.json package index.
Try updating all indexes with `arduino-cli core update-index`.

$ arduino-cli core update-index
Updating index: package_index.json downloaded
Error: open /Users/soneil/Library/arduino15/package_index.json: no such file or directory
Error saving downloaded index https://downloads.arduino.cc/packages/package_index.json

In this case, ~/Library/arduino15 is assumed to exist, and is not created if it doesn't. Manually creating ~/Library/arduino15 allows update-index to complete cleanly.

@sandeepmistry
Copy link

I'm seeing this when trying it out on a Linux Travis CI too:

$ arduino-cli core update-index
Updating index: package_index.json downloaded
Error: open /home/travis/.arduino15/package_index.json: no such file or directory
Error saving downloaded index https://downloads.arduino.cc/packages/package_index.json

@FernandoGarcia
Copy link

I had to make:

sudo mkdir -p /home/pi/.arduino15/

cd /home/pi/.arduino15/

wget https://downloads.arduino.cc/packages/package_index.json

@cmaglie cmaglie changed the title Poorly behaved on environments which don't already have arduino-ide DATADIR (~/.arduino15 or equivalent) is not created automatically Aug 30, 2018
@cmaglie cmaglie added this to the Next alpha.preview milestone Aug 30, 2018
@cmaglie cmaglie added the bug label Aug 30, 2018
cmaglie added a commit that referenced this issue Sep 14, 2018
@flatsiedatsie
Copy link

I also just ran into this.

I followed the instructions here (version 0.2.2)

https://forum.mysensors.org/topic/9845/arduino-has-an-official-cli-app-now/2

But something went wrong on the update command.

pi@gateway:~/uploader $ ./arduino-cli-0.3.2-alpha.preview-linuxarm sketch new MyFirstSketch
Sketch created in: /home/pi/Arduino/MyFirstSketch
pi@gateway:~/uploader $ ./arduino-cli-0.3.2-alpha.preview-linuxarm core update-index       
 0 / ? [------------------------------------------------------------------------------------------=]   0.00%panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4 pc=0x123d4]

goroutine 14 [running]:
sync/atomic.addUint64(0x113c4194, 0x1000, 0x0, 0x1000, 0x1000)
	/home/jenkins/go1.10.2-patched/src/sync/atomic/64bit_arm.go:31 +0x4c
github.com/arduino/arduino-cli/vendor/go.bug.st/downloader.(*Downloader).AsyncRun(0x113c4180)
	/home/jenkins/workspace/arduino-cli/src/github.com/arduino/arduino-cli/vendor/go.bug.st/downloader/downloader.go:82 +0x17c
created by github.com/arduino/arduino-cli/vendor/go.bug.st/downloader.(*Downloader).RunAndPoll
	/home/jenkins/workspace/arduino-cli/src/github.com/arduino/arduino-cli/vendor/go.bug.st/downloader/downloader.go:61 +0x70
pi@gateway:~/uploader $ ./arduino-cli-0.3.2-alpha.preview-linuxarm board list       
Error: loading json index file /home/pi/.arduino15/package_index.json: open /home/pi/.arduino15/package_index.json: no such file or directory
Failed to load https://downloads.arduino.cc/packages/package_index.json package index.
Try updating all indexes with `arduino-cli-0.3.2-alpha.preview-linuxarm core update-index`.

@per1234
Copy link
Contributor

per1234 commented Dec 15, 2018

@flatsiedatsie you're using an outdated version of arduino-cli. That bug was already fixed after the 0.3.2-alpha.preview release. You need to install the latest version (0.3.3-alpha.preview).

@flatsiedatsie
Copy link

Thanks. I updated the instructions on the MySensors forum to use the 0.3.3 version.

mastrolinux pushed a commit that referenced this issue Jul 16, 2019
per1234 added a commit that referenced this issue Aug 9, 2021
Add CI workflow to lint configuration files
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

6 participants