[Solved] Stuck on "Uploading sketch..."

Hi, I recently purchased a laptop cart with Windows 10 (x64) machines for the specific purpose of using the Arduino Web Editor in my classroom (bye bye Codebender :confused: ).

Today, students were generally able to successfully install the custom "NewPing" library (from Arduino Playground). Although, many students were not seeing the "import" icon showing up next to the "Library Manager' button, and had to click on the giant import button visible in the Custom Libraries tab.

The main problem was that almost every student had the same problem where their sample code from the NewPingExample sketch was uploading until the end of the period. Only 1 student successfully uploaded, but his Serial Monitor would not work.

Note that 2 students who brought their personal laptops were able to follow the same instructions and uploaded code fairly easily.

Are there any known issues I should be checking for if the sketch upload starts hanging? We were using a fresh installation of Chrome and the AC agent.

Hi @MisterBianchi,
thank you so much for your report. You are all using Chrome in the classroom? Anyone using Edge? Are your kids using netbooks?

So to recap:

  • not seeing the "import" icon showing up next to the "Library Manager' button: we checked and it is due to using a screen smaller than 1024px, we are going to remove it the button just on mobile screen size
  • uploading hanging: we never had such report and we would need a bit more infos to debug it. What boards are you using? We would need your Chrome Console report. So on the Web Editor page on Chrome right click and select 'Inspect' on the contextual menu, go to the Console tab, copy paste the output in this thread.
  • please note that we discovered a bug on libraries import, we are already working on it and we will release a fix today or tomorrow latest

We are really sorry you could not successfully work with the Web Editor in your classroom, please don't give up! We will do our best to solve your issues!

Thanks you!

Libraries import is now working properly

Thanks for the replies!

We are using Uno boards (an assortment of brands, but mostly these)

Here is the Chrome console report:

https://connect.facebook.net/en_US/fbevents.js Failed to load resource: net::ERR_TUNNEL_CONNECTION_FAILED
angular.02f83dc0.js:1 Object Object
angular.02f83dc0.js:1 Object Object
angular.02f83dc0.js:1 Object Object
angular.02f83dc0.js:1 Object Object
angular.02f83dc0.js:1 [serial monitor] - try close
https://dcw9y8se13llu.cloudfront.net/avatars/michaelokrah.jpg Failed to load resource: the server responded with a status of 404 (Not Found)
2vendor.9f44a072.js:10 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
d @ vendor.9f44a072.js:10
angular.02f83dc0.js:1 [serial monitor] - try close

Only the last line showed up after I clicked on upload.

Just to note: The laptops are on the school's hidden wifi network, and operate through a NYC Dept of Ed proxy script (http://proxy.nycboe.org/proxy.pac)
I tried running it with the proxy script unchecked, but seemed like that didn't make a difference.

I tried to get it to work with Edge today on one of the classroom laptops, but when I clicked on "Board at COM6", the "Select Other Board & Port" popup box has an endless spinning circle under "Boards"...

Thanks for your report!
We will look into it on Monday first thing, tomorrow is an holiday here in Italy :slight_smile:
You are using UNO clones, and of course we cannot be sure all of them works, even though many users were able to successfully upload on them. By any chance do you have an official Arduino board to try?

Thanks again!

Also we are trying to replicate your network proxy setup here in our office. If you could use the same PC in another network and see what happens it will also help a lot!

In the meantime we fixed the Import button disappearing on small screens, were you using notebooks by any chance?

Thanks a lot for your patience, we really hope to help with this issue!

I'm going to take one of the laptops home tonight to test it on my home network.

I'll also try to look around for an official Arduino board.

Thanks!

Just to note:

I downloaded a sketch from my Arduino Create Web Editor on my personal laptop (Asus TP500, Windows 8.1x64, i7 processor) onto a SainSmart Uno successfully at school.

Immediately afterwards, I tested with the same code on the same board on the same network on a laptop cart computer and it says "BUSY" for over 10 minutes when I try to upload.

The laptops I have are HP Elitebook 2570p (running Windows10x64, i5 processor). The other desktops in my classroom also have similar issues, which are Lenovo ThinkCentre (running Windows7x32, i3 processor). Could it be a hardware issue?

So, after trying 2 different things I was able to upload:
(1) I installed the windows arduino software on one of the laptops
(2) I brought it home and tested on my 5GHz and 2.4GHz networks successfully.
Here's the following output from the Chrome console:

Refused to load the image 'https://stats.g.doubleclick.net/r/collect?v=1&aip=1&t=dc&_r=3&tid=UA-22581631-11&cid=777422848.1480971950&jid=1305754095&_v=j47&z=1726083584' because it violates the following Content Security Policy directive: "img-src 'self' data: https://www.google-analytics.com https://cdn.arduino.cc https://dcw9y8se13llu.cloudfront.net https://www.facebook.com".

angular.02f83dc0.js:1 Object Object
https://dcw9y8se13llu.cloudfront.net/avatars/Cisco628.jpg Failed to load resource: the server responded with a status of 404 (Not Found)
angular.02f83dc0.js:1 Object Object
angular.02f83dc0.js:1 Object Object
angular.02f83dc0.js:1 Object Object
angular.02f83dc0.js:1 [serial monitor] - try close
2vendor.9f44a072.js:10 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
d @ vendor.9f44a072.js:10
2https://localhost:8991/info Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR
2angular.02f83dc0.js:1 [serial monitor] - try close
2vendor.9f44a072.js:10 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
d @ vendor.9f44a072.js:10
angular.02f83dc0.js:1 [serial monitor] - try close
https://api-builder.arduino.cc/builder/v1/compile Failed to load resource: the server responded with a status of 422 (status code 422)
vendor.9f44a072.js:5 TypeError: Cannot read property 'savingPromise' of undefined
    at a.save (angular.02f83dc0.js:3)
    at a.renameFile (angular.02f83dc0.js:4)
    at a.rename (angular.02f83dc0.js:4)
    at n.b.changeName (angular.02f83dc0.js:4)
    at Object.c.onSaveAs [as callback] (angular.02f83dc0.js:5)
    at b.a.submit (angular.02f83dc0.js:6)
    at fn (eval at compile (vendor.9f44a072.js:7), <anonymous>:4:209)
    at b (vendor.9f44a072.js:5)
    at e (vendor.9f44a072.js:7)
    at b.$eval (vendor.9f44a072.js:5)
(anonymous) @ vendor.9f44a072.js:5
2angular.02f83dc0.js:1 [serial monitor] - try close
https://api-builder.arduino.cc/builder/v1/compile Failed to load resource: the server responded with a status of 422 (status code 422)
2angular.02f83dc0.js:1 [serial monitor] - try close
angular.02f83dc0.js:1 Object Object
3vendor.9f44a072.js:10 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
d @ vendor.9f44a072.js:10
angular.02f83dc0.js:1 [serial monitor] - try close
angular.02f83dc0.js:1 Object {name: "$stateChangeSuccess", targetScope: n, defaultPrevented: false, currentScope: n} Object {url: "^/editor/:uid/:id", data: Object, params: Object, resolve: Object, onEnter: Array[5]…}
angular.02f83dc0.js:1 Object {name: "$stateChangeSuccess", targetScope: n, defaultPrevented: false, currentScope: n} Object {params: Object, onEnter: Array[5], name: "editor.user.sketch.file", data: Object}
vendor.9f44a072.js:10 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
d @ vendor.9f44a072.js:10
onCursorChange @ vendor.9f44a072.js:15
d._emit.d._dispatchEvent @ vendor.9f44a072.js:10
(anonymous) @ vendor.9f44a072.js:10
d._signal @ vendor.9f44a072.js:10
setPosition @ vendor.9f44a072.js:12
onChange @ vendor.9f44a072.js:12
d._signal @ vendor.9f44a072.js:10
applyDelta @ vendor.9f44a072.js:12
remove @ vendor.9f44a072.js:12
setValue @ vendor.9f44a072.js:12
setValue @ vendor.9f44a072.js:13
angular.isDefined.e.$render @ libs.6f2bce7f.js:1
(anonymous) @ vendor.9f44a072.js:8
$digest @ vendor.9f44a072.js:5
$apply @ vendor.9f44a072.js:5
(anonymous) @ vendor.9f44a072.js:7
dispatch @ vendor.9f44a072.js:2
q.handle @ vendor.9f44a072.js:2
vendor.9f44a072.js:10 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
d @ vendor.9f44a072.js:10
onCursorChange @ vendor.9f44a072.js:15
d._emit.d._dispatchEvent @ vendor.9f44a072.js:10
(anonymous) @ vendor.9f44a072.js:10
d._signal @ vendor.9f44a072.js:10
setPosition @ vendor.9f44a072.js:12
onChange @ vendor.9f44a072.js:12
d._signal @ vendor.9f44a072.js:10
applyDelta @ vendor.9f44a072.js:12
insertMergedLines @ vendor.9f44a072.js:12
insert @ vendor.9f44a072.js:12
setValue @ vendor.9f44a072.js:12
setValue @ vendor.9f44a072.js:13
angular.isDefined.e.$render @ libs.6f2bce7f.js:1
(anonymous) @ vendor.9f44a072.js:8
$digest @ vendor.9f44a072.js:5
$apply @ vendor.9f44a072.js:5
(anonymous) @ vendor.9f44a072.js:7
dispatch @ vendor.9f44a072.js:2
q.handle @ vendor.9f44a072.js:2
vendor.9f44a072.js:10 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
d @ vendor.9f44a072.js:10
onCursorChange @ vendor.9f44a072.js:15
d._emit.d._dispatchEvent @ vendor.9f44a072.js:10
(anonymous) @ vendor.9f44a072.js:10
d._signal @ vendor.9f44a072.js:10
setPosition @ vendor.9f44a072.js:12
moveCursorTo @ vendor.9f44a072.js:11
moveTo @ vendor.9f44a072.js:10
setValue @ vendor.9f44a072.js:13
angular.isDefined.e.$render @ libs.6f2bce7f.js:1
(anonymous) @ vendor.9f44a072.js:8
$digest @ vendor.9f44a072.js:5
$apply @ vendor.9f44a072.js:5
(anonymous) @ vendor.9f44a072.js:7
dispatch @ vendor.9f44a072.js:2
q.handle @ vendor.9f44a072.js:2
angular.02f83dc0.js:1 [serial monitor] - try close

This leads me to think that the issues is either:
(1) a Combination of hardware/software configurations with a NYC DOE proxy internet service OR
(2) the software drivers from the windows install were necessary for the web editor to work properly?

Can you share the sketch you tryed to compile in the last post? I can see the compilation failed for it
Thanks

So, back at school, the computer I brought home is still able to upload sketches successfully, but other laptops are not... :frowning:

I tried with the same board/account/sketch on 2 computers and attached are the outputs to the editor console.

For this, I was using the following code:

I also noticed that the successful one only had 1 create client running, but the unsuccessful had 2. I closed 1 but it didn't seem to make a difference.

Would you want to see the Chrome consoles as well?

Successful Upload (editor console).txt (27.8 KB)

Unsuccessful Upload (editor console).txt (25.1 KB)

You can also click on the plugin icon, click 'open debug console', then type 'log on' in the input box and click send, and you'll get more logs from there. Can you share them also?
Thanks

Thank you so much for all your debugging help @MisterBianchi we also alerted Martino that developed the plugin, as soon as we have plugin debug output we will be able to understand what is going on better.

Screenshot 2016-12-14 10.10.45.png

When you say

(1) I installed the windows arduino software on one of the laptops

You mean you installed the Desktop IDE from https://www.arduino.cc/en/Main/Software?

Just to make sure we understand the full picture :slight_smile:

00allis, Yes, I installed the desktop IDE from that link.

On Friday at the school, I tried to duplicate what I did earlier, except the "good" laptop wasn't able to upload this time :o .

Here is the output from the debug console for 2 different laptops (one "good" one that previously successfully uploaded, and one "bad" that has never successfully uploaded).

161216 Bad Console Output.txt|attachment (25.1 KB)

161216 Good Console Output.txt|attachment (27.8 KB)

Hi @MisterBianchi,
thanks again for the feedback. To debug this issue we really need the plugin output, not the sketch output.
I did a quick video to show what we need :slight_smile:

Basically we will need to see what the plugin output is printing out during compilation.
For simplicity I copied the log on GitHub Gist.

Also as you can see in my Boards Dropdown I see Arduino/Genuino UNO cause I am using an official board. Could you please send a screenshot of what you see on that dropdown and tell us how you select your board?

Thanks again!

We pushed a fix that could fix your issues! Let us know if now you can upload sketches on your boards
Thanks

Hi @MisterBianchi,
we hope you didn't give up on the Web Editor! Right before Xmas we pushed a fix that may solve your issue, please let us know if this is the case :slight_smile:
Thanks a lot!

00allis,
Sorry for not replying earlier. I've been away on break. I recorded the logs, but fortunately I can't really show you the problem because the problem disappeared!

I tested a few boards out, and one kept giving me the same problem of getting stuck on "uploading". But that board wouldn't upload code even from the desktop software as well, which I then wrote off as just a bad board. So far this week, I haven't seen any problems that I couldn't trace to hardware issues.

Thanks so much for the work you guys have put in to helping with this situation, and for making a great tool for educators! :slight_smile:

Here are the logs I recorded comparing a good board with a bad one. The symptoms on the web editor were very similar to the problem that good boards were having for me last month.

Bad agent log.txt (48.6 KB)

Bad editor log.txt (26.7 KB)

Good agent log.txt (8.04 KB)

Good editor log.txt (27.8 KB)

Hi @MisterBianchi, we are glad to hear you can upload correctly now! There was an issue on unofficial boards
Thanks again for your feedback