Prisma deploy : ERROR: GraphQL Error (Code: 400)


#1

Hi

I received ERROR: GraphQL Error (Code: 400) when i use the command prisma deploy. The commands prisma generate and prisma reset work.

The prisma server is running correctly at http://myserver:4466.

Here is the output of prisma deploy:

environment { needsAuth: false } +0ms
client is local cluster: false +0ms
client Sending query to cloud api +0ms
client https://api2.cloud.prisma.sh +0ms
client {
client me {
client id
client name
client login {
client email
client }
client }
client } +1ms
client undefined +0ms
client { headers:
client { Authorization:
client ‘Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJjanJzdm41ODZ1Z3doMDg2MXNnbjBoNTVzIiwiaWF0IjoxNTUyMzk4NzE2LCJleHAiOjE1NTQ5OTA3MTZ9.jfkmQTKBa5enWYpRuax_JYQeIJlXFQ9G9zSadmkaPwc’ },
client agent: undefined } +0ms
client Trying manual login +3s
client Error: GraphQL Error (Code: 400): {“response”:{“error”:"\n\n \n <meta charset=“utf-8”>\n Bad Request – 400\n \n html, body {\n margin: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n body {\n font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Roboto, Helvetica, Arial, sans-serif, “Apple Color Emoji”, “Segoe UI Emoji”, “Segoe UI Symbol”;\n font-size: 15px;\n }\n\n .Error {\n font-size: 1.35em;\n \n color: #6061BE;\n \n }\n\n .Error .message {\n font-weight: 200;\n letter-spacing: 0.095em;\n }\n\n .Error .message a {\n text-decoration: none;\n color: inherit;\n \n border-bottom: 1px dotted #6061BE;\n \n }\n\n .Error .status {\n font-weight: 700;\n }\n\n .Error .code {\n display: none;\n }\n\n .Error .dot {\n font-weight: 100;\n }\n\n @media screen and (max-width: 800px) {\n body {\n font-size: 10px;\n }\n\n .Error {\n display: flex;\n flex-direction: column;\n }\n\n .Error .status {\n font-size: 1.1em;\n }\n\n .Error .dot {\n display: none\n }\n }\n \n \n \n <div class=“Error”>\n <span class=“status”>Bad Request\n <span class=“code”>400\n <span class=“dot”>•\n \n <span class=“message”>Please try your request again or contact support.\n \n \n \n",“status”:400},“request”:{“query”:"\n mutation ($input: GenerateClusterTokenRequest!) {\n addServiceToCloudDBIfMissing(input: $input)\n }\n “,“variables”:{“input”:{“workspaceSlug”:null,“clusterName”:“default”,“serviceName”:“default”,“stageName”:“default”}}}} +0ms
Error: GraphQL Error (Code: 400): {“response”:{“error”:”\n\n \n <meta charset=“utf-8”>\n Bad Request – 400\n \n html, body {\n margin: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n body {\n font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Roboto, Helvetica, Arial, sans-serif, “Apple Color Emoji”, “Segoe UI Emoji”, “Segoe UI Symbol”;\n font-size: 15px;\n }\n\n .Error {\n font-size: 1.35em;\n \n color: #6061BE;\n \n }\n\n .Error .message {\n font-weight: 200;\n letter-spacing: 0.095em;\n }\n\n .Error .message a {\n text-decoration: none;\n color: inherit;\n \n border-bottom: 1px dotted #6061BE;\n \n }\n\n .Error .status {\n font-weight: 700;\n }\n\n .Error .code {\n display: none;\n }\n\n .Error .dot {\n font-weight: 100;\n }\n\n @media screen and (max-width: 800px) {\n body {\n font-size: 10px;\n }\n\n .Error {\n display: flex;\n flex-direction: column;\n }\n\n .Error .status {\n font-size: 1.1em;\n }\n\n .Error .dot {\n display: none\n }\n }\n \n \n \n <div class=“Error”>\n <span class=“status”>Bad Request\n <span class=“code”>400\n <span class=“dot”>•\n \n <span class=“message”>Please try your request again or contact support.\n \n \n \n",“status”:400},“request”:{“query”:"\n mutation ($input: GenerateClusterTokenRequest!) {\n addServiceToCloudDBIfMissing(input: $input)\n }\n ",“variables”:{“input”:{“workspaceSlug”:null,“clusterName”:“default”,“serviceName”:“default”,“stageName”:“default”}}}}
at GraphQLClient. (/usr/local/lib/node_modules/prisma/node_modules/graphql-request/src/index.ts:72:13)
at step (/usr/local/lib/node_modules/prisma/node_modules/graphql-request/dist/src/index.js:40:23)
at Object.next (/usr/local/lib/node_modules/prisma/node_modules/graphql-request/dist/src/index.js:21:53)
at fulfilled (/usr/local/lib/node_modules/prisma/node_modules/graphql-request/dist/src/index.js:12:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
util timed out +0ms
output Exiting with code: 0 +0ms

Here is my prisma.yml

endpoint: http://myserver:4466
datamodel: datamodel.prisma
databaseType: document
secret: 37b0c4gdhwu01-4936-4edb-67dhe8d4b-77c6d65fhdjhs5b91
generate:

  • generator: typescript-client
    output: ./src/generated/prisma-client/
  • generator: graphql-schema
    output: ./src/generated/prisma-graphql/prisma.graphql
    hooks:
    post-deploy:
    • prisma generate

here is my docker-compose.yml

version: ‘3’
services:
prisma:
image: prismagraphql/prisma:1.30
restart: always
network_mode: host
ports:
- “4466:4466”
environment:
PRISMA_CONFIG: |
port: 4466
databases:
default:
connector: mongo
uri: mongodb://mongouser:mongopassword@mymongoserverip:27017/mymongodb
database: mymongodb

Please any help
Thank


#2

Looks like a bug to me? Can you please fill out this form(we are using this form to collect information about similar issue): prisma-io.typeform.com/to/C1JBOT.


#3

Hi,

I have the same issue. It worked fine with older versions but since I created a new instance whenever I try to deploy it I get the same error

ERROR: GraphQL Error (Code: 400)

{
“error”: “\n\n \n <meta charset=“utf-8”>\n Bad Request – 400\n \n html, body {\n margin: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n body {\n font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Roboto, Helvetica, Arial, sans-serif, “Apple Color Emoji”, “Segoe UI Emoji”, “Segoe UI Symbol”;\n font-size: 15px;\n }\n\n .Error {\n font-size: 1.35em;\n \n color: #6061BE;\n \n }\n\n .Error .message {\n font-weight: 200;\n letter-spacing: 0.095em;\n }\n\n .Error .message a {\n text-decoration: none;\n color: inherit;\n \n border-bottom: 1px dotted #6061BE;\n \n }\n\n .Error .status {\n font-weight: 700;\n }\n\n .Error .code {\n display: none;\n }\n\n .Error .dot {\n font-weight: 100;\n }\n\n @media screen and (max-width: 800px) {\n body {\n font-size: 10px;\n }\n\n .Error {\n display: flex;\n flex-direction: column;\n }\n\n .Error .status {\n font-size: 1.1em;\n }\n\n .Error .dot {\n display: none\n }\n }\n \n \n \n <div class=“Error”>\n <span class=“status”>Bad Request\n <span class=“code”>400\n <span class=“dot”>•\n \n <span class=“message”>Please try your request again or contact support.\n \n \n \n”,
“status”: 400
}


#4

Hi

I solved my issue with the command prisma logout.

Thank


#5

Oh WOW! Thank you so much this actually solved my problem as well.

Once again, thank you so much for sharing this information, you just saved my friday!