ArduinoJson.h: No such file or directory

I’ve read through most of the many posts on this topic and have been unable to resolve the issue.

  • I’m using the Web IDE.
  • I’m targeting v0.8.0-rc.8
  • I’ve also tried targeting 0.6.4 and 0.7.0 with the same results.
  • I’ve tried both <> and “” for the include statement.
  • Commenting //#include ArduinoJson.h causes a successful compile.
  • The ArduinoJson library has been correctly added to the project (I’ve had no problem with the LiquidCrystal_I2C_Spark library.)

Raw error:

Processing  redacted.ino
Checking library LiquidCrystal_I2C_Spark...
Installing library LiquidCrystal_I2C_Spark 1.1.0 to lib/LiquidCrystal_I2C_Spark ...
Library LiquidCrystal_I2C_Spark 1.1.0 installed.
make -C ../modules/electron/user-part all
make[1]: Entering directory '/firmware/modules/electron/user-part'
make -C ../../../user 
make[2]: Entering directory '/firmware/user'
Building cpp file: src/redacted.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-10-msrc/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F2XX -DPLATFORM_THREADING=1 -DPLATFORM_ID=10 -DPLATFORM_NAME=electron -DUSBD_VID_SPARK=0x2B04 -DUSBD_PID_DFU=0xD00A -DUSBD_PID_CDC=0xC00A -DSPARK_PLATFORM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=10 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.8.0-rc.8 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../services/nanopb -I../communication/src -I../hal/inc -I../hal/shared -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/include -I/rtos/FreeRTOSv8.2.2/FreeRTOS/Source/portable/GCC/ARM_CM3 -I../hal/src/electron -I../hal/src/stm32f2xx -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F2xx/STM32_USB_Host_Driver/inc -I../platform/MCU/STM32F2xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_OTG_Driver/inc -I../platform/MCU/STM32F2xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F2xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F2xx/CMSIS/Include -I../platform/MCU/STM32F2xx/CMSIS/Device/ST/Include -I../dynalib/inc -Isrc -I./libraries -Ilib/LiquidCrystal_I2C_Spark/src -I. -MD -MP -MF ../build/target/user/platform-10-msrc/redacted.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=UBLOXSARA -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSER_FIRMWARE_IMAGE_SIZE=0x20000 -DUSER_FIRMWARE_IMAGE_LOCATION=0x8080000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=5 -DMODULE_FUNCTION=5 -DMODULE_INDEX=1 -DMODULE_DEPENDENCY=4,2,307 -DMODULE_DEPENDENCY2=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-10-msrc/redacted.o src/redacted.cpp
redacted.ino:15:25: fatal error: ArduinoJson.h: No such file or directory
compilation terminated.
../build/ recipe for target '../build/target/user/platform-10-msrc/redacted.o' failed
make[2]: Leaving directory '/firmware/user'
../../../build/ recipe for target 'user' failed
make[1]: Leaving directory '/firmware/modules/electron/user-part'
make[2]: *** [../build/target/user/platform-10-msrc/redacted.o] Error 1
make[1]: *** [user] Error 2
../build/ recipe for target 'modules/electron/user-part' failed
make: *** [modules/electron/user-part] Error 2

The only interesting bit of information I’ve found is that when I use the “Download App Sources” feature and check the “” file I see ONLY the following:

It strikes me that I should probably see dependencies.ArduinoJson.h=5.11.2 in this file as well. I’ve been unable to find any way to manually update the “” file via the Web IDE.

I intended to add this line manually and compile via the Desktop IDE, but my local install is broken and likely needs a reinstall. I greatly prefer the Web IDE since I move between computers regularly.

Any help is appreciated.

Have you tried removing the ArduinoJson library from the project and then adding it back? Evidently it may not have been added correctly.

1 Like

I tried removing it and adding it back. I tried removing both libraries and adding both back. I tried removing ArduinoJson, save/compiling, then adding it back in. Leaves me with exactly the same results.

Have you tried copying your .ino into a new project and then adding the libraries to that?

1 Like

Can you post a SHARE THIS REVISION link

Unfortunately I cannot make the full code public as it is written for a private company which disallows that. I’ve deleted all the code except the #includes and redacted the names. Compile issue remains.

As otherwise suggested I copied all code to a fresh application, added both libraries and it compiled fine against 0.8.0-rc.8. I don’t necessarily see this as a solution, but I can move forward.

Reading this, you did create that project before setting the target version?
If the target was 0.5.3 or before when you did, then that would explain things.

1 Like

Yes, this app was originally created… I believe in February of this year. So any app created before 0.5.3 would need to be scrapped and built fresh?