Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:16:19 +0000.
Sender:michele danieli
.
Date:Friday, 19 June 2015 21:01:37 UTC+1.
Hello,
i am having problems with key generation, maybe someone can help me. I have installed in vagrant Tyk 1.6 with Tyk Analytics 0.9.4.4. When I try to request a key or approve a request I get the following application error. I checked on mongo the request and have the result below (after the stack trace).
Any clue of what the problem may be? I cleaned up the DB manually and started all over, registering a new organization but the result did not change.
I am thinking about starting from scratch and reinstall everything.
========================= STACK TRACE OF TYK_ANALYTICS
ERROR 2015/06/19 15:26:59.006372 panic_handler.go:26: PANIC
URL: /api/portal/requests/approve/5584346856c02c0624000001
ERROR: Invalid input to ObjectIdHex: “”
STACK:
goroutine 51 [running]:
github.com/gocraft/web.(*Router).handlePanic(0xc208046160, 0xc20815c6c0, 0xc20815c6e0, 0x814a80, 0xc208179ce0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:251 +0x37a
github.com/gocraft/web.func·001()
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:43 +0x84
labix.org/v2/mgo/bson.ObjectIdHex(0xce6f68, 0x0, 0x0, 0x0)
/home/tyk/go/src/labix.org/v2/mgo/bson/bson.go:174 +0x207
main.(*KeyRequest).Generate(0xc2081c3570, 0x0, 0x0, 0x0, 0x0)
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/PortalModelKeyRequest.go:76 +0x7cf
main.(*APIContext).PortalApproveKeyRequest(0xc208036970, 0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0)
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/PortalAPIMethods.go:419 +0x31e
reflect.Value.call(0x876d00, 0xa9ad48, 0x13, 0x973470, 0x4, 0xc2081e8908, 0x3, 0x3, 0x0, 0x0, …)
/usr/local/go/src/reflect/value.go:419 +0x10e5
reflect.Value.Call(0x876d00, 0xa9ad48, 0x13, 0xc2081e8908, 0x3, 0x3, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:296 +0xbc
github.com/gocraft/web.func·002(0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:113 +0xbc0
main.(*APIContext).ApiAuthorisationRequired(0xc208036970, 0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0, 0xc2081797b0)
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:327 +0x11d
reflect.Value.call(0x8a0d80, 0xa9ab80, 0x13, 0x973470, 0x4, 0xc2081e8e18, 0x4, 0x4, 0x0, 0x0, …)
/usr/local/go/src/reflect/value.go:419 +0x10e5
reflect.Value.Call(0x8a0d80, 0xa9ab80, 0x13, 0xc2081e8e18, 0x4, 0x4, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:296 +0xbc
github.com/gocraft/web.(*middlewareHandler).invoke(0xc208099470, 0x96e0e0, 0xc208036970, 0x16, 0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0, 0xc2081797b0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:133 +0x2d5
github.com/gocraft/web.func·002(0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1c8
github.com/gocraft/web.func·004(0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0, 0xc2081797b0)
/home/tyk/go/src/github.com/gocraft/web/static_middleware.go:23 +0x64a
github.com/gocraft/web.(*middlewareHandler).invoke(0xc2080c5bc0, 0x937c80, 0xc208036950, 0x16, 0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0, 0xc2081797b0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:131 +0x71
github.com/gocraft/web.func·002(0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1c8
github.com/gocraft/web.func·004(0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0, 0xc2081797b0)
/home/tyk/go/src/github.com/gocraft/web/static_middleware.go:23 +0x64a
github.com/gocraft/web.(*middlewareHandler).invoke(0xc2080c5b60, 0x937c80, 0xc208036950, 0x16, 0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0, 0xc2081797b0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:131 +0x71
github.com/gocraft/web.func·002(0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1c8
github.com/gocraft/web.LoggerMiddleware(0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0, 0xc2081797b0)
/home/tyk/go/src/github.com/gocraft/web/logger_middleware.go:16 +0x78
github.com/gocraft/web.(*middlewareHandler).invoke(0xc2080c5b30, 0x937c80, 0xc208036950, 0x16, 0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0, 0xc2081797b0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:131 +0x71
github.com/gocraft/web.func·002(0x7f52baccee18, 0xc20815c6c0, 0xc20815c6e0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1c8
github.com/gocraft/web.(*Router).ServeHTTP(0xc208046160, 0x7f52baccede0, 0xc20808f5e0, 0xc2080cb790)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:48 +0x3cf
net/http.serverHandler.ServeHTTP(0xc208042b40, 0x7f52baccede0, 0xc20808f5e0, 0xc2080cb790)
/usr/local/go/src/net/http/server.go:1703 +0x19a
net/http.(*conn).serve(0xc20808f360)
/usr/local/go/src/net/http/server.go:1204 +0xb57
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:1751 +0x35e
==================== MONGO DB QUERY ==========================
db.portal_key_requests.find()
{ “_id” : ObjectId(“5584346856c02c0624000001”), “org_id” : “558333a456c02c049f000001”, “for_api” : “4a9f881537394289654dd049cac68902”, “by_user” : “5583367f56c02c0533000001”, “fields” : { }, “approved” : false, “date_created” : ISODate(“2015-06-19T15:25:28.369Z”) }