Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No results and default country code #160

Open
cvanem opened this issue Jun 9, 2021 · 0 comments
Open

No results and default country code #160

cvanem opened this issue Jun 9, 2021 · 0 comments

Comments

@cvanem
Copy link

cvanem commented Jun 9, 2021

  • Operating System: Windows, WSL, AWS Lambda
  • Node version: 12.x/14.x (AWS Lambda), 14.15.3 (Windows)
  • app-play-scraper version: v0.16.3

Description:

This code returns 0 results when run in an AWS lambda function:

store.app({ id: 1424248915 })

This code returns correctly with 1 result when run in an AWS lambda function:

store.app({ id: 1424248915, country: 'US' })

Running both of the above scenarios in Windows works correctly and I can't reproduce the issue locally.

I have been able to locate the code which is causing my issue and here is the fix which works correctly on AWS lambda:
cvanem@81d6b31

The Apple Lookup API docs confirm that the country code should be uppercase, but I am hesitant to submit a PR as I don't understand the underlying cause of the issue.

It should also be noted that I regularly use this same code for many other app id's and do not have any issues using the current default country code while using AWS lambda.

The Apple lookup API also returns an "invalid country code" error if you specify an invalid country code, which I have not encountered in either of the above scenarios.

Perhaps someone else may have some insight as to what is going on?

For now, a working solution is to simply pass the uppercase country code as a parameter, but I believe the default country code should be changed to uppercase when querying via the lookup api as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant