yongjhih / docker-parse-server

Provide docker images and docker stack for parse-server npm versions and latest commit
https://hub.docker.com/r/yongjhih/parse-server/
Apache License 2.0
475 stars 166 forks source link

[dashboard] Cannot use the Master Key, it has not been provided #61

Open peterwilli opened 7 years ago

peterwilli commented 7 years ago

Hi there,

I wanted to try this docker image(s) and have followed the instructions here: https://github.com/yongjhih/docker-parse-server#paperclip-deploy-with-docker

I get this error after building and opening the dashboard: 'dashboard.bundle.js:9720 Uncaught Error: Cannot use the Master Key, it has not been provided.'

It's kind of strange since I do provide the master key. Does anyone else have this? Thanks!

I'm on a Ubuntu 16.04 64bit-server (digitalocean)

ransingh commented 7 years ago

Yes I am getting the same error. Any idea how to resolve this?

We have parser server and dashboard running on ubuntu 14.04

parser server config

{
  "appId": "MYWAVE-STAGING-PARSE-APP-ID",
  "masterKey": "MYWAVE-STAGING-PARSE-MASTER-KEY",
  "clientKey": "MYWAVE-STAGING-PARSE-CLIENT-KEY",
  "databaseURI": "mongodb://localhost:27017/parse",
  "port": 1338
}

parser dashboard config

{
  "apps": [
    {
      "serverURL": "http://localhost:1338/parse",
      "appId": "MYWAVE-STAGING-PARSE-APP-ID",
      "masterKey": "MYWAVE-STAGING-PARSE-MASTER-KEY",
      "appName": "MyWaveParse-Staging-CI"
    }
  ]
}

image

yongjhih commented 7 years ago

I cannot reproduce.

For example:

docker run -d \
             -e APP_ID=${APP_ID}         \
             -e MASTER_KEY=${MASTER_KEY} \
             -e SERVER_URL=http://your-parse-server:1337/parse \
             -e APP_NAME=${APP_NAME}
             -p 4040:4040                      \
             --link parse-server               \
             --name parse-dashboard            \
             yongjhih/parse-dashboard
avalla commented 7 years ago

same issue here, osx 10.11.6 docker 1.12.1-beta26.1

$ docker run -d \
             -e APP_ID=${APP_ID}\
             -e MASTER_KEY=${MASTER_KEY} \
             -e SERVER_URL=http://localhost:1337/parse \
             -e PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1  \
             -e USER1=${USER}  \
             -e USER1_PASSWORD=${PASSWORD} \
             -p 4040:4040                      \
             --link parse-server               \
             --name parse-dashboard            \
             yongjhih/parse-dashboard

I tried the package from npm and it works correctly

yongjhih commented 7 years ago

@avalla , How about opening http://localhost:1337/parse url with browser?

avalla commented 7 years ago
{"error":"unauthorized"}
3Nigma commented 7 years ago

I'm experiencing the same issue and I'm using docker 1.12.1 on an up-to-date linux mint distribution. It works fine if I go with npm. I was using a87654321 as the master key.

kostiag commented 7 years ago

Same for me on Mac 10.11.6. {"error":"unauthorized"} for curl posts and MasterKey error attempting to access dashboard http://localhost:4040/

Edit: Adding -H "X-Parse-Master-Key: XXX" to curl post results in successful posts.

mfkenson commented 7 years ago

same for me. The commands I used:

docker run -d -p 27017:27017 --name mongo mongo

docker run -d -e APP_ID='0000' -e MASTER_KEY='0000' -p 1337:1337 --link mongo --name parse-server yongjhih/parse-server

docker run -d -e APP_ID='0000' -e MASTER_KEY='0000' -e SERVER_URL={http://localhost:1337/parse} -p 4040:4040 yongjhih/parse-dashboard

yujiangshui commented 7 years ago

same for me. I use docker compose:

mongo:
  image: mongo:3.0.8
  ports:
    - "27017:27017"
  volumes:
    - "./mongo-data:/data"
  command: "--smallfiles --logpath=/dev/null --setParameter failIndexKeyTooLong=false"

parse-server:
  image: yongjhih/parse-server
  ports:
    - "1337:1337"
  links:
    - mongo
  environment:
    - APP_ID=aaa
    - MASTER_KEY=bbb

parse-dashboard:
  image: yongjhih/parse-dashboard
  ports:
    - "4040:4040"
  links:
    - parse-server
  environment:
    - APP_ID=aaa
    - MASTER_KEY=bbb
    - SERVER_URL=http://localhost:1337/parse

docker --version Docker version 1.12.1, build 6f9534c

jaimeagudo commented 7 years ago

Same here with Docker version 1.12.5, build 7392c3b

hasahmad commented 7 years ago

I found the solution here: https://github.com/yongjhih/docker-parse-server/issues/74#issuecomment-272711575

This is working for me now.