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

Failed to parse port as integer: %!s(int=-1) #194

Open
perrornet opened this issue Jul 20, 2020 · 2 comments
Open

Failed to parse port as integer: %!s(int=-1) #194

perrornet opened this issue Jul 20, 2020 · 2 comments
Assignees

Comments

@perrornet
Copy link

system:
Windows 10

go version
go version go1.13.3 windows/amd64

go env:

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\qinya\AppData\Local\go-build
set GOENV=C:\Users\qinya\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=E:\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=E:\my-app1\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\qinya\AppData\Local\Temp\go-build459198110=/tmp/go-build -gno-record-gcc-switches

revel version:

Revel executing: displays the Revel Framework and Go version
Revel Framework :       Unknown (Unknown remote master branch)
Revel Cmd       :       1.0.0   (Unknown remote master branch)
Revel Modules   :       Unknown (Unknown remote master branch)

start project cmd:

revel new -a my-app -r

ouput:

Revel executing: create a skeleton Revel application
Your application has been created in:
   E:\my-app
WARN  16:02:56 harness.go:175: No http.addr specified in the app.conf listening on localhost interface only. This will not allow external access to your application
Changed detected, recompiling
Parsing packages, (may require download if not cached)... Completed
?[32mINFO ?[0m 16:03:20    app     run.go:34: Running revel server
?[32mINFO ?[0m 16:03:20    app   plugin.go:9: Go to /@tests to run the tests.
Revel proxy is listening, point your browser to : 9000Revel engine is listening on.. localhost:8529

run project cmd:

revel run my-app1 dev

ouput:

CRIT  16:42:24 revel_logger.go:59: Failed to parse port as integer: %!s(int=-1)
@notzippy notzippy self-assigned this Jul 20, 2020
@notzippy
Copy link
Contributor

This behavior does not occur in go 1.14.2, it appears that this line https://github.com/revel/cmd/blob/master/revel/run.go#L78 is passing so that the conversion from the third argument is attempted and fails. Please either upgrade Go or use the flags to prevent this from occurring like

revel run -a my-app1 -m dev

@goevexx
Copy link

goevexx commented Jul 25, 2020

It also occurs in 1.14.6

$ revel run my-app dev
CRIT  22:18:43 revel_logger.go:59: Failed to parse port as integer: %!s(int=-1) 
$ revel version
Revel executing: displays the Revel Framework and Go version
Revel Framework :       Unknown (1.0.0 remote master branch)
Revel Cmd       :       1.0.0   (1.0.0 remote master branch)
Revel Modules   :       Unknown (1.0.0 remote master branch)


Go Location:C:\Go\bin\go.exe

go version go1.14.6 windows/amd64

revel run -a my-app -m dev works instead

@notzippy notzippy reopened this Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants