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

introspect: "Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed" #1500

Closed
janpio opened this issue Jan 31, 2020 · 5 comments
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: prisma db pull CLI: prisma db pull
Milestone

Comments

@janpio
Copy link
Member

janpio commented Jan 31, 2020

When running this introspect command prisma2 introspect --url mysql://prisma:...@introspection-public-mysql-cluster.cluster-ro-clfeqqifnebj.eu-west-1.rds.amazonaws.com:3306/allsquare --print (password via @janpio or @divyenduz), you get this error message:

Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:431:19)
    at writeOrBuffer (_stream_writable.js:419:5)
    at Socket.Writable.write (_stream_writable.js:309:11)
    at /Users/runner/runners/2.164.0/work/introspection-engine-output/introspection-engine-output/node_modules/prisma2/build/index.js:2:980933
    at new Promise (<anonymous>)
    at IntrospectionEngine.<anonymous> (/Users/runner/runners/2.164.0/work/introspection-engine-output/introspection-engine-output/node_modules/prisma2/build/index.js:2:979697)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/runner/runners/2.164.0/work/introspection-engine-output/introspection-engine-output/node_modules/prisma2/build/index.js:2:974378)
    at processTicksAndRejections (internal/process/task_queues.js:94:5) {
  code: 'ERR_STREAM_DESTROYED'
}
Error: [src/libcore/result.rs:1165:5] called `Result::unwrap()` on an `Err` value: "Table clubs not found"

The first bit seems unwanted.

@janpio janpio added bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. topic: cli-introspect labels Jan 31, 2020
@pantharshit00
Copy link
Contributor

I can reproduce this:
image

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. and removed bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. labels Feb 3, 2020
@janpio janpio added this to the Preview 22 milestone Feb 3, 2020
@timsuchanek
Copy link
Contributor

Thanks a lot for reporting 🙏
This issue is fixed in the latest alpha version of prisma2.
You can try it out with npm i -g prisma2@alpha.

In case it’s not fixed for you - please let us know and we’ll reopen this issue!

@pitops
Copy link

pitops commented Feb 8, 2020

what is it exactly?? happens to prisma 1 as well

@lednhatkhanh
Copy link

Happens to me as well with preview 22 and even with alpha

@pantharshit00
Copy link
Contributor

@lednhatkhanh Can you please let us know how we can reproduce this?

what is it exactly?? happens to prisma 1 as well

We were trying to use the introspection engine after it was stopped. That is why it threw the error. For Prisma 1 it can be a very different cause.

@janpio janpio added topic: prisma db pull CLI: prisma db pull and removed topic: prisma introspect labels Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: prisma db pull CLI: prisma db pull
Projects
None yet
Development

No branches or pull requests

5 participants