none
Using TrySilentDownloadAndInstallStorePackageUpdatesAsync got an error: The specified account does not exist RRS feed

  • Question

  • I get an error when updating UWP APP using TrySilentDownloadAndInstallStorePackageUpdatesAsync: The specified account does not exist

    I try to upgrade according to the sample code here, while using StoreQueueItem.StatusChanged to obtain progress information, sometimes I get this status information (using personal hotspots will be more prone to this phenomenon):

     {
      "ExtendedError":null,
      "PackageInstallExtendedState":14,
      "PackageInstallState":4,
      "UpdateStatus":{
      "PackageFamilyName":"AppName",
      "PackageDownloadSizeInBytes":2260223,
      "PackageBytesDownloaded":2260223,
      "PackageDownloadProgress":0.95,
      "TotalDownloadProgress":0.95,
      "PackageUpdateState":3
      }
     }

    It looks like Paused, but why Paused? Do I need to call TrySilentDownloadAndInstallStorePackageUpdatesAsync again to install?

    At the same time I see some error logs in the event viewer (Applications and Services->Microsoft-?Windows->Store->Operational):

    Source: Store-SDK, Event ID: 2004, Task Category: In-App Purchase, Detail: SendStoreRequestWithUris( nullptr, UriHelperV7::InternalStoreEndpointExtensionUrls, UriHelperV7::InternalStoreEndpointExtensionUrlsIds::GetUserCollectionForProducts, cv, jsonCollectionsParameters.Get(), nullptr, collectionsJsonString.GetAddressOf()) Error: The specified account does not exist. Function: Windows::Services::Store::Internal::StoreContextServer::GetProductsByKinds Source: \storecontextserver.cpp (4460)

    ------ Source: Store-SDK, Event ID: 2004, Task Category: In-App Purchase, Detail: ChkHr(hrGoldenTicket) Error: The specified account does not exist. Function: Windows::Services::Store::Internal::StoreContextServer::SendStoreRequestWithUris Source: \storecontextserver.cpp (4065)

    ------ Source: Install-Service, Event ID: 2008, Task Category: Service, Detail: [Error] ResumeWithFlagsQueueItemId = {9369AD17-2AA2-42A8-8F76-335AFAB88741} Error: The operation completed successfully. Function: InstallQueue2::ResumeWithFlags Source: onecoreuap\enduser\winstore\installservice\libqueue2\installqueue2.cpp (432)


    How should I solve this problem?



    • Edited by 4-dc Wednesday, June 24, 2020 1:40 AM
    Wednesday, June 24, 2020 1:39 AM

All replies

  • Hi,

    What is the value of StorePackageUpdateResult when you call TrySilentDownloadStorePackageUpdatesAsync mehtod? Completed or OtherError? The StorePackageUpdateResult represent the the result of the TrySilentDownloadStorePackageUpdatesAsync method.

    From the error message, it mentions the account is not correct. If your account is correct, then the issue should be related to the newtwork. 

    As the commente mentioned -"If the user cancelled the download or you can't perform the download for some other reason (for example, Wi-Fi might have been turned off and the device is now on a metered network) try again later. The RetryDownloadAndInstallLater method is not implemented in this example, you should implement it as needed for your own app." Have you tried to implement this as the document recommended?


    Best regards,

    Roy


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Wednesday, June 24, 2020 3:17 AM
  • Hi Roy, thanks for your reply. The value of StorePackageUpdateResult.OverallState is Completed, so it should not enter the RetryDownloadAndInstallLater method. By the way, can I call TrySilentDownloadAndInstallStorePackageUpdatesAsync again in RetryDownloadAndInstallLater?

    Regarding the account is not correct, I don't know what account is meant here? Is it possible to solve this problem if I use StoreContext.GetForUser()?

    My code is basically the same as the sample code in the document, so it should be no problem, you may see that the download process has beencompleted, but the installation is paused, does this mean that there is no problem with the network?
    Wednesday, June 24, 2020 7:10 AM
  • Hi,

    So looks like the download process is completed successfully since the result of TrySilentDownloadStorePackageUpdatesAsync is complete. Now what's the value of StorePackageUpdateResult returned by TrySilentDownloadAndInstallStorePackageUpdatesAsync? 

    And there is another thing that needs to be confirmed, do you have a real update to test?

    Best regards,

    Roy


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Thursday, June 25, 2020 4:48 AM
  • Hi Roy,

    The value returned by TrySilentDownloadAndInstallStorePackageUpdatesAsync is also Completed, which means that all operations are completed? But I use 

    StoreContext.GetAssociatedStoreQueueItemsAsync()

    .FirstOrDefault(x => x.PackageFamilyName == familyName && x.InstallKind == StoreQueueItemKind.Update)

    .GetCurrentStatus()


    to get the value of StoreQueueItemStatus is

    {
       "ExtendedError":null,
       "PackageInstallExtendedState":14,
       "PackageInstallState":4,
       "UpdateStatus":{
           "PackageFamilyName":"AppName",
           "PackageDownloadSizeInBytes":2260223,
           "PackageBytesDownloaded":2260223,
           "PackageDownloadProgress":0.95,
           "TotalDownloadProgress":0.95,
          "PackageUpdateState":3
        }
    }

    I think this is what really makes me wonder. Although TrySilentDownloadStorePackageUpdatesAsync and TrySilentDownloadAndInstallStorePackageUpdatesAsync both return Completed, the value of StoreQueueItemStatus seems to be close to what I have seen.
    • Edited by 4-dc Thursday, June 25, 2020 10:44 AM
    Thursday, June 25, 2020 10:43 AM
  • Hi,

    If the value is completed, it means the install is finished. Did the app restart or you restart it manually to check if the update is installed?

    Best regards,

    Roy


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Friday, June 26, 2020 4:48 AM
  • Sorry for the late, the problem has been solved. The root cause is that I used test flight. The official version does not have this problem. This problem only appears in the test flight version.
    Friday, July 3, 2020 12:19 PM
  • By the way, did you know that breaking the network connection during the upgrade process will cause the app to flash back? It seems that this type of error cannot be caught with try catch.
    Saturday, July 4, 2020 1:34 AM