# Cloud Flashing from cli works, inside VisualStudio it doesn't

**URL:** <https://community.particle.io/t/cloud-flashing-from-cli-works-inside-visualstudio-it-doesnt/54745>\
**Category:** Particle Workbench\
**Created:** [February 17, 2020, 1:49pm UTC](https://community.particle.io/t/cloud-flashing-from-cli-works-inside-visualstudio-it-doesnt/54745 "2020-02-17T13:49:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SmartWater](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SmartWater](https://community.particle.io/u/SmartWater)\
**Post date:** [February 17, 2020, 1:49pm UTC](https://community.particle.io/t/cloud-flashing-from-cli-works-inside-visualstudio-it-doesnt/54745/1 "2020-02-17T13:49:53Z")

</div>

Hey,  
So i wanted to flash my electron via cloud. If I use CLI to flash the .bin file it works. But when i call

```auto
Particle: Cloud Flash

```

inside Workbench it wont work. (Local Flash works)

The output in the Workbench is very long, here is the part with the error:

```auto
collect2: error: ld returned 1 exit status
../../../build/module.mk:232: recipe for target 'target/workspace.elf' failed
make[1]: *** [target/workspace.elf] Error 1
make[1]: Leaving directory '/firmware/modules/electron/user-part'
../build/recurse.mk:11: recipe for target 'modules/electron/user-part' failed
make: *** [modules/electron/user-part] Error 2
Flash device failed: Compiler encountered an error
Error: Command failed with exit code 1: c:\Users\PhilippOverath\.vscode\extensions\particle.particle-vscode-core-1.9.0\src\cli\bin\windows\amd64\particle.exe cloud flash Pydro_E2 --target 1.4.4 --no-update-check
Targeting version: 1.4.4

```

Any ideas?

Btw. I am using two libraries:  
Metro.h  
Ubidots.h

Could be that it is the libraries?

Thanks

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [February 17, 2020, 1:54pm UTC](https://community.particle.io/t/cloud-flashing-from-cli-works-inside-visualstudio-it-doesnt/54745/2 "2020-02-17T13:54:27Z")

</div>

> [@SmartWater](#):
>
> The output in the Workbench is very long, here is the part with the error:

The interesting bit is _not_ in there tho'

```plaintext
collect2: error: ld returned 1 exit status

```

indicates that the actual error has already occured before that during the linker run

---

<div class="post-metadata">

**Author:** ![SmartWater](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SmartWater](https://community.particle.io/u/SmartWater)\
**Post date:** [February 17, 2020, 2:02pm UTC](https://community.particle.io/t/cloud-flashing-from-cli-works-inside-visualstudio-it-doesnt/54745/4 "2020-02-17T14:02:22Z")

</div>

Alright,  
the whole output is too long to post here (\>70k).  
For what shall I look in the output. Any special keywords?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [February 17, 2020, 2:41pm UTC](https://community.particle.io/t/cloud-flashing-from-cli-works-inside-visualstudio-it-doesnt/54745/5 "2020-02-17T14:41:37Z")

</div>

Usually the linker output is usually max. a couple of dozend lines up from the line I quoted.

---

<div class="post-metadata">

**Author:** ![SmartWater](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SmartWater](https://community.particle.io/u/SmartWater)\
**Post date:** [February 17, 2020, 2:59pm UTC](https://community.particle.io/t/cloud-flashing-from-cli-works-inside-visualstudio-it-doesnt/54745/6 "2020-02-17T14:59:43Z")

</div>

I found the error.  
It was some library problem with Adafruit\_DHT.h and Adafruit\_DHT\_particle.h and double definitions. Even if I didn’t have those libraries included in my main file. I then saw that they were defined as dependencies in project.properties, i gues some leftovers from my first testing with the electron.  
After removing them from the project.properties list it worked.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/6/4/64635adccc35238caa19e9b553ec3e98b163d026.png) [@system](https://community.particle.io/u/system)\
**Post date:** [August 18, 2020, 3:03am UTC](https://community.particle.io/t/cloud-flashing-from-cli-works-inside-visualstudio-it-doesnt/54745/7 "2020-08-18T03:03:08Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
