RevenueCat / RevenueCat/react-native-purchases

Error with eas build: TypeError: _reactNative.UIManager.getViewManagerConfig is not a function

Open
#1,368 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

acknowledged android bug
Dominant language
TypeScript
Stars
1.2k
Forks
117
Avg merge
14h 40m
Merged PRs (30d)
40

Description

I'm using the following:

  • "expo": "~53.0.20"
  • "react-native": "0.79.5"
  • "react-native-purchases": "^9.2.2",
  • "react-native-purchases-ui": "^9.2.2"

When running eas build on --profile production I'm getting the following error: TypeError: _reactNative.UIManager.getViewManagerConfig is not a function

production build bundles the javascript using this command: npx expo export:embed --eager --platform android --dev false

Here's the full error:

TypeError: _reactNative.UIManager.getViewManagerConfig is not a function
TypeError: _reactNative.UIManager.getViewManagerConfig is not a function
    at factory (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\react-native-purchases-ui\lib\commonjs\index.js:130:59)
    at loadModuleImplementation (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:285:5)
    at guardedLoadModule (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:190:12)
    at require (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:98:7)
    at factory (C:\Users\Robert\Documents\codes\demo-ai\mobile\contexts\RevenueCatContext.tsx:5:1)
    at loadModuleImplementation (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:285:5)
    at guardedLoadModule (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:190:12)
    at require (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:98:7)
    at factory (C:\Users\Robert\Documents\codes\demo-ai\mobile\app\_layout.tsx:11:1)
    at loadModuleImplementation (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:285:5)`

I click the stackerror and it points to this:

const InternalCustomerCenterView = _reactNative.UIManager.getViewManagerConfig('CustomerCenterView') != null ? (0, _reactNative.requireNativeComponent)('CustomerCenterView') : () => {
  throw new Error(LINKING_ERROR);
};

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with react-native-purchases-ui/lib/commonjs/index.js at line 130 and the production entry point, npx expo export:embed --eager --platform android --dev false. Compare that code with the listed Expo, React Native, react-native-purchases, and react-native-purchases-ui versions. Done means the production Android export completes without the UIManager error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
build-system, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.