Closed
Description
Describe the problem
This issue is not #443.
When the secrets are declared in a cloud sketch, IDE2 generates the #include "arduino_secrets.h"
into the top of the main sketch file. This feature behaves unreliably. Occasionally, after pulling the cloud sketch, the #include "arduino_secrets.h"
is missing from the main sketch file.
To reproduce
- Go to https://create.arduino.cc/editor,
- Log in and click on NEW SKETCH,
- Copy-paste this sketch content:
char myPassword[] = SECRET_PASSWORD; void setup() {} void loop() {}
- When the Secret tab appears, type something to the
<input>
. It does not matter what, but you must type something to avoid hitting the bug described in arduino/arduino-ide#443. - Open IDE2,
- Pull the cloud sketch you have created, and
- Open the sketch in a new window.
- The
#include "arduino_secrets.h"
is missing. Reproducibility: not always.
`#include "arduino_secrets.h" is missing from the main sketch file:
2.0.4
:
arduino_secret.mp4
2.0.5-nightly-20230403
:
1999_nightly.mp4
Expected behavior
When the Secret tab is available (and all secret keys have an associated value #443) in the cloud editor, then the main sketch file contains the #include "arduino_secrets.h"
after pulling the cloud sketch into IDE2.
Arduino IDE version
2.0.4 and 2.0.5-nightly-20230403
Operating system
macOS
Operating system version
12.6.3
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