Skip to content

[3.3.0] You need to be activate Adapty once #134

@efstathiosntonas

Description

@efstathiosntonas

Description

Hi,

after upgrading to "react-native-adapty": "3.3.0" this error started showing up:

Error: #3005 (activateOnceError): You need to be activate Adapty once

and on xcode console:

Adapty activate [Oektfu] encountered an error: 
AdaptyError.activateOnceError([3.3.4]: AdaptyAdapty+Activate.swift#65).
v3.3.4, Adapty/Adapty+Activate.swift#67
  1. There's obviously a typo in the error
  2. Tested in real devices and simulators
  3. The code provided below used to work as a charm with "react-native-adapty": "3.1.0"

on index.js:

async function init() {
  try {
    console.count('activating adapty');
    await adapty.activate(<KEY>), {
      logLevel: 'verbose',
      __debugDeferActivation: __DEV__
    });

    const paywallsLocation = {
      ios: {
        fileName: 'ios_fallback.json'
      },
      android: {
        relativeAssetPath: 'android_fallback.json'
      }
    };
    await adapty.setFallbackPaywalls(paywallsLocation);
  } catch (error) {
    console.error('[ADAPTY] Error activating Adapty SDK', error.message);
    notify(error, 'error', 'Adapty activation error');
  }
}

init();

console.count('activating adapty'); logs only once so IT'S NOT DOUBLE INITed on JS side.

Version

v3.3.0

What platforms are you seeing the problem on?

iOS

System info

System:
  OS: macOS 15.2
  CPU: (20) arm64 Apple M1 Ultra
  Memory: 108.22 MB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.18.2
    path: ~/.nvm/versions/node/v20.18.2/bin/node
  Yarn:
    version: 4.6.0
    path: /opt/homebrew/bin/yarn
  npm:
    version: 11.1.0
    path: ~/.nvm/versions/node/v20.18.2/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/stathis/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
      - 35.0.0
    System Images:
      - android-25 | Google APIs ARM 64 v8a
      - android-27 | Google APIs ARM 64 v8a
      - android-28 | Google APIs ARM 64 v8a
      - android-29 | Google APIs ARM 64 v8a
      - android-30 | Google APIs ARM 64 v8a
      - android-31 | Google APIs ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
      - android-35 | Pre-Release 16 KB Page Size Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.12816248
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /usr/bin/javac
  Ruby:
    version: 3.2.2
    path: /Users/stathis/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: 15.1.3
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.77.0
    wanted: 0.77.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions