Closed
Description
Describe the problem
If I have such a gRPC LoadSketchRequest
:
{
"instance": {
"id": 1
},
"sketchPath": "/Users/a.kitta/Documents/Arduino/alma"
}
And the folder is missing from the file system:
% cd ~/Documents/Arduino/alma
cd: no such file or directory: /Users/a.kitta/Documents/Arduino/alma
Then the request correctly fails with a NOT_FOUND
status code but the error details
is incorrect:
{
"code": 5,
"details": "Can't open sketch: no valid sketch found in /Users/a.kitta/Documents/Arduino: missing /Users/a.kitta/Documents/Arduino/Arduino.ino",
"metadata": {
"content-type": [
"application/grpc"
]
}
}
The error message should be about Arduino/alma/alma.ino
and not Arduino/Arduino.ino
. The directories.user
location exists on my disk:
% ls -al ~/Documents/Arduino
total 0
drwxr-xr-x 2 a.kitta staff 64 Jul 8 16:50 .
drwx------+ 5 a.kitta staff 160 Jul 6 15:46 ..
To reproduce
- Get the IDE2 build from here: #1089: IDE falls back to new sketch if opening failed arduino-ide#1152
- Create a new sketch and save it,
- Quit IDE2,
- Delete the previously deleted sketch and start IDE2,
- You will see the incorrect error message
Expected behavior
It should complain about ~/Documents/Arduino/alma
and not ~/Documents/Arduino/
Arduino CLI version
0.24.0
Operating system
macOS
Operating system version
12.3.1
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the nightly build
- My report contains all necessary details