goconvey
goconvey copied to clipboard
404 Page Not Found
I have Convey running and can see in netcat that it is listening on port 8080. When I navigate to http://localhost:8080 however I see a blank page with only the words "404 page not found". If I stop Convey this page is no longer accessible.
I am running on Ubuntu 14.04 with Go 1.3 and the web UI was working great until one time when I restarted it.
Strange. Cache issue? (Try a hard refresh or with cache disabled?)
What is the output of telnet localhost 8080 then:
GET / HTTP/1.1
telnet successfully connects and a hard refresh has the same results as stated above.
So the telnet output is a 200 (the HTML of the GoConvey UI)? Then it sounds like a browser issue. Which browser are you using? What happens if you try a different one? Also try killing the goconvey process and re-starting it (with the UI closed, just to be sure).
If it's still 404ing, what does the browser's inspector tools say about the raw HTTP request? i.e. what is its request URL, and the raw response from the server?
It actually was only able to make a connection, not receive any actual content. I did find an issue though which was preventing tests from compiling.
It seems that it will not fully start when the tests do not compile. It looks like it starts, but the web UI will not be accessible. My problem is now solved, but I am not closing the issue so you are aware of this and can further diagnose it.
Thanks for your help!
@tgrosinger - I've never seen the server have problems starting just because a package wouldn't build. In fact, it's designed to show build failures. Do you have any console output from the server that you can include here? Is the code you are testing open-source, and if so, can you link to the commit that wasn't building?
I'm having the same issue
telnet localhost 8081
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.1
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
Date: Thu, 14 Aug 2014 15:32:31 GMT
Content-Length: 19
404 page not found
^]
telnet> Connection closed.
Nothing much changed since I last run it, except I think I pulled the latest version of GoConvey. I'll go update now and see
Ok so I recently change the location of my GOPATH from ~/code/go to ~/go. However, I did not remove the go/bin or go/pkg folders. I suspect that the here variable was still pointing to the old location of the GOPATH and GoConvey just couldn't find the static files.
@tgrosinger try remove the bin/pkg folders and re-install
@eMxyzptlk Cheers - you were spot on!
@tgrosinger - Are you encountering this behavior or does the suggestion by @eMxyzptlk (above) help?
My guess is that the suggestion to remove the bin and pkg folders, then reinstall, worked. Bizarre. I'm still looking into why that would be.
I renamed my goworkspace and this same problem occurred for me, and the provided solution worked (remove $gopath/pkg directory), so that go get and go install can re-generate those files.
For some reason (I assume internal-workings of Go), some of the files inside the $gopath/pkg/ contain full paths to other files living inside that directory.
Link to a question on golang-dev mailing list regarding these files: https://groups.google.com/d/topic/golang-dev/IbYwz9xwNys/discussion
Sounds like this is more a go issue than a goconvey issue.
Sounds like this is more a go issue than a goconvey issue.
I disagree.
goconvey calls runtime.Caller(0). This reports, among other things, the file location of the calling function. In the larger context of generic Go programs, it's perfectly valid for this not to exist. Imagine if you compile a Go program and then give it to me. My file system will differ from yours. I probably don't have the source to whatever you gave me installed, much less in exactly the same place. That's perfectly valid when reporting, say, a stack trace, but not so much when trying to access files based on that path.
This is similar to what's happened with Goconvey. It looks in a directory that was valid when Goconvey.exe was compiled. But I've changed my file system, and that directory no longer exists in the same place.
I don't know what the right answer is, exactly, but I'm pretty sure that it involves not using runtime.Caller() to find Goconvey's html files. At a guess, you'd want to either search underneath $GOPATH, or just have a GOCONVEY or GOCONVEYPATH variable (or both).
I'd rather not use an extra environment variable or assume that goconvey is installed at $GOAPTH/src/github.com/smartystreets/goconvey (although I don't know why it wouldn't be).
We could simply do an exists check at startup and if the directory doesn't exist (because someone moved their $GOPATH, we warn the user to delete $GOPATH/bin/goconvey and re-run go install github.com/smartystreets/goconvey.
Sorry for my absence. I somehow missed the mention notifications. Needless to say, I stopped encountering this issue.
Anyone else still having this, or should we close the issue?
@tgrosinger Not lately. But move $GOPATH/src/github.com/smartystreets/goconvey to somewhere else and try it yourself.
I had this issue today. I was receiving a 404 error after changing my $GOPATH location. To fix it I
- Deleted the file /bin/goconvey
- Deleted folder /pkg/github/smartstreets/goconvey
- Ran
go get github.com/smartystreets/goconvey
Thanks for your great work on goconvey :100:
Thanks for posting your workaround @iampeterbanjo
I had this issue today due to I had used goconvey for another project in my machine, To fix it I
- export new GOPATH for my workspace
- go get github.com/smartystreets/goconvey
- ran
whereis goconveyto find old goconvey and delete it - cp new goconvey from $GOPATH/bin/ to /bin/ folder hope this would be useful and thanks all participants especially the author
I have a similar issue. I have the goconvey binary on my server, I launch a container (which has a different gopath) and start the goconvey binary inside it. On startup it logs:
Could not find or create the coverage report directory (at: '/home/craig/projects/workspace/src/github.com/smartystreets/goconvey/web/client/reoprts').
The issue I believe is that inside my container the /home/craig/projects... path does not exist. Is there a way to have goconvey put reports somewhere else?
@mindscratch: I think your code block has a typo reoprts, unclear if that accurately reflects error message or not.
@atz thanks for mentioning it, though I'm no longer using goconvey so I can't confirm if that was the problem :)
I did not change anything on my machine and I suddenly started experiencing this issue. The work arounds mentioned here don't work. Any other thoughts, it's weird this happens
I met the same issue.
some txt files generated in $GOPATH/pkg/mod/github.com/smartystreets/[email protected]/web/client/reports
but same name html files not exists。
check $GOROOT/bin
If the go not in this path, move your go into it。
whereis go find your go.
https://github.com/smartystreets/goconvey/issues/619#issuecomment-1980343642