dragondaud/myClock

build.sh scripts fails on Mac OS

Closed this issue · 2 comments

After using the install-Arduino.sh script, running the build.sh scripts gives the following error (I added set -x at the top of the script). This is with Arduino 1.8.9.

mbpro:myClock jcw$ ./build.sh 
+ APP=myClock
+ SRC=myClock.ino
+ BIN=myClock.ino.bin
++ which rm
+ RM=/bin/rm
++ which python
+ PYTHON=/usr/local/bin/python
+ board=esp8266:esp8266:d1_mini:xtal=160,vt=flash,eesz=4M1M,ip=lm2f,dbg=Disabled,lvl=NoAssert-NDEBUG,wipe=none,baud=921600
+ port=8266
+ getopts :lvf:s:hcw opt
+ [[ darwin18 == \d\a\r\w\i\n* ]]
+ arduino=/Applications/Arduino.app/Contents/MacOS/Arduino
+ buildpath=/Users/jcw/.build
++ /Applications/Arduino.app/Contents/MacOS/Arduino --get-pref runtime.platform.path
+ espota=/tools/espota.py
++ /Applications/Arduino.app/Contents/MacOS/Arduino --get-pref runtime.tools.esptool.path
+ esptool=/esptool
+ '[' -z /Applications/Arduino.app/Contents/MacOS/Arduino ']'
+ '[' '' = true ']'
+ echo 'Building myClock in /Users/jcw/.build...'
Building myClock in /Users/jcw/.build...
+ /Applications/Arduino.app/Contents/MacOS/Arduino --pref build.path=/Users/jcw/.build --board esp8266:esp8266:d1_mini:xtal=160,vt=flash,eesz=4M1M,ip=lm2f,dbg=Disabled,lvl=NoAssert-NDEBUG,wipe=none,baud=921600 --save-prefs --verify myClock.ino
Loading configuration...
Initializing packages...
Preparing boards...
java.lang.NullPointerException
        at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:679)
        at processing.app.Base.onBoardOrPortChange(Base.java:1317)
        at processing.app.Base.<init>(Base.java:284)
        at processing.app.Base.main(Base.java:151)
+ ret=255
+ '[' 255 -eq 0 ']'
+ exit 255

I think we can close this one. I went and blew away everything and started from scratch, and it subsequently built with the script. Not sure exactly what step in the process may have fixed it. Java and it's helpful error messages...

I did test it on a Mac OS VM, but I did not test all situations, obviously. Looks like install script failed to install the 2.5.0 ESP core the first time around. I'll see if I can figure out why.