Coder Social home page Coder Social logo

reviewme's People

Contributors

cooksimo avatar dependabot[bot] avatar futabooo avatar janpapenbrock avatar josh-burton avatar peterdavehello avatar regevbr avatar rnpy avatar slepic avatar sparshrestha avatar tsengwenjian avatar vipuldelwadiatrademe avatar vortec4800 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reviewme's Issues

error code ENOENT no such file or directory, chmod

Hi, when I run npm install -g @trademe/reviewme I got stuck with this error.

npm ERR! path /usr/local/lib/node_modules/@trademe/reviewme/bin/reviewme.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/@trademe/reviewme/bin/reviewme.js'
npm ERR! enoent This is related to npm not being able to find a file.

I've been trying since hours to fix it.
Can I have some help please ? Does it come from my configuration ? (I'm on macOS, node version: v11.9.0)

Thanks!

AWS lambda

Could this also be used as an AWS lambda? How das this module persist which reviews have already been posted?

Parsing errors

Hello, thanks for the library.
Here are some errors I get for both playstore and appstore reviews.

appstore reviews:

Error parsing app store reviews
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/lib/node_modules/@trademe/reviewme/appstorereviews.js:82:24)
    at Request.self.callback (/usr/lib/node_modules/@trademe/reviewme/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/usr/lib/node_modules/@trademe/reviewme/node_modules/request/request.js:1154:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/@trademe/reviewme/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:313:30)
INFO: Received no reviews from App Store for (1502363217) (gw)
Error parsing app store reviews
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/lib/node_modules/@trademe/reviewme/appstorereviews.js:82:24)
    at Request.self.callback (/usr/lib/node_modules/@trademe/reviewme/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/usr/lib/node_modules/@trademe/reviewme/node_modules/request/request.js:1154:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/@trademe/reviewme/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:313:30)

google playstore reviews:

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of undefined
    at Object.descriptionText [as fun] (/usr/lib/node_modules/@trademe/reviewme/node_modules/google-play-scraper/lib/app.js:145:51)
    at R.map (/usr/lib/node_modules/@trademe/reviewme/node_modules/google-play-scraper/lib/utils/scriptData.js:22:19)
    at XWrap.f (/usr/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:5955:28)
    at XWrap.@@transducer/step (/usr/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:392:25)
    at _arrayReduce (/usr/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:5137:46)
    at _reduce (/usr/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:5167:24)
    at map (/usr/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:5954:20)
    at /usr/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:586:23
    at Object.f2 [as map] (/usr/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:473:22)
    at extractFields (/usr/lib/node_modules/@trademe/reviewme/node_modules/google-play-scraper/lib/utils/scriptData.js:16:14)
(node:3476) 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(). (rejection id: 1)
(node:3476) [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.

using the latest version, at 3.0.0

SyntaxError: Unexpected identifier

/usr/lib/node_modules/@trademe/reviewme/node_modules/googleapis/build/src/googleapis.js:83
    async discoverAsync(url) {
          ^^^^^^^^^^^^^

SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/@trademe/reviewme/node_modules/googleapis/build/src/index.js:17:22)

Google play scraping is breaking Android reviews

The current version of the Google Play Scraper dependency is encountering some issues when scraping information from the play store, specifically this issue: facundoolano/google-play-scraper#192

A quick fix could be updating the dependency to v6.0.0, however as the scaper is only used for app name and icon perhaps this dependency could be removed in favour of serving a local image and app name from some form of configuration

new slack api not supported

The app uses the legacy webhook apis.
The new webhooks api is connected to an app and as such you cant change the bot icon or the bot username

Not a service account

After a few months of usage script start to failed with error "Invalid issuer: Not a service account" for Google Play app. I tried generate new service account, set all persmission as before but same problem. Does anybody know, where is a problem?

Docker build

It would be great if you can provide a simple docker image!

Bot Keys not working

I've got some information about some of these keys not working. I'm setting both of these as follows in my config file:

  "botUsername": "Review Bot",
  "botEmoji": ":star:",

However when the message to Slack posts, it looks like this:

screen shot 2018-08-06 at 9 13 19 am

What else can I provide to help debug?

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

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

Running ReviewMe in another Node app

I've got a Node server already set up and running other functions on my server. Is there a way to require and run this from within this existing node server instead of running it as a standalone program?

Something like

 const reviewMe = require('reviewMe');
 reviewMe.start({config: values});

Issue with Google Play Scraper version causing error

(node:60511) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of undefined
    at Object.descriptionText [as fun] (/Users/david.voiss/workspace/ReviewMe/node_modules/google-play-scraper/lib/app.js:174:51)
    at R.map (/Users/david.voiss/workspace/ReviewMe/node_modules/google-play-scraper/lib/app.js:168:17)

I'm receiving the error above.

This is resolved by updating the dependency version to 6.1.0 from 6.0.0.

This may be related to this old issue too: #3.

Error starting reviewme

Hi, I'm getting this error when I try to start reviewme like this.
reviewme ./thesimpleclub-config.json

module.js:472
    throw err;
    ^

Error: Cannot find module './thesimpleclub-config.json'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/@trademe/reviewme/bin/reviewme.js:18:14)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

cat thesimpleclub-config.json

{
  "slackHook": "https://hooks.slack.com/services/hook/hook/hook",
  "verbose": true,
  "dryRun": false,
  "botUsername": "ReviewMe",
  "interval":300,
  "apps": [
    {
      "appId": "some.package.id",
      "publisherKey": "review-me-publisher.json"
    },
    {
      "appId": "49917",
      "regions": [
              "de" 
      ]
    }
  ]
}

Errors for every check of iOS reviews

Hi,
I see the following for every time the timer fires (I have the default 300s set) for a single iOS app id. Is this expected, or a bug?

Error parsing app store reviews
SyntaxError: Unexpected token  in JSON at position 0
    at JSON.parse (<anonymous>)
    at Request._callback (/usr/lib/node_modules/@trademe/reviewme/appstorereviews.js:82:24)
    at Request.self.callback (/usr/lib/node_modules/@trademe/reviewme/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/usr/lib/node_modules/@trademe/reviewme/node_modules/request/request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/@trademe/reviewme/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
Body content: 's.-.��M-
J-�L-/V
V(HLOUHI-(�P�,V����,IMQ(�W04���/'

Perform abnormal

error detail:

internal/modules/cjs/loader.js:979
throw err;
^

Error: Cannot find module 'config.json'
Require stack:

  • /usr/local/lib/node_modules/@trademe/reviewme/bin/reviewme.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1036:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object. (/usr/local/lib/node_modules/@trademe/reviewme/bin/reviewme.js:23:14)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/usr/local/lib/node_modules/@trademe/reviewme/bin/reviewme.js' ]
    }

Reviewme recently stopped working with error

admin@srv1:~$ nodejs --version
v12.22.9
admin@srv1:~$ npm -v
8.3.1
/usr/local/lib/node_modules/@trademe/reviewme/node_modules/google-play-scraper/lib/mappers/details.js:125
  const html = cheerio.load('<div>' + description.replace(/<br>/g, '\r\n') + '</div>');
                                                  ^

TypeError: Cannot read properties of undefined (reading 'replace')
    at Object.descriptionText [as fun] (/usr/local/lib/node_modules/@trademe/reviewme/node_modules/google-play-scraper/lib/mappers/details.js:125:51)
    at /usr/local/lib/node_modules/@trademe/reviewme/node_modules/google-play-scraper/lib/utils/scriptData.js:52:19
    at XWrap.f (/usr/local/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:5955:28)
    at XWrap.@@transducer/step (/usr/local/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:392:25)
    at _arrayReduce (/usr/local/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:5137:46)
    at _reduce (/usr/local/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:5167:24)
    at map (/usr/local/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:5954:20)
    at /usr/local/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:586:23
    at Object.f2 [as map] (/usr/local/lib/node_modules/@trademe/reviewme/node_modules/ramda/dist/ramda.js:473:22)
    at extractFields (/usr/local/lib/node_modules/@trademe/reviewme/node_modules/google-play-scraper/lib/utils/scriptData.js:40:14)

dryRun not working

I've tested that my Slack webhook works, and it seems I have access to both iOS and Android app reviews, as the verbose log shows:

INFO: Fetching Google Play reviews for bundleId
INFO: [bundleId] Received reviews from Google Play
INFO: [iOSID] Fetching App Store reviews
INFO: Received no reviews from App Store for (iOSID) (us)

But using "dryRun": true does not post any reviews to slack, nor logs anything about it in the terminal. Any ideas to truly verify this work? Or should I attempt making a fake review to test it?

reviewme Perform error

events.js:183
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at _errnoException (util.js:1022:11)
at TLSWrap.onread (net.js:628:25)

Clarify that dryRun doesn't work properly with Android

I have been testing the Slack integration of my Android apps but I could never get your tool to send me an Android review using dryRun.

After many hours I found out, that the reviews list endpoint which your tool is using (https://developers.google.com/android-publisher/api-ref/rest/v3/reviews/list) only returns the reviews of the last week, so your dryRun method doesn't work: https://stackoverflow.com/a/73843644/4274651 .

I was trying to find the problem in my API config, but everything was fine, I could even get individual reviews from the Api get endpoint, only the list method returned an empty json object.

Please add this information to your README such that other people don't waste time debugging their Api config for Android.

Old user message after user update his review (Google Play)

Hi, first of all thanks for fantastic app. But we noticed, that if user update his review on Google Play, user message is from first review. It is interesting, that star rating, app version etc. are correct. Is there any possibility to fix it?

Post different app review to different channels?

Is it possible to have the bot monitoring several apps, and post them to project-specific channels, without having to spin up multiple instances of the bot? Perhaps we could just specify a custom hook per app, otherwise it uses the default hook?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.