Comments (7)
I get the error appengine: NewContext passed an unknown http.Request
and the app crashes when I pass in a new *http.Request
into log.Errorf
(where log
is from the package google.golang.org/appengine/log
.
In some functions, the request variable isn't available, so when I want to log something with the appengine/log.log
function the entire app fails. This even happens in production (not just on the local server).
BTW this is happening on Standard Environment.
Please help fix this soon! And thanks in advance.
from golang-samples.
appengine.NewContext isn't necessary for App Engine flexible.
I suggest using: r.Context()
instead. This gives you a context scoped to the request. That is, it's cancelled if the client goes away or the connection drops.
Use context.Background()
for anything else.
That said, that function call shouldn't panic, it's a bug. I'll file it over at https://github.com/golang/appengine.
from golang-samples.
You're the real MVP. Many thanks
from golang-samples.
@dchenk can you paste some code?
specifically, your import paths (the relevant ones at least), your call to log.Errorf
and the relevant lines around it.
from golang-samples.
@dchenk the issue you're describing was just reported here golang/appengine#85
We'll track this issue there.
Thanks for your report.
from golang-samples.
I am seeing the issue while trying to get appengine context for using memcache as memcache requires appengine context.
appengine: NewContext passed an unknown http.Request
from golang-samples.
@arulrajalivi this issue is closed. see golang/appengine#85 for details.
from golang-samples.
Related Issues (20)
- Provide a golang example to pass data out of firestore transaction
- pubsublite/admin: TestTopicAdmin failed HOT 1
- container_registry/container_analysis: TestPubSub failed HOT 1
- storagetransfer: TestDownloadToPosix failed HOT 2
- storage/notifications: TestNotifications failed HOT 3
- container_registry/container_analysis: TestCreateNote failed HOT 1
- run/testing: TestEditorService failed HOT 1
- cloudsql/mysql/database-sql: TestGetVotes failed HOT 1
- securitycenter/muteconfig: TestSetUnmuteFinding failed HOT 2
- securitycenter/muteconfig: TestBulkMuteFinding failed HOT 2
- `context.TODO()` --> `context.Background()`, for consistency
- pubsub/subscriptions: TestPullMsgsAsync failed HOT 1
- storagetransfer: TestGetLatestTransferOperation failed HOT 1
- storage/service_account/hmac: TestDeleteKey failed HOT 2
- storage: add object retention samples
- healthcare: TestDICOMStore failed HOT 1
- media/videostitcher: TestListSlates failed HOT 1
- datacatalog/datacatalog_quickstart: TestApp failed HOT 1
- asset/quickstart/batch-get-effective-iam-policies: TestMain failed HOT 1
- asset/quickstart/search-all-resources: TestMain failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from golang-samples.