prisma1 icon indicating copy to clipboard operation
prisma1 copied to clipboard

Getting started does not work

Open steida opened this issue 8 years ago • 17 comments

https://www.prismagraphql.com/docs/tutorials/prisma-basics/getting-started-ouzia3ahqu

Second attempt to deploy.

ERROR: GraphQL Error (Code: 502)

{
  "error": "An error occured with your deployment\n",
  "status": 502
}

Playground

{ "code": 3016, "requestId": "api:api:cjcs92a245vu20113504b02lh", "error": "Project not found: 'prisma@dev'" }

steida avatar Jan 23 '18 23:01 steida

Yet another attempt, yet another error.

ERROR: Authentication token is invalid: Token can't be decoded: Invalid signature for this token or wrong algorithm.

{
  "data": {
    "addProject": null
  },
  "errors": [
    {
      "locations": [
        {
          "line": 2,
          "column": 9
        }
      ],
      "path": [
        "addProject"
      ],
      "code": 3015,
      "message": "Authentication token is invalid: Token can't be decoded: Invalid signature for this token or wrong algorithm.",
      "requestId": "cluster:cluster:cjcs9br4k00020161gdslx5yl"
    }
  ],
  "status": 200
}

steida avatar Jan 23 '18 23:01 steida

This should work now. Please reach out to [email protected] if you are still encountering similar issues.

marktani avatar Jan 24 '18 14:01 marktani

Deploy works, prisma plaground still "error": "Project not found: 'prisma@dev'"

steida avatar Jan 24 '18 18:01 steida

Hey @steida thanks for reporting! What is the endpoint url that is being opened in the Playground? Thanks!

timsuchanek avatar Jan 24 '18 18:01 timsuchanek

https://eu1.prisma.sh/prisma/dev

Maybe you somehow mishandle prisma keyword, no?

steida avatar Jan 25 '18 00:01 steida

i have a similar issue.

the most interesting part is that it worked briefly for a cool 10 minutes before dying again.

const server = new GraphQLServer({
    ...
    context: req => ({
        ...req,
        headers: {
           Authorization: "Bearer __TOKEN__"
        },
        db: new Prisma({
            endpoint: 'http://localhost:4466/dockerhost/dev', // the endpoint of the Prisma DB service
            secret: 'mysecret123', // specified in database/prisma.yml
            debug: true, // log all GraphQL queries & mutations
        }),
    }),
})

this is how you set request headers right?

miyi avatar Jan 27 '18 02:01 miyi

Just found the problem. A new beta is available, a new stable version will be released soon.

timsuchanek avatar Jan 27 '18 17:01 timsuchanek

Thanks for your help with this, @steida and @miyi 🙏

marktani avatar Jan 27 '18 18:01 marktani

Update Prisma to the latest 1.0.10, then "prisma playground" works, @steida .

limux avatar Jan 28 '18 00:01 limux

Still does not work. After prisma init, I got the same error...

image

image

Can't do anything with it

TheDeveloperTom avatar Feb 01 '18 21:02 TheDeveloperTom

@TheDeveloperTom what's your prisma version? What cluster are you deploying to? What are your steps to reproduce the problem? 🙂

marktani avatar Feb 01 '18 21:02 marktani

image

  1. local/remote - the same result

  2. streps to reproduce: prisma init -> open offered link -> get the error.

TheDeveloperTom avatar Feb 01 '18 21:02 TheDeveloperTom

  1. what do you mean with open offered link? When I run prisma init, I get to choose between "minimal setup" and "GraphQL server/fullstack".

marktani avatar Feb 01 '18 21:02 marktani

@TheDeveloperTom thanks for adding the screenshots! Your error message is actually different than any other shared in this thread before 🙂

Do you have a secret set in prisma.yml?

marktani avatar Feb 01 '18 21:02 marktani

Works when using "yarn dev", while "prisma playground" gets image

A little confuse with using prisma playground or yarn dev.

leedan77 avatar Feb 02 '18 06:02 leedan77

Thanks @leedan77, can you create a new issue with full information for reproduction? I'm losing track of the different situations in this issue :slightly_smiling_face:

marktani avatar Feb 02 '18 08:02 marktani

I'm getting this error on a prisma cloud hosted/managed production server... 2 members of my prisma cloud team get the error and the third is able to deploy...

ERROR: Authentication token is invalid: Token can't be decoded: Invalid signature for this token or wrong algorithm.

{
  "data": {
    "addProject": null
  },
  "errors": [
    {
      "locations": [
        {
          "line": 2,
          "column": 9
        }
      ],
      "path": [
        "addProject"
      ],
      "code": 3015,
      "message": "Authentication token is invalid: Token can't be decoded: Invalid signature for this token or wrong algorithm.",
      "requestId": "__SERVER_NAME__:cjrmebr4uxuvq0854n43bmcvt"
    }
  ],
  "status": 200
}

tsdexter avatar Feb 02 '19 03:02 tsdexter