Closed previouslysahil closed 1 year ago
Hi previouslysahil, This sounds like an issue with Apple's sandbox server or the Firebase environment in which your code is running. We could add an option to set the request timeout to something lower than 60 seconds but it won't solve the underlying issue.
Hi! Thanks for the quick response, awesome I wasn’t sure but just thought I’d bring it up with you anyways to confirm. Awesome API by the way!
Hi there! I previously was not encountering this issue so I am wondering if this is a current problem with Apple's sandbox server, not sure. Currently when using the
AppStoreServerAPI
with a sandbox environment, while callingawait api.getSubscriptionStatuses(originalTransactionID);
every now and then this call will timeout for over 60 seconds. This in itself is confusing because the call will work once or twice and then timeout the next time and then work etc.I am currently using the AppStoreServerAPI inside a Firebase cloud function which will cancel the function execution after this 60-second timeout. This timeout functionality is triggering because there is no return from the
await api.getSubscriptionStatuses(originalTransactionID);
in this 60 second time period.As I stated above I am only noticing this issue now (first on 0.7 but I have since upgraded to 0.9 and the issue still persists) although while testing this functionality a few weeks ago everything was working fine. I have made no changes to my cloud function code within these few weeks so my assumption is that there is an issue with either the API or Apple's sandbox server at the current moment.
I have not tested using the production environment yet (I'm still very new to Apple's subscription framework, and not sure about the implications of using prod vs sandbox for testing). Yeah anyways, so not sure if this is truly an issue with this API but I thought I would bring it to your awareness anyways (could also just be me problem since as I mentioned I'm pretty new to all this subscription stuff in Node js).
Here is a code snippet I'm using this function in.
During the occasional function calls where
api.getSubscriptionStatuses()
fails the "Finished api.getSubscriptionStatuses" warning will never trigger and the catch block in sendIOSSubscriptionInfoSandbox will also never trigger which leads me to believeapi.getSubscriptionStatuses()
is timing out.