prisma / prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
https://www.prisma.io
Apache License 2.0
39.64k stars 1.55k forks source link

"Oops. We could not send the error report." #1869

Closed janpio closed 4 years ago

janpio commented 4 years ago
  1. Clone https://github.com/harshit-test-org/prisma2-client-502
  2. Update package.json to preview024
  3. yarn
  4. Adapt prisma/.env to point to local MySQL 5.7 installation
  5. yarn prisma2 migrate save --experimental
  6. yarn prisma2 migrate up --experimental
  7. See:

    You can get the detailed db changes with prisma2 migrate up --experimental --verbose
    Or read about them in the ./migrations/MIGRATION_ID/README.md
     ERROR  Oops, an unexpected error occured!
    Failure during a migration command: Connector error. (error: Error querying the database: Error querying the database: Error querying the database: Server error: `ERROR 42S02 (1146): Table '_issue_client_502._migration' doesn't exist')
    Please help us improve Prisma 2 by submitting an error report.
    Error reports never contain personal or other sensitive information.
    Learn more: https://pris.ly/d/telemetry
    
    ┌─ Submit error report ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐  
    │                                                                                                                                                                                                                                                                                               │  
    │ > Yes            Send error report once                                                                                                                                                                                                                                                       │  
    │   No             Don't send error report                                                                                                                                                                                                                                                      │  
    │                                                                                                                                                                                                                                                                                               │  
    └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 

    after trying to send report:

    ...
    You can get the detailed db changes with prisma2 migrate up --experimental --verbose
    Or read about them in the ./migrations/MIGRATION_ID/README.md
    Failure during a migration command: Connector error. (error: Error querying the database: Error querying the database: Error querying the database: Server error: `ERROR 42S02 (1146): Table '_issue_client_502._migration' doesn't exist')
    Oops. We could not send the error report.
    
    Thanks a lot for your help! �🙏
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command

(preview022 + preview024)

pantharshit00 commented 4 years ago

Unable to reproduce with the provided reproduction. Migration just succeeds for me: image

janpio commented 4 years ago

Your reproduction indicates you are not using Windows.

pantharshit00 commented 4 years ago

I got a better reproduction for this. Try migrating the following model(issue: https://github.com/prisma/prisma2/issues/1860):

model User {
  id   Int    @id @default(autoincrement())
  name String @unique

 @@index([name])
}
image
pantharshit00 commented 4 years ago

Not a windows specific issue but it indicates error reporting backend is broken or cli is sending faulty error reports.

pantharshit00 commented 4 years ago

I am assuming this issue is tracking the fault of error reporting backend.

The actual migrate issue is on my list now to test on windows.

janpio commented 4 years ago

The migrate issue is irrelevant here, you can ignore that and do not need to spend time on it - this is really just about the failure to send error reports.

Jolg42 commented 4 years ago
2020-03-24T15:28:48.148Z sendPanic TypeError: Cannot read property 'signature' of undefined
    at Object.<anonymous> (/Users/j42/Dev/prisma2-client-502/node_modules/prisma2/build/index.js:2:1662033)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/j42/Dev/prisma2-client-502/node_modules/prisma2/build/index.js:2:1660593)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
[?25herror Command failed with exit code 1.

How to find this logs?! Well the interactive console for sending the reports hides it... So env DEBUG="*" yarn prisma2 migrate up --experimental 2> hidden-error.txt 😉

Fixed by 5b4b350940bf4015318572a63dc44124f51e5472 in alpha

Can't reproduce in 953! 🎊

Screen Shot 2020-03-24 at 16 33 33
janpio commented 4 years ago

Can confirm that sending error reports now works.