facundoolano / google-play-scraper

Node.js scraper to get data from Google Play
MIT License
2.34k stars 632 forks source link

Error using app function #681

Closed mlatif01 closed 1 week ago

mlatif01 commented 4 months ago

Description:

Error when using .app function

Example code:

return gplay.app({ appId: appId }).then(function(info) {
            return info;
        })
        .catch(function(err) {
            return null;
        });

Error message:

"Error requesting Google Play:The \"listener\" argument must be of type function. Received an instance of Object"

I was previously getting this error on version 6.0.3. I upgraded to 9.0.0 as it still allows for using require however I am now getting the error above. I would be grateful if anyone has any ideas on how to fix this.

jonathansampson commented 3 months ago

I'm not able to reproduce this issue.

I confirmed that version 16.20.1 of Node was being used, and executed the following script:

const results = gplay.app({ appId: 'com.brave.browser' })
  .then(function (info) { return info; })
  .catch(function () { return null; });

console.log(await results);

image