The persistent Expo in-app purchase sandbox pop-up continues to plague, hindering the completion of the test purchase

After creating my app using Expo and integrating Revenuecat for payments, I encountered an issue while testing it. Whenever I try to subscribe, the purchase popup keeps reappearing in Sandbox mode even after clicking 'Done'. Despite entering valid sandbox user details, there is no record of the subscription in my Revenuecat account.

I am new to Sandbox testing and am using iOS simulator (17). I have searched online for a solution but haven't found anything helpful yet. The code does not seem to progress beyond validation, as the console logs are not showing up after calling the purchase function:

const subscribe = async(item) => {
  try {
    const {purchaserInfo} = await Purchases.purchasePackage(item)
    console.log('purchase info: ', purchaserInfo)
    const purchase = await Purchases.getCustomerInfo()
    console.log('purchase: ', purchase)
    if(typeof purchase.entitlements.active['pro'] !== 'undefined') {
      await navigation.navigate('Account')
    }
  } catch (error) {
    console.log(error)
  }
}

My expectation is that the purchasing process should proceed smoothly, register a test user on the Revenuecat dashboard, display the console results, and then navigate to the designated page.

Answer №1

During my experience, the issue stemmed from a lack of environment variables being included with the application. I mistakenly believed that when deploying the app to the App Store, the env variables would automatically be included or that there was a designated location to register them. However, after finding no such solution, I ended up manually adding the env variables within the code itself which ultimately resolved the issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

`Cannot Get jQuery ScrollTop Function to Work for 2nd Element`

Having trouble with an issue. Let me explain. I implemented a scrollTop Jquery on page load that scrolls down after a delay to prompt user action. However, I'm facing a problem where another scrollTop doesn't work after clicking buttons "#b3,#b3 ...

What is the best way to set up a dropdown menu in a data grid where the width matches the fields?

I am looking to optimize the layout for various screen resolutions and ensure compatibility with the latest versions of IE, Firefox, and Chrome. https://i.sstatic.net/3OLh0.jpg ...

Methods for establishing state within a React Native render function

I encountered an issue when attempting to set state within the render lifecycle. Warning: It is not recommended to update state during an ongoing state transition, such as in the render method or another component's constructor. The render method s ...

Can the swap operation be carried out using web3.js and a forked HardHat implementation?

Embarking on my journey into ethereum development, I am currently engrossed in crafting a basic script that facilitates swaps using web3.js. To begin with, my web3 is establishing a connection to the HardHat forked server. The first step involves setting ...

Images stored locally are not appearing in React JS applications

I'm currently exploring React JS and Material UI to develop a dynamic web application. I'm attempting to link a local image using 'url(${process.env.PUBLIC_URL})' but unfortunately, the image is not showing up for some unknown reason. ...

CRNA project frozen on the 'launching packager...' step

I've encountered an issue where every CRNA project I try to start gets stuck at "Starting packager" and despite attempting various projects, the problem persists consistently with each one getting stuck at this point. Currently, I am using [email ...

Tips for adding information to a PHP file

Previously, I used PHP to append form data to a JSON file. Currently, I am working on a PHP file instead of a JSON file with two parameters, as shown to users in the figure below. Image URL Link My Form: <form action="process.php" method="POST"> ...

What is the proper way to create a regex pattern that specifies 'without any spaces'?

I need assistance in creating a regex expression that specifies "and NO whitespaces". I have to incorporate this into the following if statement shown below: $('#postcode').blur(function(){ var postcode = $(this), val = postcode.val(); ...

Using jQuery to smoothly scroll to a specific class name

I am faced with an HTML code snippet that looks like this: <div data-stored="storenow" data-save="save" class="saveIcon" data-unique="game">Save</div> My intention is to use jQuery to scroll to the game number 456 as shown below. var contain ...

Invoking a .js file within an UpdatePanel from the CodeBehind

I have been dedicating my time to self-teach ASP.NET and JavaScript for a project, and I've hit a roadblock that has consumed dozens of hours. After discovering a fantastic drag-and-drop JavaScript list online, I copied the provided source code and o ...

MVC - The challenge of users repeatedly clicking the Submit button

In my MVC application, there are multiple pages where users submit a form by clicking a Submit button. Occasionally, users may click the button multiple times if they don't see an immediate response, causing the form to be submitted twice. To address ...

How is it possible that this event listener is able to capture an event that was already sent before it was

I am facing an issue with my Vue JS code. When I click on the account <a> tag, it triggers the toggle method. The toggle method adds an event listener to the document. However, as soon as the toggle method is executed, the event listener fires and ...

Tips for styling tooltips in rc-slider

I am currently using the react library rc-slider and I am looking to add a tooltip feature to display the current value. I found guidance on how to do this from a post on the rc-slider GitHub page. However, I encountered an issue where my slider position b ...

Modify the templateUrl in routeProvider according to the user's authorization

Is there a way to dynamically change the templateUrl in the router provider based on user permissions? Here's an example of what I'd like to achieve: $routeProvider .when('/',{ if(user) templateUrl:'app/views/pages/h ...

Teaching Selenium how to input text into Google's login field (programming with Python)

Encountering an issue with sending keys to the username and password fields in Google's sign-in box using Selenium. Despite locating the web elements with the IDs "Email" and "Passwd", I'm unable to input any keys into them. Here is the code sni ...

The reason why React.js does not automatically bind its functions to the "this" object

I cannot understand the purpose of a function not being bound by this object. In my opinion, all functions should be bound by 'this'. So why doesn't Reactjs automatically set bind(this) by default? For instance, in the code below, if I didn& ...

Tips for modifying the color of a query term in HTML

Within my HTML file, I have <p class = "result"> {{searchResult}} </p> where {{searchResult}} represents the result of a search term. If I search for the term "hot", {{searchResult}} would display a string containing the word "hot" in a ...

The function setCustomValidity() will continue to display even after the form has been successfully filled out

My form is very simple and I am trying to validate it using the required attribute: <form name="form"> <label for="Header">Title</label> <input type="text" class="span5" name="Header" ng-model="Message.header" placeholder="Title" on ...

Executing a get request in Backbone without using the Option parameter by implementing the beforeSend method

After gathering insights from the responses to this and this queries, I have formulated the code below for a GET request: var setHeader = function (xhr) { xhr.setRequestHeader("Authorization", "Basic " + btoa($rootScope.login.Gebruikersnaam + ":" + $r ...

Creating dynamic URL routes for a static website using Vue

I am facing a challenge with my static site as I am unable to add rewrites through htaccess. Currently, our site is built using Vue on top of static .html templates such as \example\index.html. When I want to create a subpage within this layout, ...