[Solved] Created new empty sketch; tried to immediate download; it failed;

Created new empty script;
Tried to immediately download empty script.

Received message "error while downloading"

That was a very informative message!!! >:(

Tried getting out of the browser,
tried deleting new script and creating a new script
Tried logging out and back in.
Tried stopping and restarting agent.

None of those worked.

Did notice, that the browser create session seemed to jump back to the
initial screen several times on another sketch, before this happened.
I don't know why it did this. I was sitting and thinking of what to do next
when this reset to the initial Create Editor menu screen appeared. I went
back into the editor. Everything seemed to be working correctly. I don't
know if this unexpected change had anything to do with the download failure.

Just posting this for your information. I don't expect any help in this.
I realize you all have too many other more important problems to solve.

I did not say earlier, but I did try to save the empty script several times before trying to down load. That also failed.

I found out the problem. The down load function will not work unless you try to compile the script for the first time.
My empty script compiled without errors, so I don't know if an unsuccessful compile will allow the download to succeed.

Found out the real problem was that the selected board was not set. Once I selected the (any?) board that I use
there was no problem. The board did not have to be connected to my PC.

Would like to see the Create Editor remember that last board I was using. It could remember the port value
but if not that, then at least the board category.

You might consider splitting the category specification from the port(device) value. Joining them in one string
might prevent being able to save just the category. Many time I just use the editor to compile changes, without
running them against the board (i.e. the check mark option).

Back in the very old days, when memory was very expensive we tried to make as many short cuts as possible.
We found out that this really caused more problems than it saved. If you have two distinct values, then don't
waste the time by storing them in one variable. This type of coding is not good design or implementation.

Take a lesson from the past.

It already does remember the last sketch…
When you actually save the file watch the screen closely it will have a pop up that says “XXX sketch now linked to XXX board” or something very similar.

When you download a sketch to your computer it comes as a ZIP file.
Take a look in there and you will see an extra file.
Open that with notepad and you will see the board that was selected and a few other useful bits of information.

However … HOW will it know what the sketch was for and which type of MCU to compile for and which libs to include (AVR / ARM / ETC) etc if you dont tell it before you compile ?

@just_a_guy thanks for reporting this issue, we were able to replicate it and we are working on a fix.

If you have a board connected to your PC we do automatically connect it to that new sketch.

Hi @just_a_guy,
could you please try now? Client version 3.2.1 (Check help-> info)