question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing Realm constructor or duplicated symbols

See original GitHub issue

Goals

Using Realm normally

Expected Results

Actual Results

after install Realm and pod install, app will launch with error Missing Realm constructor. After research through github, I found that we should link libRealmReact.a to Link binary with libraries. But after linked, app throw error that 155 duplicate symbols for architecture x86_64.

Steps to Reproduce

react-native init exampleProject yarn add realm cd ios && pod install

Code Sample

import Realm from 'realm

Version of Realm and Tooling

  • Realm JS SDK Version: 3.5.0
  • Node or React Native: node 10.15.3 RN 0.61.2
  • Client OS & Version: Mac OSX Catalina 10.15.1 Xcode 11.2.1
  • Which debugger for React Native: None

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:41 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
hauhuynh1208commented, Dec 16, 2019

I found the solution:

  1. create a new project with the same name as your existed project
  2. removeios folder from existed project, and replace by the ios folder which is created from the new one.
  3. remove node_modules and yarn.lock/package-lock.json
  4. Add pod link if needed in Podfile
  5. Make sure your ios folder dont includes Pods/ and Podfile.lock
  6. yarn add realm
  7. cd ios/ && pod install && cd …/
  8. yarn start && yarn run ios

Hope my workaround could help who are got stuck on running existed project with realm 😃

3reactions
ruslanaplidcommented, Dec 12, 2019

“react-native”: “0.61.2”, “realm”: “^3.5.0”,

If run $ react-native run-ios - its ok

If run project in xCode to simmulator - Error: Missing Realm constructor. Did you run “pod install”? Please see https://realm.io/docs/react-native/latest/#missing-realm-constructor for troubleshooting

If remove folder ios/build and again run project in xCode - again Error “Missing Realm constructor” and folder ios/build is empty

UPD: Go to xCode menu Product -> Clean Build Folder - Yesssss YO!
Its work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missin Realm Constructor error - MongoDB
Hi, I perfectly followed the instructions that the documentation reported, but every time I start my app it gives me the Missing Realm...
Read more >
ECMAScript® 2023 Language Specification - TC39
Introduction. This Ecma Standard defines the ECMAScript 2023 Language. It is the fourteenth edition of the ECMAScript Language Specification.
Read more >
ECMAScript® 2022 Language Specification
Introduction. This Ecma Standard defines the ECMAScript 2022 Language. It is the thirteenth edition of the ECMAScript Language Specification.
Read more >
WebLogic Server Known and Resolved Issues
Change Request Number Found In Fixed In CR200627 9.0 CR208373 9.0 9.2 CR214481 9.0 9.2
Read more >
WebView - Android Developers
Called when the window containing has change its visibility (between GONE ... Enables or disables the duplication of the parent's state into this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found