Crash during Qonversion.offerings()
AlexLionne opened this issue · comments
Since outage on your plateform (01/16/2023) it seems that offering can't be fetched and produce a crash (at least on iOS)
I'm not able to catch this crash
dispatch(setOffers({}))
Qonversion.offerings()
.then((shop) => {
if (shop) {
dispatch(setOffers(shop))
}
})
.catch(error => console.error(error))
// Qonversion.restore().catch is returning an internal server error as expected
This always produces a crash with this trace (i'm not familiar with Xcode debugger)
Do you think that using this is a good workaround for now ?
await axios.get('https://api.qonversion.io/')
.catch(e => {
//
if (e.message.includes('502') || e.message.includes('503')) {
isQonversionAvailable = false
}
})
I'm initializing SDK as in the docs
const config = new QonversionConfigBuilder(
'xxxxxx...',
LaunchMode.SUBSCRIPTION_MANAGEMENT
)
.setEntitlementsCacheLifetime(EntitlementsCacheLifetime.YEAR)
.build()
Q.initialize(config)
const Qonversion = Q.getSharedInstance()
export { Qonversion }
RN 0.70.5
Qonversion SDK 4.0.1
Thank you
Hello! Thank you for contacting us! First of all, I want to apologize for the inconvenience provided by this outage. All our team is hard working on solving this problem. All the actual information is available on our status-page.
Speaking of your issue, could you please clarify whether you see this exception on a new install or on an existing app (launched before the outage started)? It's important because if Qonversion had successfully launched at least once before the outage, fault tolerance mechanics begin working when something goes wrong later.
Also, could you please provide us with a complete stack trace (starting from the first line)?
Speaking of the workaround, it looks suitable but only as a temporary solution for the current outage. As it affects the whole API. But in general, you should rely on Qonversion SDK responses and handle errors from calls. If there is really some kind of problem causing exceptions on our side, we will fix it as soon as possible. In a normal way even if our API is facing problems, the SDK will try to respond to your calls using its own caches where possible or will return an error otherwise.
could you please clarify whether you see this exception on a new install or on an existing app
On an existing app (successfully working before outage)
I will try to provide a better trace
Good luck in this difficult situation
Thank you a lot! 🙏
Looking forward for the details.
All services we need are up !
It seems I can't provide any stack trace.
I can close this issue and hope that .offerings()
will not crash when api can't be reached.
Thanks again
Yes, we were able to solve our API problem. Well, we will try to investigate this problem ourselves and fix it, if the problem is on our side. Thank you again for reporting this issue!
We have detected the problem causing described crashes and fixed it. Please, update your SDK version to 4.0.2, where this crash won't appear.