question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

query always returns empty array

See original GitHub issue
const users = await client.query(`SELECT * FROM users`)

expected behavior returns array of objects with data from database.

actual behavior returns an empty array.

server info innodb_version: 5.6.45-86.1 protocol_version: 10 version: 10.1.43-MariaDB

The test database has actual data stored, works with other clients. I logged some received data in connection.ts. Looks like the field names are received but not the values.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
timreichencommented, Mar 8, 2020

Yeah I did. Getting following console output (like the other issue I posted):

INFO connecting 127.0.0.1:3306
INFO connected to 127.0.0.1
error: Uncaught Error: Got packets out of order
► connection.ts:113:17
113           throw new Error(error.message);
    at nextPacket (connection.ts:113:17)
0reactions
timreichencommented, Jun 12, 2022

Closing this because of inactivity. Not sure, I don’t know if the bug is fixed. Else feel free to reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sanity query always return empty array - Stack Overflow
I have found the solution. I needed to switch the project from private to public. It's a blog by the way. enter image...
Read more >
query always returns empty array · Issue #29 - GitHub
I make a very simple query. I send to three different databases. Two of them work as expected. The third will return an...
Read more >
mongoDB autocomplete returns empty array - Atlas Search
The search always returns an empty array. I am using Atlas on the free tier. I have set up a Search Index as...
Read more >
[Solved]-Mongoose query returns empty array-mongodb
Related Query · Mongoose find query on nested objects returns empty array · Mongoose query returns empty array · Mongoose query always returns...
Read more >
$wpdb->get_results(...) with $wpdb->prepare(...) returns empty ...
$query = "SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key=%s AND ... $prepared_query = $wpdb->prepare($query, array($key,$value)); ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found