You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing credentials in Postgres URL: Got invalid RPC response without .result property #381
Heads up, confirmed still an issue with [email protected] and [email protected], attached output. Introspect works fine... credentials correct as well.
➜ graphql git:(master) ✗ prisma2 lift save
Error: Got invalid RPC response without .result property: {}
➜ graphql git:(master) ✗ DEBUG=* prisma2 lift save --name "init"
LiftEngine:rpc SENDING RPC CALL {
id: 1,
jsonrpc: '2.0',
method: 'listMigrations',
params: {
projectInfo: '',
sourceConfig: 'datasource db {\n' +
' provider = "postgresql"\n' +
' url = "postgresql://exampleuser:[email protected]:5432/databasename?schema=public&sslmode=prefer"\n' +
'}\n' +
'\n' +
'generator photon {\n' +
' provider = "photonjs"\n' +
'}\n' +
'\n' +
'generator nexus_prisma {\n' +
' provider = "nexus-prisma"\n' +
'}\n' +
'\n' +
'model User {\n' +
' id String @default(cuid()) @id @unique\n' +
' email String @unique\n' +
' name String?\n' +
' posts Post[]\n' +
'}\n' +
'\n' +
'model Post {\n' +
' id String @default(cuid()) @id @unique\n' +
' createdAt DateTime @default(now())\n' +
' updatedAt DateTime @updatedAt\n' +
' published Boolean\n' +
' title String\n' +
' content String?\n' +
' author User?\n' +
'}'
}
} +0ms
LiftEngine:stderr [2019-08-25T23:24:41Z ERROR r2d2] Error querying the database: db error: FATAL: permission denied for database "postgres" +0ms
LiftEngine:stderr [2019-08-25T23:24:41Z ERROR r2d2] Error querying the database: db error: FATAL: permission denied for database "postgres" +14ms
LiftEngine:stderr thread 'main' panicked at 'Box<Any>', migration-engine/core/src/main.rs:55:23 +289ms
LiftEngine:stderr stack backtrace: +0ms
LiftEngine:stderr 0: std::panicking::default_hook::{{closure}} +26ms
LiftEngine:stderr 1: std::panicking::default_hook +0ms
LiftEngine:stderr 2: std::panicking::rust_panic_with_hook +0ms
LiftEngine:stderr 3: std::panicking::begin_panic +0ms
LiftEngine:stderr 4: migration_engine::main +0ms
LiftEngine:stderr 5: std::rt::lang_start::{{closure}} +0ms
LiftEngine:stderr 6: std::panicking::try::do_call +0ms
LiftEngine:stderr 7: __rust_maybe_catch_panic +0ms
LiftEngine:stderr 8: std::rt::lang_start_internal +0ms
LiftEngine:stderr 9: main +0ms
Error: Error: Got invalid RPC response without .result property: {}
at /Users/brad/n/lib/node_modules/prisma2/build/index.js:134190:36
at /Users/brad/n/lib/node_modules/prisma2/build/index.js:134077:13
at Array.map (<anonymous>)
at LiftEngine.rejectAll (/Users/brad/n/lib/node_modules/prisma2/build/index.js:134076:40)
at ChildProcess.<anonymous> (/Users/brad/n/lib/node_modules/prisma2/build/index.js:134138:30)
at ChildProcess.emit (events.js:203:13)
at ChildProcess.EventEmitter.emit (domain.js:471:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
➜ graphql git:(master) ✗ npm -g list prisma2
/Users/brad/n/lib
└── [email protected]
➜ graphql git:(master) ✗ DEBUG=* prisma2 introspect
PostgresIntrospection Listing schemas. +0ms
RelationalIntrospection Querying schemas. +0ms
⠋ Introspecting database public RelationalIntrospection Introspecting models in schema public. +206ms
RelationalIntrospection Querying tables. +0ms
PostgresIntrospection Querying column comments for public +208ms
RelationalIntrospection Querying columns for schema public. +1ms
PostgresIntrospection Querying indices for table public. +0ms
RelationalIntrospection Querying relations in schema public. +1ms
PostgresIntrospection Querying enums for schema public. +1ms
PostgresIntrospection Querying sqeuences. +0ms
⠙ Introspecting database public PostgresIntrospection Creating postgres specific introspection result. +3s
RelationalIntrospectionResult Datamodel inferrence started. +0ms
RelationalIntrospectionResult Basic types inferred. +1ms
RelationalIntrospectionResult Id fields resolved. +0ms
RelationalIntrospectionResult Default values inferred. +0ms
RelationalIntrospectionResult Relations resolved. +1ms
RelationalIntrospectionResult Relations enums resolved. +0ms
RelationalIntrospectionResult Extra artifacts hidden. +0ms
RelationalIntrospectionResult Validation done. +1ms
RelationalIntrospectionResult Normalization done. +0ms
RelationalIntrospectionResult Inferring done. +0ms
✔ Introspecting database public: 2.6s
Created datamodel definition based on 0 database tables
Created 1 new file: Prisma DML datamodel (derived from existing database)
datamodel-1566775553.prisma
➜ graphql git:(master) ✗ ➜ graphql git:(master) ✗ npm -g list prisma2
/Users/brad/n/lib
└── [email protected]
➜ graphql git:(master) ✗ DEBUG=* prisma2 introspect
PostgresIntrospection Listing schemas. +0ms
RelationalIntrospection Querying schemas. +0ms
⠋ Introspecting database public RelationalIntrospection Introspecting models in schema public. +206ms
RelationalIntrospection Querying tables. +0ms
PostgresIntrospection Querying column comments for public +208ms
RelationalIntrospection Querying columns for schema public. +1ms
PostgresIntrospection Querying indices for table public. +0ms
RelationalIntrospection Querying relations in schema public. +1ms
PostgresIntrospection Querying enums for schema public. +1ms
PostgresIntrospection Querying sqeuences. +0ms
⠙ Introspecting database public PostgresIntrospection Creating postgres specific introspection result. +3s
RelationalIntrospectionResult Datamodel inferrence started. +0ms
RelationalIntrospectionResult Basic types inferred. +1ms
RelationalIntrospectionResult Id fields resolved. +0ms
RelationalIntrospectionResult Default values inferred. +0ms
RelationalIntrospectionResult Relations resolved. +1ms
RelationalIntrospectionResult Relations enums resolved. +0ms
RelationalIntrospectionResult Extra artifacts hidden. +0ms
RelationalIntrospectionResult Validation done. +1ms
RelationalIntrospectionResult Normalization done. +0ms
RelationalIntrospectionResult Inferring done. +0ms
✔ Introspecting database public: 2.6s
Created datamodel definition based on 0 database tables
Created 1 new file: Prisma DML datamodel (derived from existing database)
datamodel-1566775553.prisma
further information : wasn't able to replicate this issue with a local docker image of postgres 11.. might have something to do with the connection string or heroku..
reconfirmed - this definitely does look to be something specific at least to heroku database instances, not version of postgresql or connection string from what I can see, local docker postgres works fine as does digital ocean hosted postgres...
I got this working, you need to make sure you have the correct environment variables set up in Heroku first, before deploy 🤦🏼♂️So this repo will work provided you set up the POSTGRES_URL before deploy. Sorry, should have picked up on that one earlier!
Activity
pantharshit00 commentedon Aug 20, 2019
I am really unable to reproduce this.
Can you try running the migration again with
export RUST_BACKTRACE=1so that we can get a full backtrace?alizahid commentedon Aug 20, 2019
RUST_BACKTRACE=1 prisma2 lift save --name 'init'doesn't show any stack trace. Am I doing this wrong?pantharshit00 commentedon Aug 20, 2019
Well in that case, can you please make sure that
botherdatabase exists in your database.alizahid commentedon Aug 20, 2019
It exists. Prisma wouldn’t init without it.
nachiket-p commentedon Aug 21, 2019
Its working with local Postgres, but it doesn't work & same error appears with Heroku managed Postgres DB instances.
pantharshit00 commentedon Aug 21, 2019
Thanks, I was able to reproduce this now 🎉
Reproduction steps:
prisma2 initflow and the credentials obtained from above(remember that SSL is required)Version: [email protected], binary version: 33e5fc84b6bd61602f8d634beb558230ca3e3054
Rust backtrace:
kleydon commentedon Aug 22, 2019
I'm seeing the same error locally, with mysql.
pantharshit00 commentedon Aug 22, 2019
@kleydon
Can you please share the output of the command using
export DEBUG=*set?ryanking1809 commentedon Aug 22, 2019
I'm also getting this error trying to deploy to Heroku but am using RDS for a postgres db. Possibly due to photon generating into a temp folder?
repo: https://github.com/ryanking1809/prisma2-zeit-now
pantharshit00 commentedon Aug 22, 2019
@ryanking1809 It is more related to the database connection.
Can you share the output of the lift command with
export DEBUG=*enabled?ryanking1809 commentedon Aug 22, 2019
@pantharshit00 sorry a bit of a newbie here. Where / how do I enable
export DEBUG=*?16 remaining items
BradDC commentedon Aug 25, 2019
Heads up, confirmed still an issue with [email protected] and [email protected], attached output. Introspect works fine... credentials correct as well.
BradDC commentedon Aug 25, 2019
further information : wasn't able to replicate this issue with a local docker image of postgres 11.. might have something to do with the connection string or heroku..
ryanking1809 commentedon Aug 26, 2019
I might also add I've avoided the issue with a dockerfile (in Heroku) containing the following:
BradDC commentedon Aug 27, 2019
reconfirmed - this definitely does look to be something specific at least to heroku database instances, not version of postgresql or connection string from what I can see, local docker postgres works fine as does digital ocean hosted postgres...
ryanking1809 commentedon Aug 28, 2019
I got this working, you need to make sure you have the correct environment variables set up in Heroku first, before deploy 🤦🏼♂️So this repo will work provided you set up the
POSTGRES_URLbefore deploy. Sorry, should have picked up on that one earlier!https://github.com/ryanking1809/prisma2-zeit-now
divyenduz commentedon Sep 4, 2019
This is not reproducible anymore with
I tried these situations (wrong user, missing port, local or remote pg, missing env, wrong env).
I am closing this one, if you still run into this issue, please create a new GH issue possibly with a minimal reproduction and tag me there 🙌
docs: address PR #381 review feedback on runtime SPI subpath and veri…
docs(adrs): index ADR 204 and add partial-supersession callout to ADR…
docs(framework-components): list ./runtime subpath in README