You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time I open the app in the Android emulator, I see this warning: "Possible unhandled promise rejection..." (see more details in the screenshot). I understand that this library is not expected to work on the Android emulator without installed Google Play services.
The issue isn't that the library isn't working, but rather the warning itself. It's not possible to catch and conditionally ignore it.
The error is thrown in withIAPContext.ts file. There is no way to pass on error handlers to this HOC.
purchaseUpdatedListener expects the second argument to be a function, if a function is not given it throws an error which causes the mentioned warning.
Of course, we can conditionally wrap with this HOC, for example detect Android emulator and don't wrap at all, but in this case the library won't work on emulators with installed GooglePlay services.
Another possible solution is to allow passing on error handler to withIAPContext HOC.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Thanks for the great library!
Every time I open the app in the Android emulator, I see this warning: "Possible unhandled promise rejection..." (see more details in the screenshot). I understand that this library is not expected to work on the Android emulator without installed Google Play services.
The issue isn't that the library isn't working, but rather the warning itself. It's not possible to catch and conditionally ignore it.
The error is thrown in withIAPContext.ts file. There is no way to pass on error handlers to this HOC.
purchaseUpdatedListener
expects the second argument to be a function, if a function is not given it throws an error which causes the mentioned warning.Of course, we can conditionally wrap with this HOC, for example detect Android emulator and don't wrap at all, but in this case the library won't work on emulators with installed GooglePlay services.
Another possible solution is to allow passing on error handler to
withIAPContext
HOC.Are there any other ways to ignore this error?
Beta Was this translation helpful? Give feedback.
All reactions