Error on Edit API

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:38:32 +0000.
Sender:Senthil Muniswamy.
Date:Tuesday, 22 December 2015 18:46:41 UTC.

Hi Martin,

Fresh install of Tyk Dashborad v0.9.7.0. Initialized with new user and org. Imported API using Swagger JSON API definition. Getting the following error while editing the API. What could cause this?

FYI, I do have this issue with an upgraded Tyk Dashboard.

ERROR 2015/12/22 18:07:56.146904 panic_handler.go:26: PANIC
URL: /api/apis/5679917428ee220008000004/url
ERROR: Invalid input to ObjectIdHex: “”
STACK:
goroutine 2260 [running]:
github.com/gocraft/web.(*Router).handlePanic(0xc8200bbef0, 0xc82038c900, 0xc82038c920, 0x92f060, 0xc82015f290)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:251 +0x348
github.com/gocraft/web.(*Router).ServeHTTP.func1(0xc8200bbef0, 0xc82038c900)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:43 +0x68
gopkg.in/mgo.v2/bson.ObjectIdHex(0x0, 0x0, 0x0, 0x0)
/home/tyk/go/src/gopkg.in/mgo.v2/bson/bson.go:175 +0x210
main.(*OrganisationDocument).GetById(0xc820328580, 0x0, 0x0, 0xc8202fe5ce)
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/ModelApiRegister.go:93 +0x122
main.(*APIContext).GetAPIUrl(0xc820026230, 0x7f77488dc648, 0xc82038c900, 0xc82038c920)
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/ApiApiManagement.go:165 +0x1c5
reflect.Value.call(0x9a62e0, 0xc0e6b0, 0x13, 0xadf610, 0x4, 0xc8201d0b78, 0x3, 0x3, 0x0, 0x0, …)
/usr/local/go/src/reflect/value.go:432 +0x120a
reflect.Value.Call(0x9a62e0, 0xc0e6b0, 0x13, 0xc8201d0b78, 0x3, 0x3, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:300 +0xb1
github.com/gocraft/web.middlewareStack.func1(0x7f77488dc648, 0xc82038c900, 0xc82038c920)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:113 +0xace
main.(*APIContext).ApiAuthorisationRequired(0xc820026230, 0x7f77488dc648, 0xc82038c900, 0xc82038c920, 0xc8201d6f80)
/home/tyk/go/src/github.com/lonelycode/tyk-analytics/Main.go:406 +0x15e
reflect.Value.call(0x9d6260, 0xc0e5e8, 0x13, 0xadf610, 0x4, 0xc8201d10c0, 0x4, 0x4, 0x0, 0x0, …)
/usr/local/go/src/reflect/value.go:432 +0x120a
reflect.Value.Call(0x9d6260, 0xc0e5e8, 0x13, 0xc8201d10c0, 0x4, 0x4, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:300 +0xb1
github.com/gocraft/web.(*middlewareHandler).invoke(0xc8202e42a0, 0xadc860, 0xc820026230, 0x16, 0x7f77488dc648, 0xc82038c900, 0xc82038c920, 0xc8201d6f80)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:133 +0x281
github.com/gocraft/web.middlewareStack.func1(0x7f77488dc648, 0xc82038c900, 0xc82038c920)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1a0
github.com/gocraft/web.StaticMiddlewareFromDir.func1(0x7f77488dc648, 0xc82038c900, 0xc82038c920, 0xc8201d6f80)
/home/tyk/go/src/github.com/gocraft/web/static_middleware.go:30 +0x17d
github.com/gocraft/web.(*middlewareHandler).invoke(0xc8202e4090, 0xa9ab00, 0xc820026228, 0x16, 0x7f77488dc648, 0xc82038c900, 0xc82038c920, 0xc8201d6f80)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:131 +0x6e
github.com/gocraft/web.middlewareStack.func1(0x7f77488dc648, 0xc82038c900, 0xc82038c920)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1a0
github.com/gocraft/web.StaticMiddlewareFromDir.func1(0x7f77488dc648, 0xc82038c900, 0xc82038c920, 0xc8201d6f80)
/home/tyk/go/src/github.com/gocraft/web/static_middleware.go:30 +0x17d
github.com/gocraft/web.(*middlewareHandler).invoke(0xc8202e4060, 0xa9ab00, 0xc820026228, 0x16, 0x7f77488dc648, 0xc82038c900, 0xc82038c920, 0xc8201d6f80)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:131 +0x6e
github.com/gocraft/web.middlewareStack.func1(0x7f77488dc648, 0xc82038c900, 0xc82038c920)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:122 +0x1a0
github.com/gocraft/web.(*Router).ServeHTTP(0xc8200bbef0, 0x7f77488dc5e8, 0xc8202e7c30, 0xc82043b5e0)
/home/tyk/go/src/github.com/gocraft/web/router_serve.go:48 +0x355
net/http.(*ServeMux).ServeHTTP(0xc8202ddce0, 0x7f77488dc5e8, 0xc8202e7c30, 0xc82043b5e0)
/usr/local/go/src/net/http/server.go:1699 +0x17d
net/http.serverHandler.ServeHTTP(0xc8202cab40, 0x7f77488dc5e8, 0xc8202e7c30, 0xc82043b5e0)
/usr/local/go/src/net/http/server.go:1862 +0x19e
net/http.(*conn).serve(0xc8202e7b80)
/usr/local/go/src/net/http/server.go:1361 +0xbee
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:1910 +0x3f6

Thanks,
Senthil

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 22 December 2015 19:05:10 UTC.

Tyk is trying to open an API definition by its ID but the ID is empty.

Not sure what the problem is with your installation as these features work fine. Potentially a misconfiguration of the upgrade.

It could be that you are not logged in properly and the dashboard can’t identify your org id from the session.

Many thanks,
Martin


From: Senthil Muniswamy [email protected]
Sent: Tuesday, December 22, 2015 18:46
Subject: Error on Edit API
To: Tyk Community Support [email protected]

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/9cbbc484-bc6e-4a28-a24e-332e75ff5d37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Senthil Muniswamy.
Date:Wednesday, 23 December 2015 03:48:24 UTC.

Reconfigured again. Works fine now.

  • show quoted text -