Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

It is impossible to produce "prisma deploy" on your server #2289

Closed
overpod opened this issue Apr 26, 2018 · 9 comments
Closed

It is impossible to produce "prisma deploy" on your server #2289

overpod opened this issue Apr 26, 2018 · 9 comments
Labels
bug/0-needs-info More information is needed for reproduction.

Comments

@overpod
Copy link

overpod commented Apr 26, 2018

Already signed in
Error: Not authorized. Please provide a proper 'Authorization' header: {"response":{"data":{"generateClusterToken":null},"errors":[{"message":"Not authorized. Please provide a proper 'Authorization' header","locations":[{"line":3,"column":9}],"path":["generateClusterToken"],"code":403}],"status":200},"request":{"query":"\n      mutation ($input: GenerateClusterTokenRequest!) {\n        generateClusterToken(input: $input) {\n          clusterToken\n        }\n      }\n    ","variables":{"input":{"workspaceSlug":"*","clusterName":"default","serviceName":"abuga","stageName":"dev"}}}}
    at GraphQLClient.<anonymous> (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\src\index.ts:71:13)
    at step (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:40:23)
    at Object.next (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:21:53)
    at fulfilled (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:12:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
Exiting with code: 1

On the server everything works out.

@marktani
Copy link
Contributor

Thanks for bringing this up, @overpod.
Can you provide the following information?

  • Output of prisma version
  • Output of prisma account
  • Output of cat prisma.yml. If it references env variables, please share the ones you feel comfortable sharing.
  • What exact commands are you running to end up with this error message?

@marktani marktani added the bug/0-needs-info More information is needed for reproduction. label Apr 26, 2018
@overpod
Copy link
Author

overpod commented Apr 27, 2018

prisma version

$ prisma version
  config CWD C:\Users\trofimov\Documents\projects\abugaru\c +0ms
  config HOME C:\Users\trofimov +2ms
  config definitionDir C:\Users\trofimov\Documents\projects\abugaru\c +0ms
  config definitionPath C:\Users\trofimov\Documents\projects\abugaru\c\prisma.yml +0ms
  cli { isGlobal: true } +0ms
  StatusChecker setting status checker +0ms
  cli command id version +5ms
  Environment saving global rc +0ms
  Environment { cloudSessionKey: '___',
  Environment   clusters: {} } +0ms
  Environment [ 'prisma-eu1', 'prisma-us1' ] +9ms
  Environment { 'prisma-eu1': 'https://eu1.prisma.sh',
  Environment   'prisma-us1': 'https://us1.prisma.sh' } +12ms
  StatusChecker setting status checker +646ms
prisma/1.7.1 (windows-x64) node-v8.9.4

prisma account

$ prisma account
  config CWD C:\Users\trofimov\Documents\projects\abugaru\c +0ms
  config HOME C:\Users\trofimov +1ms
  config definitionDir C:\Users\trofimov\Documents\projects\abugaru\c +1ms
  config definitionPath C:\Users\trofimov\Documents\projects\abugaru\c\prisma.yml +1ms
  cli { isGlobal: true } +0ms
  StatusChecker setting status checker +0ms
  cli command id account +5ms
  cli:plugincache Got plugin from cache +0ms
  cli:plugincache C:\Users\trofimov\.cache\prisma\plugins.json +0ms
  cli:plugincache Got plugin from cache +1ms
  cli:plugincache C:\Users\trofimov\.cache\prisma\plugins.json +0ms
  plugins findCommand prisma-cli-core +0ms
  plugin requiring command +0ms
  cli-engine:plugins:manager requiring C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\prisma-cli-core +0ms
  portfinder:defaultHosts exports._defaultHosts is: [ '0.0.0.0', 'fe80::7930:b57d:12f2:bef', '172.31.74.33', 'fe80::f0a9:1ce4:dbb1:6544', '172.25.112.1', 'fe80::5c36:5731:da66:5a12', '192.168.56.1', 'fe80::a4d0:4c24:57ae:8fd9', '192.168.0.30', '::1', '127.0.0.1' ] +0ms
  cli-engine:plugins:manager required +362ms
  plugin required command +366ms
  Environment saving global rc +0ms
  Environment { cloudSessionKey: '___',
  Environment   clusters: {} } +1ms
  Environment [ 'prisma-eu1', 'prisma-us1' ] +138ms
  Environment { 'prisma-eu1': 'https://eu1.prisma.sh',
  Environment   'prisma-us1': 'https://us1.prisma.sh' } +0ms
  StatusChecker setting status checker +972ms
  client Sending query to cloud api +0ms
  client https://api.cloud.prisma.sh +1ms
  client {
  client       me {
  client         id
  client         name
  client         login {
  client           email
  client         }
  client       }
  client     } +0ms
  client undefined +1ms
  client { headers:
  client    { Authorization: 'Bearer ___' },
  client   agent: undefined } +0ms
  client Sending query to cloud api +347ms
  client https://api.cloud.prisma.sh +1ms
  client {
  client       me {
  client         id
  client         name
  client         login {
  client           email
  client         }
  client       }
  client     } +0ms
  client undefined +1ms
  client { headers:
  client    { Authorization: 'Bearer ___' },
  client   agent: undefined } +0ms
Email: overpod@yandex.ru
Name:  overpod

cat prisma.yml

$ cat ./prisma.yml
datamodel: datamodel.graphql
endpoint: https://prisma.abuga.ru/abuga/dev

exact commands

$ prisma deploy
  config CWD C:\Users\trofimov\Documents\projects\abugaru\c +0ms
  config HOME C:\Users\trofimov +2ms
  config definitionDir C:\Users\trofimov\Documents\projects\abugaru\c +1ms
  config definitionPath C:\Users\trofimov\Documents\projects\abugaru\c\prisma.yml +0ms
  cli { isGlobal: true } +0ms
  StatusChecker setting status checker +0ms
  cli command id deploy +5ms
  cli:plugincache Got plugin from cache +0ms
  cli:plugincache C:\Users\trofimov\.cache\prisma\plugins.json +0ms
  cli:plugincache Got plugin from cache +1ms
  cli:plugincache C:\Users\trofimov\.cache\prisma\plugins.json +0ms
  plugins findCommand prisma-cli-core +0ms
  plugin requiring command +0ms
  cli-engine:plugins:manager requiring C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\prisma-cli-core +0ms
  portfinder:defaultHosts exports._defaultHosts is: [ '0.0.0.0', 'fe80::7930:b57d:12f2:bef', '172.31.74.33', 'fe80::f0a9:1ce4:dbb1:6544', '172.25.112.1', 'fe80::5c36:5731:da66:5a12', '192.168.56.1', 'fe80::a4d0:4c24:57ae:8fd9', '192.168.0.30', '::1', '127.0.0.1' ] +0ms
  cli-engine:plugins:manager required +369ms
  plugin required command +373ms
  Environment saving global rc +0ms
  Environment { cloudSessionKey: '___',
  Environment   clusters: {} } +1ms
  Environment [ 'prisma-eu1', 'prisma-us1' ] +110ms
  Environment { 'prisma-eu1': 'https://eu1.prisma.sh',
  Environment   'prisma-us1': 'https://us1.prisma.sh' } +2ms
  StatusChecker setting status checker +993ms

Authenticating...  client Sending query to cloud api +0ms
  client https://api.cloud.prisma.sh +0ms
  client {
  client       me {
  client         id
  client         name
  client         login {
  client           email
  client         }
  client       }
  client     } +0ms
  client undefined +2ms
  client { headers:
  client    { Authorization: 'Bearer ___' },
  client   agent: undefined } +1ms
 √
Already signed in
Error: Not authorized. Please provide a proper 'Authorization' header: {"response":{"data":{"generateClusterToken":null},"errors":[{"message":"Not authorized. Please provide a proper 'Authorization' header","locations":[{"line":3,"column":9}],"path":["generateClusterToken"],"code":403}],"status":200},"request":{"query":"\n      mutation ($input: GenerateClusterTokenRequest!) {\n        generateClusterToken(input: $input) {\n          clusterToken\n        }\n      }\n    ","variables":{"input":{"workspaceSlug":"*","clusterName":"default","serviceName":"abuga","stageName":"dev"}}}}
    at GraphQLClient.<anonymous> (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\src\index.ts:71:13)
    at step (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:40:23)
    at Object.next (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:21:53)
    at fulfilled (C:\Users\trofimov\AppData\Roaming\npm\node_modules\prisma\node_modules\graphql-request\dist\src\index.js:12:58)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)
Exiting with code: 1

@kieusonlam
Copy link

kieusonlam commented Apr 27, 2018

I got the same error. This is what work for me, I change the endpoint from
https://prisma.abuga.ru/abuga/dev
to
http://localhost:4466/abuga/dev
and deploy it from the server.

@overpod
Copy link
Author

overpod commented Apr 28, 2018

from the server it works.
does not work with the development machine.

@overpod
Copy link
Author

overpod commented Apr 28, 2018

I want to make a remote deployment

@kieusonlam
Copy link

prisma@1.7.3 seem to work now :)

@overpod
Copy link
Author

overpod commented Apr 28, 2018

prisma@1.7.3 seem to work now :)

but did you try?

@kieusonlam
Copy link

@overpod yes I did

@overpod
Copy link
Author

overpod commented Apr 29, 2018

All problems are solved in version 1.7.3. Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/0-needs-info More information is needed for reproduction.
Projects
None yet
Development

No branches or pull requests

4 participants