Skip to content
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

tour: local tour scripts fail to connect to the local server #17313

Open
KarlisVe opened this issue Oct 1, 2016 · 12 comments
Open

tour: local tour scripts fail to connect to the local server #17313

KarlisVe opened this issue Oct 1, 2016 · 12 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@KarlisVe
Copy link

KarlisVe commented Oct 1, 2016

When running golang tour on local machine (go tool tour) scripts are not executing: after pressing Run
appears "Waiting for remote server..." (see. picture attached) and nothing happens.
I am running Windows 10.

golang

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go1.7.1 windows/amd64

What operating system and processor architecture are you using (go env)?

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

Result of script execution

What did you see instead?

Waiting for remote server...

@odeke-em odeke-em changed the title Local tour returns Waiting for remote server... tour: local tour scripts fail to connect to the local server Oct 1, 2016
@odeke-em
Copy link
Member

odeke-em commented Oct 1, 2016

/cc @adg

@adg
Copy link
Contributor

adg commented Oct 2, 2016

How are you installing/running the tour?

@KarlisVe
Copy link
Author

KarlisVe commented Oct 2, 2016

Installed using msi from https://golang.org/dl/ using default configuration

@adg adg added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 2, 2016
@quentinmit quentinmit added this to the Unreleased milestone Oct 4, 2016
@alexbrainman
Copy link
Member

@KarlisVe it works for me. Please show us the output of your "go tool tour" command - you should see something similar to my output

a

It might have some error message that will help us. Thank you.

Alex

@KarlisVe
Copy link
Author

KarlisVe commented Oct 8, 2016

cmd

@KarlisVe
Copy link
Author

KarlisVe commented Oct 8, 2016

Also it is interesting that http://127.0.0.1:3999/welcome/1 is accessible only from the browser (FireFox) which started - other browsers does not open the page

@alexbrainman
Copy link
Member

@KarlisVe I have no good suggestions on how to debug this. Perhaps others have. Sorry.

Alex

@adg
Copy link
Contributor

adg commented Oct 10, 2016 via email

@adg
Copy link
Contributor

adg commented Oct 10, 2016 via email

@KarlisVe
Copy link
Author

KarlisVe commented Oct 16, 2016

@adg Avast Free Antivirus + Standard MS Windows package, no proxy.

@aeamaea
Copy link

aeamaea commented Dec 10, 2020

TL;DR: It works, but you need to use Safari on macOS or reload the page.

Same thing happens on my macbook, if I'm on a a step and the machine goes to sleep, when I wake it back up, the RUN button gives this error "Waiting for local server..." If I cut the URL and paste it in another tab, it works just fine. It seems the client side isn't re-establishing connection (when the machine wakes up) with the local server even though the local server is still running. Reloading the original page affected also "fixes" this issue because the Run button now runs the snippet.

There may be an issue with the client side code, the server seems to be unaffected by the sleep/wakeup.

This problem is reproducible on my MBA macOS 10.12.6 with Chrome (87.0.4280.88 (Official Build) (x86_64)). It doesn't happen when I use Safari to connect to the local gotour server

EDIT: Further to this, inspecting the "KILL" button (run button turns into KILL when it's displaying "Waiting for local..." , it appears the Websocket may be hanging.

script.js:238 WebSocket is already in CLOSING or CLOSED state.
send @ script.js:238

The function is:

function send(m) {
websocket.send(JSON.stringify(m));
}

WORKAROUND (for me): Reload the page in Chrome on macOS, or use Safari.

#golangtour #golang #hangs #gotour

@adg
Copy link
Contributor

adg commented Dec 10, 2020

Sounds like a Chrome issue. The websocket connection shouldn't go away just because your computer went to sleep.

It could probably be fixed in the gotour code by reconnecting the websocket when it closes. But it's a shame we need to worry about that at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants