Skip to main content

TL:DR - Purchases.setMockWebResults({ shouldMockWebResults: true }) - is not working.

Since RevenueCat only works on a real device or an emulator - it is a real pain in the ass to test functionality and run Android Studio, it is lagging so much.

If RevenueCat was at least “mocking” data in the browser - that would be so cool and useful to quickly iterate on the tasks related to it. And after reading documentation - I found that this method exists - but it literally does nothing, it still logs “Web is not supported”. 

Calling that method before or after “await Purchases.configure()” - is to no avail.

Apparently nobody on the team knows how to fix or wants to fix it, since previous topics were ignored or evaded:
first
second
 

So either remove it entirely from the API, or fix it - because I consider that functionality is CRUCIAL.

Bump
making sure stuff will see it and won't ignore 


Hey ​@Mykyta 0x ,

 

We appreciate the feedback. We dont currently offer mock data like that through the browser but I can share this with the team as a feature request so we can hopefully implement something like that in the future. 

 

Are you receiving a specific error when configuring the SDK? Also, have you followed our Android testing guide here? When running through Android Studio, you will be able to open the app using an emulator. 


Hey ​@Michael Fogel

 

First of all, thank you for answering to this issue.

But it is still very strange for such a serious plugin and company - to have publicly available a method which obviously does not work.
I would suggest - either add it to the method description, that it is not working at the moment, or make it private temporarily.

I don’t have problems with Android testing, my specific problem is regarding mocking revenue cat data on Web.

 

Anyways, for anybody who will encounter this quite unpleasant issue, I will tell how I resolved it.

I just created a json file and pasted in there the json response from revenue cat.

If Revenue’s cat response is too long, Android Studio might cut it off in the middle, making json invalid. I didn’t find any other workaround as to display that in the UI, and then copy the contents of a html tag via chromes `chrome://inspect/#devices`.
That is how you will be able to mock Revenue Cat’s response, until they fix the method.  


Reply