1

when i configure ios key on PushAdapter the UI of the dashboard gets server error after login. the request of http://myserver.com/dashboard/parse-dashboard-config.json returns with 500 Internal Server Error and the error on the server is TypeError: Converting circular structure to JSON. this is happening when i add the configuration of ios

const { default: PushAdapter } = require('@parse/push-adapter');
const parseConfig = {
    apps: [
        Object.assign({
            databaseURI,
            cloud: './cloud/main.js',
            serverURL,
            appId,
            masterKey,
            restApiKey,
            javascriptKey,
            appName,
            supportedPushLocales: ['en'],
            production: isProdEnv,
            masterKeyIps: ['0.0.0.0/0'],
            push: {
                adapter: new PushAdapter({
                  ios: [
                  {
                    token: {
                        key: './secrets/ios/my-cert.p8',
                        keyId: '34SW5XLWJ3',
                        teamId: 'ASMXHG4HKJ',
                    },
                    topic: 'com.example.myapp',
                    production: false,
                  },
                 ]
                }),
            }
        })
    ],
    users: [
        {
            user,
            pass
        },
    ],
}

My dependences:

{
  "dependencies": {
    "@parse/push-adapter": "^4.1.2",
    "dotenv": "^8.2.0",
    "express": "^4.17.1",
    "node-fetch": "^2.6.1",
    "parse": "^4.1.0",
    "parse-dashboard": "^5.1.0",
    "parse-server": "^6.1.0",
    "request": "^2.88.2",
    "uuid": "^9.0.0"
  },
  "devDependencies": {
    "@types/express": "^4.17.11",
    "@types/jest": "^26.0.22",
    "@types/node": "^14.14.34",
    "cross-env": "^7.0.3",
    "faker": "^5.5.3",
    "husky": "^7.0.0",
    "jest": "^26.6.3",
    "json-server": "^0.16.3",
    "nodemon": "^2.0.7",
    "ts-jest": "^26.5.5",
    "typescript": "^4.2.4"
  }
}

Note: when i comment out the ios push configuration, the dashboard is ok.

how to solve this issue?

Nadav Avisror
  • 153
  • 1
  • 8

0 Answers0