Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Error: Stream removed\n at /user_code/node_modules/grpc/src/client.js:554:15' #35

Closed
Alappin opened this issue Dec 25, 2017 · 13 comments
Closed
Assignees
Labels
api: datastore Issues related to the googleapis/nodejs-datastore API. priority: p0 Highest priority. Critical issue. P0 implies highest priority. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@Alappin
Copy link

Alappin commented Dec 25, 2017

Environment details

  • OS: Google Cloud Functions
  • Node.js version: GCF version
  • npm version: GCF version
  • @google-cloud/datastore version: 1.3.3

Steps to reproduce

  1. Perform a query in Datastore within a cloud function e.g.
const datastore = require('@google-cloud/datastore')({});

module.exports.myFunction = function() {
   datastore.get(key).then()....
}

This results in the above error. Same code works fine when run locally in Node (outside of cloud functions). I don't know whether this is more of a Cloud Functions bug or Cloud Datastore bug?

@t6adev
Copy link

t6adev commented Dec 26, 2017

I got same error on my GCF project.
When my code was run at GCF, the code basically success but sometimes failed.
My case was below:

  1. Deployed GCF project as HTTP triggers.
  2. First access the endpoint, my code is failed(crushed).
    Errors are:
    • Unhandled rejection
    • Error: Stream removed at /user_code/node_modules/@google-cloud/datastore/node_modules/grpc/src/client.js:554:15
    • Function execution took 504 ms, finished with status: 'crash'

After crashed, I accessed to run datastore code then those code success...
But 30 min. ~ few hours later I accessed, sometimes code got the error...

@stephenplusplus
Copy link
Contributor

Related issue: grpc/grpc-node#130

@callmehiphop Do we just need to downgrade all of the places we have a grpc dependency to ~1.7?

@stephenplusplus stephenplusplus added priority: p0 Highest priority. Critical issue. P0 implies highest priority. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 26, 2017
@callmehiphop
Copy link
Contributor

@stephenplusplus I believe that is correct :(

@stephenplusplus
Copy link
Contributor

@dgadelha
Copy link

dgadelha commented Jan 1, 2018

Anything we can do locally to workaround Google's bureaucracy with updates? This error is happening frequently here.

@Alappin
Copy link
Author

Alappin commented Jan 1, 2018

@dgadelha I ended up downgrading to datastore version 1.1.0 for the meantime and I am not seeing the errors in that version. It will be good if there is a more permanent official solution soon.

@stephenplusplus
Copy link
Contributor

cc @bricktownseo who reported this in googleapis/nodejs-spanner#76

@stephenplusplus
Copy link
Contributor

New and re-installations of @google-cloud/datastore should pick up the non-broken version of gRPC now. Please try it out and let me know if there are any issues.

@dgadelha
Copy link

dgadelha commented Jan 3, 2018

Updated everything, didn't experience the issue so far.

@stephenplusplus
Copy link
Contributor

Great, thanks for testing. Let me know if it reappears.

@dgadelha
Copy link

dgadelha commented Jan 4, 2018

Hey Stephen,

I've been now experiencing this issue:

Error: Unexpected error while acquiring application default credentials: read ECONNRESET
  at /user_code/node_modules/@google-cloud/datastore/node_modules/google-gax/node_modules/google-auth-library/lib/auth/googleauth.js:196:35
  at /user_code/node_modules/@google-cloud/datastore/node_modules/google-gax/node_modules/google-auth-library/lib/auth/googleauth.js:229:32
  at Request._callback (/user_code/node_modules/@google-cloud/datastore/node_modules/google-gax/node_modules/google-auth-library/lib/transporters.js:79:36)
  at self.callback (/user_code/node_modules/@google-cloud/datastore/node_modules/request/request.js:186:22)
  at emitOne (events.js:96:13)
  at Request.emit (events.js:188:7)
  at Request.onRequestError (/user_code/node_modules/@google-cloud/datastore/node_modules/request/request.js:878:8)
  at emitOne (events.js:96:13)
  at ClientRequest.emit (events.js:188:7)
  at Socket.socketErrorListener (_http_client.js:310:9)

@stephenplusplus
Copy link
Contributor

Could you open a new issue with details of the versions you're running, the environment you're in, and reproduction code?

@dgadelha
Copy link

dgadelha commented Jan 4, 2018

@stephenplusplus opened #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/nodejs-datastore API. priority: p0 Highest priority. Critical issue. P0 implies highest priority. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

6 participants