Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Error on newrelic.WrapHandle() about a missing '<autogenerated>' file

golang
error
http_errors
go-agent
rfb

#1

I have a Go API and some times I get these errors in the NewRelic Dashboard:

/tmp/tmp.Z4mrDnatAl/.go/src/bitbucket.org/luizacorp/moc-pricing-arquimedes/vendor/github.com/newrelic/go-agent/internal_txn.go (go-agent.(*txn).WriteHeader:201)
<autogenerated> (go-agent.wrapCFHR.WriteHeader:500)
/tmp/tmp.Z4mrDnatAl/.go/src/bitbucket.org/luizacorp/moc-pricing-arquimedes/prices.go (main.fetchPricesData:47)
/tmp/cache/go1.8/go/src/net/http/server.go (http.HandlerFunc.ServeHTTP:1942)
/tmp/tmp.Z4mrDnatAl/.go/src/bitbucket.org/luizacorp/moc-pricing-arquimedes/vendor/github.com/newrelic/go-agent/instrumentation.go (go-agent.WrapHandle.func1:30)
/tmp/cache/go1.8/go/src/net/http/server.go (http.HandlerFunc.ServeHTTP:1942)
/tmp/tmp.Z4mrDnatAl/.go/src/bitbucket.org/luizacorp/moc-pricing-arquimedes/vendor/github.com/newrelic/go-agent/instrumentation.go (go-agent.WrapHandleFunc.func1:38)
/tmp/cache/go1.8/go/src/net/http/server.go (http.HandlerFunc.ServeHTTP:1942)
/tmp/tmp.Z4mrDnatAl/.go/src/bitbucket.org/luizacorp/moc-pricing-arquimedes/vendor/github.com/gorilla/mux/mux.go (mux.(*Router).ServeHTTP:114)
/tmp/cache/go1.8/go/src/net/http/server.go (http.serverHandler.ServeHTTP:2568)
/tmp/cache/go1.8/go/src/net/http/server.go (http.(*conn).serve:1825)
/tmp/cache/go1.8/go/src/runtime/asm_amd64.s (runtime.goexit:2197)

I see that my file prices.go is in the trace.

I have used Delve to debug my code and I get the same error every time I run it!

	if err != nil {
		response := Response{Message: err.Error(), Code: 500}
		w.WriteHeader(500)
		json.NewEncoder(w).Encode(response)
		return
	}

When json is reached it goes to http.ServeHTTP() and then to newrelic.WrapHandle() and the I get the following error message:

Unable to open '<autogenerated>': File not found (/<autogenerated>).

Any ideas?