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

Malformed request #434

Closed
stemy2 opened this issue May 1, 2018 · 11 comments
Closed

Malformed request #434

stemy2 opened this issue May 1, 2018 · 11 comments

Comments

@stemy2
Copy link

stemy2 commented May 1, 2018

Before creating an issue

  1. Make sure you are running the latest version of Yalp Store. Check here.
  2. Search for similar issues here.
  3. Send developer a bug report using Yalp's built-in crash tool. Or go to Yalp's About page and tap on the developer's email. This creates a email with your device info and recent logs attached.
  4. Number 3 is important. Please do it. It helps a lot.
  5. Use the following template to write the text of your issue.

Expected behaviour

Downloading the app.

Actual behaviour

Does nothing and shows «malformed request».

Steps to reproduce

1.Go on a random app page.
2. Click on download.

Info about your device

Fairphone open on Fairphone 2

@yeriomin
Copy link
Owner

yeriomin commented May 1, 2018

Cannot reproduce.

Does it happen all the time?

Does the Play Store app work properly? Do you use proxies/vpn/adblockers?

@stemy2
Copy link
Author

stemy2 commented May 2, 2018

The issue is vanished for whatever reason.

@stemy2 stemy2 closed this as completed May 2, 2018
@tuxayo
Copy link

tuxayo commented May 24, 2018

I got this issue multiple times in a row on a Nexus 5 with Android 7.1.2 (LineageOS for microG)

I rebooted and it worked. Still got a logcat though. And I sent a debug report from the app.

Logcat

05-24 17:54:35.165   796  1471 D AudioService: Stream muted, skip playback
05-24 17:54:35.167 10240 10240 I ButtonDownload: Write permission granted
05-24 17:54:35.327 10240 10615 I NativeHttpClientAdapter: Requesting https://android.clients.google.com/fdfe/purchase
05-24 17:54:37.207 10240 10615 I NativeHttpClientAdapter: HTTP result code 200 Cache NETWORK 200
05-24 17:54:37.214 10240 10615 I NativeHttpClientAdapter: Requesting https://android.clients.google.com/fdfe/delivery?dtok=AB-xQnqKnacK05fqnf9CkJ87PkByk-szpMQ0S7cWvNCWkMi3r6bkP8WBl402VV5H6TnLkVe8UyuUpFDKRXVGKhwaeP7R5AGPjM5SJok5Fw2cw9DEtEUmFec&doc=com.telenav.streetview&ot=1&vc=87
05-24 17:54:37.502 10240 10615 I NativeHttpClientAdapter: HTTP result code 429 Cache NETWORK 429
05-24 17:54:37.506 10240 10615 E NativeHttpClientAdapter: IOException java.io.FileNotFoundException https://android.clients.google.com/fdfe/delivery?dtok=AB-xQnqKnacK05fqnf9CkJ87PkByk-szpMQ0S7cWvNCWkMi3r6bkP8WBl402VV5H6TnLkVe8UyuUpFDKRXVGKhwaeP7R5AGPjM5SJok5Fw2cw9DEtEUmFec&doc=com.telenav.streetview&ot=1&vc=87
05-24 17:54:37.507 10240 10240 D LocalPurchaseTask: com.github.yeriomin.playstoreapi.GooglePlayException caught during a google api request: Malformed request
05-24 17:54:37.514 10240 10270 I GlobalDownloadReceiver: ACTION_DOWNLOAD_CANCELLED (0) received
05-24 17:54:37.533 10240 10240 I DetailsDownloadReceiver: ACTION_DOWNLOAD_CANCELLED (0) received

@ale5000-git
Copy link

ale5000-git commented May 24, 2018

Quote from here:

The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting").

A Retry-After header might be included to this response indicating how long to wait before making a new request.

If there is a Retry-After header then it should use it.

@yeriomin
Copy link
Owner

@tuxayo @ale5000-git

I got it too. Seems to happen only to delivery requests (the one which returns the download link). Comes and goes.

My guess is that there are too many people using the built-in account now. Knowing if it happens on ordinary users' accounts would help. According to google search, it does and even with the Play Store app. But maybe google is just inconsistent with using this error code (for example in #422 bulk details request stopped returning 401 if the auth token is stale, it returns 200 in this case now).

Retry-After is not included.

I'll have to observe this for a couple of days.

@ale5000-git
Copy link

I'm not sure how it works, but as hypothesis in case YalpStore "retrive" the download link when opening the information page of an app then it could be delayed to only retrive the download link when the user effectively press the download button so that if the user just view the page without download there is on less request.

@yeriomin
Copy link
Owner

@ale5000-git

it could be delayed to only retrive the download link when the user effectively press the download button

Download link is and has always been retrieved on download button click.

@ale5000-git
Copy link

ale5000-git commented May 25, 2018

If the info page of a single app it is opened 3 times, every time it do a new request or the result is cached?

@yeriomin
Copy link
Owner

@ale5000-git Cached.

@ale5000-git
Copy link

Well, I imagine there isn't any solution other than detect the error and auto-retry after a certain amount of time.

@yeriomin
Copy link
Owner

@ale5000-git @tuxayo I did a certain thing to the built-in account. Could you check if at least the frequency of this problem became lower? Also, did you notice this happening on your own accounts?

detect the error and auto-retry after a certain amount of time

The only I caught it, it lasted for a couple of minutes (all delivery requests returned 429) and then went away. Waiting for minutes is not a good idea. Sorry.

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

4 participants