go appengine: panic: proto: duplicate enum registered: appengine.LogServiceError_ErrorCode

huangapple go评论88阅读模式
英文:

go appengine: panic: proto: duplicate enum registered: appengine.LogServiceError_ErrorCode

问题

我最近更新了我的golang GAE SDK(goapp版本现在是go1.4.2(appengine-1.9.21)darwin/amd64),当我尝试提供应用程序时,现在出现了以下错误:

orcaman$ goapp version
go version go1.4.2 (appengine-1.9.21) darwin/amd64

Ors-MacBook-Pro:main orcaman$ goapp serve

INFO 2015-05-23 12:45:38,666 devappserver2.py:745] Skipping SDK update check.
INFO 2015-05-23 12:45:38,778 api_server.py:190] Starting API server at: http://localhost:57135
INFO 2015-05-23 12:45:38,784 dispatcher.py:192] Starting module "default" running at: http://localhost:8080
INFO 2015-05-23 12:45:38,785 admin_server.py:118] Starting admin server at: http://localhost:8000
ERROR 2015-05-23 12:45:43,640 http_runtime.py:343] bad runtime process port ['']
panic: proto: duplicate enum registered: appengine.LogServiceError_ErrorCode

goroutine 1 [running]:
github.com/golang/protobuf/proto.RegisterEnum(0x5be130, 0x23, 0xc2080b1470, 0xc2080b14a0)
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/github.com/golang/protobuf/proto/properties.go:739 +0xe1
google.golang.org/appengine/internal/log.init·1()
/Users/orcaman/github.com/streamrail/go/src/google.golang.org/appengine/internal/log/log_service.pb.go:897 +0x4c
google.golang.org/appengine/internal/log.init()
/var/folders/dv/g8_pdljx49gdtbs25_1ch7vm0000gn/T/tmpW9bYiGappengine-go-bin/_extra_imports_9.go:7 +0x191
google.golang.org/appengine/log.init()
/var/folders/dv/g8_pdljx49gdtbs25_1ch7vm0000gn/T/tmpW9bYiGappengine-go-bin/_extra_imports_25.go:7 +0x4f
github.com/streamrail/appengine/website.init()
/var/folders/dv/g8_pdljx49gdtbs25_1ch7vm0000gn/T/tmpW9bYiGappengine-go-bin/_extra_imports_36.go:7 +0x68
main04809.init()
_extra_imports_42.go:7 +0x51
main.init()
_go_main.go:18 +0x42

goroutine 2 [runnable]:
runtime.forcegchelper()
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/proc.go:90
runtime.goexit()
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:2232 +0x1

goroutine 3 [runnable]:
runtime.bgsweep()
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/mgc0.go:82
runtime.goexit()
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:2232 +0x1

goroutine 4 [runnable]:
runtime.runfinq()
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/malloc.go:712
runtime.goexit()
/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:2232 +0x1

阅读这个之后,我认为这可能与同时引用新的“google.golang.org/appengine”和旧的“appengine”包有关,但是我的应用程序现在没有一个对“appengine”的引用。

需要帮助吗?

英文:

I've recently updated my golang GAE SDK (goapp version is now go1.4.2 (appengine-1.9.21) darwin/amd64), and I'm getting this error now when trying to serve the app:

orcaman$ goapp version
go version go1.4.2 (appengine-1.9.21) darwin/amd64

Ors-MacBook-Pro:main orcaman$ goapp serve

INFO     2015-05-23 12:45:38,666 devappserver2.py:745] Skipping SDK update check.
INFO     2015-05-23 12:45:38,778 api_server.py:190] Starting API server at: http://localhost:57135
INFO     2015-05-23 12:45:38,784 dispatcher.py:192] Starting module "default" running at: http://localhost:8080
INFO     2015-05-23 12:45:38,785 admin_server.py:118] Starting admin server at: http://localhost:8000
ERROR    2015-05-23 12:45:43,640 http_runtime.py:343] bad runtime process port ['']
panic: proto: duplicate enum registered: appengine.LogServiceError_ErrorCode

goroutine 1 [running]:
github.com/golang/protobuf/proto.RegisterEnum(0x5be130, 0x23, 0xc2080b1470, 0xc2080b14a0)
	/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/github.com/golang/protobuf/proto/properties.go:739 +0xe1
google.golang.org/appengine/internal/log.init·1()
	/Users/orcaman/github.com/streamrail/go/src/google.golang.org/appengine/internal/log/log_service.pb.go:897 +0x4c
google.golang.org/appengine/internal/log.init()
	/var/folders/dv/g8_pdljx49gdtbs25_1ch7vm0000gn/T/tmpW9bYiGappengine-go-bin/_extra_imports_9.go:7 +0x191
google.golang.org/appengine/log.init()
	/var/folders/dv/g8_pdljx49gdtbs25_1ch7vm0000gn/T/tmpW9bYiGappengine-go-bin/_extra_imports_25.go:7 +0x4f
github.com/streamrail/appengine/website.init()
	/var/folders/dv/g8_pdljx49gdtbs25_1ch7vm0000gn/T/tmpW9bYiGappengine-go-bin/_extra_imports_36.go:7 +0x68
main04809.init()
	_extra_imports_42.go:7 +0x51
main.init()
	_go_main.go:18 +0x42

goroutine 2 [runnable]:
runtime.forcegchelper()
	/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/proc.go:90
runtime.goexit()
	/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:2232 +0x1

goroutine 3 [runnable]:
runtime.bgsweep()
	/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/mgc0.go:82
runtime.goexit()
	/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:2232 +0x1

goroutine 4 [runnable]:
runtime.runfinq()
	/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/malloc.go:712
runtime.goexit()
	/private/var/folders/00/0v42r000h01000cxqpysvccm003chb/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:2232 +0x1

after reading this, I though this might be related to having refs to both the new "google.golang.org/appengine" and old "appengine" packages at the same time, but my application now does not have a single ref to "appengine".

help?

答案1

得分: 1

好的,以下是翻译好的内容:

好的,我知道了:我需要删除我的 $GOPATH/src/google.golang.org/appengine/ 文件夹,然后重新运行我的应用程序中的 goapp get 命令,以在新的格式中重新获取依赖项。这将修复上述提到的问题。

英文:

OK, I got it: I had to delete my $GOPATH/src/google.golang.org/appengine/ folder, and then re-run goapp get from my app to re-fetch the deps in the new format. This fixed the issue mentioned above.

huangapple
  • 本文由 发表于 2015年5月23日 20:51:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/30412885.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定