prisma: Query was empty error on Preview 16

I recently updated my project to use preview016 which released today. However, intermittently there are errors being thrown.

More exactly:

Error in connector: Error querying the database: Server error: `ERROR 42000 (1065): Query was empty'

I’d run a query (works), wait for couple seconds, and then re-run the same exact query, and the error would throw.

The only thing that works is to downgrade back to preview015.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 22 (12 by maintainers)

Most upvoted comments

Fix should be in the next release on Thursday (or if compiling the core from sources).

@pantharshit00 @pimeys Thanks for the help on this one.

My report was ‘correct’, but it was caused because I was trying to use a global install of the Primsa CLI. So I had one (global) bumped to latest, but not the internal package in node_modules for my API.

So I was on an odd edge case.

I’ve managed to get everything updated today with the latest from Preview 17, including a couple hiccups with pinned dependencies on nexus and nexus-prisma. Once got past all that, it appears to be smooth sailing now.

It should be coming out today. Was postponed from last Thursday due to some last minute fixes and not having enough time.

image

I can reproduce this now. Seems only reproducible in with the MySQL connector, not with the Postgres or SQLite connector.

Thanks again for sharing the reproduction with us 😃

Internal note: Use the above repository for the reproduction. Fill in your MySQL credentials in the schema file and run the server. Query it once and then wait for 45 seconds and query again to reproduce. Video shared by @iRoachie is helpful here(https://loom.com/share/a42393267be34b6eb658460d2d05f4cc).

It just fails after being idle 🤷🏽‍♂️

This happens in preview16.1 as well