ImranR98 / Obtainium

Get Android app updates straight from the source.
https://obtainium.imranr.dev
GNU General Public License v3.0
5.79k stars 137 forks source link

Failed to get the release date for an old AppGallery app #1630

Closed StSav012 closed 1 month ago

StSav012 commented 1 month ago

Obtainium fails to find the release date for https://appgallery.cloud.huawei.com/appdl/C104450749 and, possibly, other apps published years ago.

Steps to Reproduce:

  1. Add an app using this URL: https://appgallery.cloud.huawei.com/appdl/C104450749.
  2. Click the Add button.
  3. See error: FormatException: Trying to read yy from ru-/d-l/-ap-pd-l/-ap-pl-ic-at-io-n/-ap-k/-32-/3-2d-dd-aa-c6-30-34-75-b9-6d-cb-98-04-da-16-96-4/-16-66-97-26-48-78-4--16-55-e5-a0--e-85-5--46-33--9-34-6--42-66-7a-74-4c-5c at 0 or another beginning.

Investigation

The server redirects to https://appdlc-drru.hispace.dbankcloud.ru/dl/appdl/application/apk/32/32dddaac6303475b96dcb9804da16964/1666972648784-1655e5a0-e855-4633-9346-42667a744c5c.apk?maple=0&trackId=0&distOpEntity=HKS

The app adds numerous dashes due to the lines: https://github.com/ImranR98/Obtainium/blob/cbe41de7342c90c6c02e308ec0317d76805d8bf8/lib/app_sources/huaweiappgallery.dart#L80-L84

Before that, the app gets the first part of the URL: https://github.com/ImranR98/Obtainium/blob/cbe41de7342c90c6c02e308ec0317d76805d8bf8/lib/app_sources/huaweiappgallery.dart#L76-L77

Namely,

The Solution

Check whether relDateStr contains a '/'.

ImranR98 commented 1 month ago

This URL seems to be different from AppGallery pages I've seen before - it leads to a direct download, and https://appgallery.huawei.com/app/C104450749 is empty. It might not be possible to use it since we can't get a valid app ID or release date. Do you have a link to the actual app listing page?

StSav012 commented 1 month ago

That seems to mean that the app is geo-restricted. I haven't expected that.

The page I see following https://appgallery.huawei.com/app/C104450749 looks like this: image

The page also reads that the app was updated on 10/31/2022. I couldn't find another app that's that old.

I'm unsure if the issue is relevant for anyone but me, then.