Skip to content

reviewme unable to find ~/publisher.json even though it exists #70

@aaronkelton

Description

@aaronkelton

I think I've set up everything correctly, but the reviewme command is unable to find the publisher.json file, even though it exists. Have you seen this before? I tried searching this repo but didn't see a similar issue or wiki entry.

You can see that I'm located in my home directory (~), and I have the myappsconfig.json and publisher.json in the same directory. Do you have some idea what I might be doing wrong?

{
  "slackHook":"https://hooks.slack.com/services/foo/bar",
  "verbose":true,
  "dryRun":true,
  "interval":300,
  "apps": [
    {
      "appId":"com.my.app",
      "publisherKey":"~/publisher.json"
    }
  ]
}
mycomputer ~ % reviewme ~/myappsconfig.json
INFO: Fetching Google Play reviews for com.my.app
Error: ENOENT: no such file or directory, open '~/publisher.json'
    at Object.openSync (fs.js:498:3)
    at Object.readFileSync (fs.js:394:35)
    at Object.exports.fetchGooglePlayReviews (/opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:86:54)
    at /opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:20:21
    at processTicksAndRejections (internal/process/task_queues.js:95:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '~/publisher.json'
}
TypeError: Cannot read property 'client_id' of undefined
    at Object.exports.fetchGooglePlayReviews (/opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:94:49)
    at /opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:20:21
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:76936) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'authorize' of undefined
    at Object.exports.fetchGooglePlayReviews (/opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:99:9)
    at /opt/homebrew/lib/node_modules/@trademe/reviewme/googleplayreviews.js:20:21
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:76936) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:76936) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

mycomputer ~ % ls publisher.json 
publisher.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions