-
Notifications
You must be signed in to change notification settings - Fork 3
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
No board selected (Please use the nightly IDE 2.x https://www.arduino.cc/en/software#nightly-builds) #10
Comments
I too have this same issue. Version: 2.2.1 |
@dankeboy36, The unsetting the board and port option and then re-selecting it has fixed the issue for me. |
If somebody can reproduce it, please provide the logs. I will look into the defect. I will keep this issue open. |
The fault occurs when the board was selected on IDE startup: To reproduce
I am happy to provide logs, but I think you will be able to easily reproduce the fault now from the instructions I provided @dankeboy36 so they probably won't be needed. I notice the fault occurs under the same conditions as arduino/arduino-ide#2230 (comment) |
Selecting another board and then the right board gave me "Sketch path is not set". Then after opening another sketch, close it and re-open the right sketch finally the exception decoder worked. So it seems that when the IDE is started with an existing project (sketch and board) it will not communicate the board/sketch to your code. I don't know (and don't have time to dive into it) if there is a way to force the IDE API to refresh and give you the current active board/sketch but that's what you need I guess. |
This must be fixed in the IDE2 code. The problem is the same as arduino/arduino-ide#2165 (review) and arduino/arduino-ide#2165 (review). The Arduino state is set by IDE2 too early, and the board+port settings still need to be restored. Here is the overlooked diff --git a/arduino-ide-extension/src/browser/contributions/update-arduino-state.ts b/arduino-ide-extension/src/browser/contributions/update-arduino-state.ts
index 35b4c2ab..4e575430 100644
--- a/arduino-ide-extension/src/browser/contributions/update-arduino-state.ts
+++ b/arduino-ide-extension/src/browser/contributions/update-arduino-state.ts
@@ -76,7 +76,9 @@ export class UpdateArduinoState extends SketchContribution {
}
override onReady(): void {
- this.updateBoardsConfig(this.boardsServiceProvider.boardsConfig); // TODO: verify!
+ this.boardsServiceProvider.ready.then(() => {
+ this.updateBoardsConfig(this.boardsServiceProvider.boardsConfig); // TODO: verify!
+ });
this.updateSketchPath(this.sketchServiceClient.tryGetCurrentSketch());
this.updateUserDirPath(this.configService.tryGetSketchDirUri());
this.updateDataDirPath(this.configService.tryGetDataDirUri()); |
If it is set before the board+port settings are restored from the `localStorage`, extensions will see no board+port. Ref: #2165 Ref: dankeboy36/esp-exception-decoder#10 Signed-off-by: Akos Kitta <[email protected]>
If it is set before the board+port settings are restored from the `localStorage`, extensions will see no board+port. Ref: #2165 Ref: dankeboy36/esp-exception-decoder#10 Signed-off-by: Akos Kitta <[email protected]>
If it is set before the board+port settings are restored from the `localStorage`, extensions will see no board+port. Ref: #2165 Ref: dankeboy36/esp-exception-decoder#10 Signed-off-by: Akos Kitta <[email protected]>
Please use the Arduino IDE 2.x nightly build with the fix: https://www.arduino.cc/en/software#nightly-builds |
I get "No board selected" in red.
The text was updated successfully, but these errors were encountered: