PurchaseItemAsync continually loops without providing a result

Bug Information
Version Number of Plugin: 7.1.0
Device Tested On: Visual Studio for Mac 2022
Simulator Tested On: 17.0
Version of VS: 17.6.12
Version of Xamarin: <IP_ADDRESS>62
Versions of other things you are using: Essential 1.8.1
Steps to reproduce the Behavior

Implement the PurchaseItem routine as set out at https://jamesmontemagno.github.io/InAppBillingPlugin/PurchaseSubscription.html
Run on iOS simulator using iPad 10
Log in with App Store Sandbox credentials
Click 'Purchase'
Purchase successfully says it's completed and the dialog box disappears.
However, after a few seconds the dialog simply re-appears and asks for the purchase again.
This continues on an infinite loop, and the billing.PurchaseAsync line item in PurchaseItem never completes.
Eventually you close the dialog box, and the purchase variable simply returns null.

Video of issue: https://youtube.com/shorts/uFx8-VSUR0E
Expected Behavior

Once the UI says the purchase completes, the 'await billing.PurchaseAsync' command should complete with the 'purchase' variable containing a successful result, rather than the UI simply looping and the 'await billing.PurchaseAsync' never completing.

Actual Behavior

The 'await billing.PurchaseAsync' never completes and the UI keeps displaying the purchase form despite the UI confirming the purchase has gone through.

Code snippet
See https://jamesmontemagno.github.io/InAppBillingPlugin/PurchaseSubscription.html for the example code.
Main call to subscription:
            var purchase = await Helpers.AppStorePaymentHelper.PurchaseItemAsync(ItemType.Subscription, "com.test.appname.subscription1"); Console.WriteLine($"State = {purchase.State}, Consumption state = {purchase.ConsumptionState}");
Helper code (minor modification from the original in https://jamesmontemagno.github.io/InAppBillingPlugin/PurchaseSubscription.html:
`        static public async Task PurchaseItemAsync(Plugin.InAppBilling.ItemType itemType, string productId)
{
IInAppBilling billing = CrossInAppBilling.Current;
InAppBillingPurchase purchase = null;
try
{
var connected = await billing.ConnectAsync();
            if (!connected)
            {
                //we are offline or can't connect, don't try to purchase
                return null;
            }

            //check purchases
            purchase = await billing.PurchaseAsync(productId, itemType);

            //possibility that a null came through.
            if (purchase == null)
            {
                //did not purchase
                return purchase;
            }
            else if (purchase.State == PurchaseState.Purchased)
            {
                //only needed on android unless you turn off auto finalize
                var ack = await CrossInAppBilling.Current.FinalizePurchaseAsync(purchase.TransactionIdentifier);

                // Handle if acknowledge was successful or not
                return purchase;
            }
        }
        catch (InAppBillingPurchaseException purchaseEx)
        {
            //Billing Exception handle this based on the type
            Console.WriteLine("Error: " + purchaseEx);
        }
        catch (Exception ex)
        {
            //Something else has gone wrong, log it
            Console.WriteLine("Issue connecting: " + ex);
        }
        finally
        {
            await billing.DisconnectAsync();
        }
        return purchase;
    }`

Simulator Tested On: 17.0

You might want to try on a real device. I see the same on iphone simulator but it works well when testing on real device.

correct you must test on a real device

Thank you so much @jamesmontemagno and @hinnerkweiler, that was the solution. I'll close the ticket.


Update set_turbo_replication_async_turbo.php

@ddelgrosso Hi Denis,
We'll need to update the turbo replication code samples for PHP. Turbo replication is not set to default, the replication behavior or recovery point objective (rpo) for the bucket is set to default. Looks like we'll want to update the PHP function name(s) as well (set_turbo_replication_async_turbo=>set_rpo_async_turbo).
See proposed changes. Thanks!

Hi @rebecca-pete
Just had a look at the PR.
Thanks for taking care of it :)
Just wanted to ask you to change the text/fileNames in the tests as well: storage/test/TurboReplicationTest.php.
Also, I gather you may also want to verify filenames for storage/src/get_turbo_replication_status.php and storage/src/create_bucket_turbo_replication.php.
Let me know if you want me to handle the tests :)
Thanks.


pull request for e2e test at 01/22/2017 21:26:17

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Could you expose require('tap/lib/stack')?

When writing custom assertions that use subtests, it is quite convenient to extra.at = stack.at(this.currentAssertion). Is that something you would feel comfortable exposing as part of the public API? Having to const stack = require('tap/lib/stack') feels a bit dirty, especially considering I doubt its part of the public api.
Thanks!

I'd have to think about that.
In the meantime, you can also use t.addAssert(), which will do all the right stack stuff for you.

Hm, this was using t.addAssert(). The stack trace started where the assert was declared vs where it was called. I'll try to come up with a reproducible test case.

You can set t.assertAt and friends to address this: https://www.node-tap.org/advanced/#tassertat-tassertstack-extraat-extrastack

Thanks a bunch!


Unable to install ruby 2.6.3 on Elementary 5.0

I am trying to download ruby 2.6.3 on Elementary 5.0 using rbenv 1.1.2 but I receive the following message when I run the command:
rbenv install 2.6.3
Downloading ruby-2.6.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.3.tar.bz2
Installing ruby-2.6.3...

BUILD FAILED (elementary 5.0 using ruby-build 20190615-9-gf3f4193)

Inspect or clean up the working tree at /tmp/ruby-build.20190816165825.16892
Results logged to /tmp/ruby-build.20190816165825.16892.log

Last 10 log lines:
checking for _setjmp as a macro or function... yes
checking for sigsetjmp as a macro or function... no
checking for setjmp type... __builtin_setjmp
checking for prefix of external symbols... NONE
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking if make is GNU make... ./configure: line 29155: make: command not found
no
checking for safe null command for make... configure: error: no candidate for safe null command

The problem was my fault.
As ruby-build does not check for system dependencies before downloading and attempting to compile the Ruby source, I just had to follow the instruction posted here to make sure I had all required libraries.


Suggestion: Document that zstash create won't create a sub-directory

Suggestion: In documentation for zstash create: mention that it won't create a sub-directory in the directory specified by --hpss, ie the user must include the sub-directory they want in the --hpss specification.

@golaz, this seems like a good point. It's up to your discretion if you want to make a note of this, probably here where you talk about <local_path>.

Per our conversation in https://github.com/E3SM-Project/zstash/issues/32, I am using v0.2.0, however I cannot seem to update to v0.3.0

The documentation has been updated to indicate that the HPSS path should be unique for each zstash archive.


loadMinimalSize and loadMinimalLoader types should be declared as number and React.Node in index.d.ts

Which OS ?
N/A
Version
Which versions are you using:

react-native-swiper v1.5.14
react-native v0.58.6

Expected behaviour
When using react-native-swiper in a TypeScript project, I should be able to enable the loadMinimal prop and specify the loadMinimalSize as a number. I should also be able to specify loadMinimalLoader as anything renderable by React.
Actual behaviour
TypeScript compilation fails because loadMinimalSizeand loadMinimalLoader are both declared as boolean types in index.d.ts.
How to reproduce it
N/A

This repo dead: https://github.com/leecade/react-native-swiper/issues/713