Request ratings and reviews for your app is loading indefinitely

Gilad Noy 1 Reputation point
2021-05-11T16:09:05.587+00:00

Hello,

We using the StoreContext.RequestRateAndReviewAppAsync method from the Windows.Services.Store namespace,
in order to ask our users to review our UWP application.

Most of the time, this call work as expected - the users are shown a popup asking them to review the app.
On rare occasions, the rating window pops up, but remains with a spinner (In these case we tried waiting over a minute, but the spinning animation still shows).

95637-screenshot-632.png

As we don't want to annoy our users, we only show this rating window once per user,
and due to this behavior, we may miss important reviews.

We made sure the method is always dispatched on the main thread, as required according to your documentation.
We also tried storing the StoreContext object at an earlier stage of the app session (using the StoreContext.GetDefault() method),
as it may take 1-2 seconds, but that didn't help.
I managed to reproduce it on my machine, which has the 20H2 Windows version (build 19042.928).

Is there anything that can be done to prevent this behavior?

Thanks,
Gilad.

Ref:
https://learn.microsoft.com/en-us/windows/uwp/monetize/request-ratings-and-reviews#show-a-rating-and-review-dialog-in-your-app
https://learn.microsoft.com/en-us/uwp/api/windows.services.store.storecontext.requestrateandreviewappasync?view=winrt-19041

Microsoft Partner Center
Microsoft Partner Center
A Microsoft website for partners that provides access to product support, a partner community, and other partner services.
1,054 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Gilad Noy 1 Reputation point
    2021-05-12T09:06:18.97+00:00

    It happens on several devices (also ones that have 19H1/19H2 versions).
    It's not likely related to poor networking, as the issue is reproduced on networks in different places and different machines, which should have a rather stable network.

    In the exact same setups that reproduces the bug, it usually works when trying again straight away and in the following attempts as well (even if we delete the app and reinstall it).

    Here is the code:

            private readonly SynchronizationContext _syncContext;
            private StoreContext _storeContext = null;
    
            public MSStoreActions()
            {
                _syncContext = SynchronizationContext.Current;
                _storeContext = StoreContext.GetDefault();
            }
    
            public IAsyncOperation<string> ShowAppRating()
            {
                Logger.LogFunction();
                var taskCompletionSource = new TaskCompletionSource<string>();
                _syncContext.Post(async state =>
                {
                    StoreRateAndReviewResult result = await _storeContext.RequestRateAndReviewAppAsync();
                    Logger.Log($"result={result.Status}");
                    Logger.Log($"extendedData={result.ExtendedJsonData}");
                    Logger.Log($"extendedError={result.ExtendedError}");
                    taskCompletionSource.SetResult(result.ExtendedJsonData);
                }, null);
    
                return taskCompletionSource.Task.AsAsyncOperation();
            }
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.