AdaptyUI-React-Native icon indicating copy to clipboard operation
AdaptyUI-React-Native copied to clipboard

Error presenting paywall: [Error: #3001 (wrongParam): AdaptyPaywall.viewConfiguration is nil]

Open huseyintamer opened this issue 1 year ago • 13 comments

I’m encountering an issue when trying to use the new paywall builder with the following setup:

Package.json

"@adapty/react-native-ui": "^2.11.0",
"react-native-adapty": "^2.11.0"

Code

import React from 'react';
import {View, Text, StyleSheet, Button} from 'react-native';
import {createPaywallView} from '@adapty/react-native-ui';
import {adapty} from 'react-native-adapty';

const OnboardPaywall = ({route, navigation}) => {
  const presentPaywall = async () => {
    try {
      const locale = 'en';
      const id = 'paywal_general';
      const paywall = await adapty.getPaywall(id, locale);
      const view = await createPaywallView(paywall);
      view.registerEventHandlers(); // handle close press, etc
      await view.present();
    } catch (error) {
      console.log('Error presenting paywall:', error);
    }
  };

  return (
    <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
      <Text>Welcome to the Paywall Screen</Text>
      <Button title="Show Paywall" onPress={presentPaywall} />
    </View>
  );
};`

Issue:

While the old paywall builder works without any issues, the new paywall builder throws an error when attempting to present the paywall.

The error occurs when calling await view.present(); within the presentPaywall function.

 DEBUG  [2024-08-17T14:08:11.741Z] [[email protected]] "createController": Calling method: OK {"error": [Error: #3001 (wrongParam): AdaptyPaywall.viewConfiguration is nil]}
 ERROR  Error presenting paywall: [Error: #3001 (wrongParam): AdaptyPaywall.viewConfiguration is nil]

Steps to Reproduce:

1.	Implement the provided code snippet in a React Native project.
2.	Use the new paywall builder by calling the createPaywallView method.
3.	Attempt to present the paywall using await view.present();.

huseyintamer avatar Aug 17 '24 14:08 huseyintamer

Same problem

li4e avatar Aug 20 '24 03:08 li4e

I figured out the issue. According to the documentation, the new Paywall Builder 3.0 is only supported by the new Adapty, AdaptyUI SDK versions 3.0.1. However, React Native Adapty uses the older versions. It seems we’ll have to wait for an update.

li4e avatar Aug 20 '24 04:08 li4e

@huseyintamer, as a workaround, you can try using the legacy 2.0 paywall builder. It worked for me.

li4e avatar Aug 20 '24 05:08 li4e

@li4e Yes I already use legacy 2.0 paywall builder, it's worked. So waiting update to use New one. Thanks.

huseyintamer avatar Aug 20 '24 11:08 huseyintamer

any movement on this?

The docs/site shouldn't be pushing the new Paywall builder if the SDKs haven't been updated to work with it

troberts-28 avatar Sep 02 '24 17:09 troberts-28

I contacted support on this issue. They told me to expect the release of the new SDK in September.

evlinH avatar Sep 03 '24 07:09 evlinH

I also spoke to support about this and got an additional steer that it will be in late September 👍

troberts-28 avatar Sep 05 '24 08:09 troberts-28

I have the same issue.

jadams777 avatar Sep 22 '24 13:09 jadams777

v3.0.0 is going to be out in early October

vladd-g avatar Sep 23 '24 11:09 vladd-g

v3.0.0 is going to be out in early October

is it getting delayed?

chuanlol avatar Oct 08 '24 20:10 chuanlol

@chuanlol hopefully next week

vladd-g avatar Oct 08 '24 20:10 vladd-g

Dear Adapty Team,

We are still waiting for the update. This is important for our business as we are eagerly looking forward to trying out the new designs.

I kindly ask the team to prioritize this matter.

Best regards.

huseyintamer avatar Oct 11 '24 20:10 huseyintamer

@huseyintamer we understand the importance; the priority is very high

vladd-g avatar Oct 11 '24 21:10 vladd-g

@vladd-g When is the new update coming out? It's been far too long.

ansh avatar Oct 17 '24 01:10 ansh

@vladd-g Hello, any news? We are still waiting the update

FurkanKayaDev avatar Oct 21 '24 09:10 FurkanKayaDev

hi @huseyintamer @li4e @troberts-28 @evlinH @jadams777 @chuanlol @ansh @FurkanKayaDev

v3.0.0 is out!

vladd-g avatar Oct 22 '24 20:10 vladd-g

Great! Thanks @vladd-g

Unfortunately, I already migrated my apps to RevenueCat

ansh avatar Oct 26 '24 17:10 ansh