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.

Connection to ElephantSQL failing

See original GitHub issue

The application is connecting fine locally, but whenever I try to use a remote Postgres as a service (ElephantSQL), I get the following error:

error: Uncaught (in promise) Error: Unknown response for startup: E
          throw new Error(`Unknown response for startup: ${msg.type}`);
                ^
    at Connection.startup (connection.ts:173:17)
    at async Client.connect (client.ts:14:5)
    at async PostgresConnector._makeConnection (postgres-connector.ts:39:5)
    at async PostgresConnector.query (postgres-connector.ts:57:5)
    at async Database.query (database.ts:164:21)
    at async Function.createTable (model.ts:161:5)
    at async Database.sync (database.ts:134:7)
    at async app.ts:17:1

I am not sure what exactly is causing it to fail on remote connections.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
edimoldovancommented, Jan 1, 2021

I am getting the same error with the Postres app on mac OS. Here are the steps I followed:

  • Initialize database const db = new Database({ dialect: ‘postgres’, debug: true }, {…}); in a separate file, then doing export default db
  • in my model definiton file import db from “…/models/database.ts”; then define the model, then link the model, then sync the model, then try an insert.

It seems to fail at sync.

0reactions
sayduscommented, Jan 2, 2021

Thanks @rluvaton. I also hope they fix it soon - it’s been open since May 😔

Read more comments on GitHub >

github_iconTop Results From Across the Web

PostgreSQL as a Service - ElephantSQL
pgAdmin - Failed to connect to the database with pgAdmin, what is wrong? ... A "connection" refers to a TCP connection between your...
Read more >
Connection to ElephantSQL failed (Android studio) - Reddit
I need to connect my android program to an SQL database but the connection fails everytime even if I have the right credentials....
Read more >
Cannot connect to https://api.elephantsql.com from pg admin
has anyone success to create connection to elephantsql.org using pgadmin? i want to try to store my database on a server and im...
Read more >
error error: too many connections for role elephantsql - You.com
I think the problem is the max number of connection that ... I am using typeorm datasource to connect to elephantsql postgres, been...
Read more >
15: 21.15. Authentication Problems - PostgreSQL
Authentication failures and related problems generally manifest themselves ... As the message suggests, the server refused the connection request because it ...
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