gopherjs / gopherjs.github.io

GopherJS Playground
https://gopherjs.github.io/playground/
23 stars 12 forks source link

Playground has sporadic "already declared" issues. #34

Open dmitshur opened 8 years ago

dmitshur commented 8 years ago

This may or may not be related to the errors that sometimes happen if you press "Run" too fast while the playground is still loading.

Under some conditions, when refreshing and/or navigating between snippets, I can see these errors pop up in the console:

image

image

The playground still works and executes the entered code, despite those errors. But we should fix them.

I've been able to reproduce this both in latest stable channel of Chrome (45.0.2454.101), and canary version of Chrome (47.0.2526.0).

dmitshur commented 8 years ago

This appears to be related to #27. It's not as bad as it was before, but it's the same type of error happening.

dmitshur commented 8 years ago

I am still seeing this occur occasionally.

It seems to happen most often if you do a hard refresh (clearing all cache) and press Run very quickly after the page is still loading.

image

I don't think it happens if you wait at least 3-4 seconds after refreshing and pressing the Run button.