realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.74k stars 566 forks source link

[TypeError: _$$_REQUIRE(_dependencyMap[6], "realm").Object.assign is not a function (it is undefined)] #6859

Closed giselesousar closed 2 weeks ago

giselesousar commented 3 weeks ago

How frequently does the bug occur?

Always

Description

I am encountering a TypeError when trying to save a record using Realm in a React Native project. The error message is as follows: TypeError: _$$_REQUIRE(_dependencyMap[6], "realm").Object.assign is not a function (it is undefined)

Expected Behavior: The record should be saved to the Realm database without any errors.

Actual Behavior: A TypeError is thrown, indicating that Object.assign is not a function or is undefined within the Realm library.

Environment: React Native version: 0.73.4 Realm version: 12.13.1 Realm React version: 0.10.0 Platform: Android Node version: v20.16.0 Yarn version: 1.22.22

Stacktrace & log output

[TypeError: _$$_REQUIRE(_dependencyMap[6], "realm").Object.assign is not a function (it is undefined)]

Can you reproduce the bug?

No

Reproduction Steps

No response

Version

12.13.1

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Android API 31

Build environment

Which debugger for React Native: ..

Cocoapods version

No response

sync-by-unito[bot] commented 3 weeks ago

➤ PM Bot commented:

Jira ticket: RJS-2893

giselesousar commented 2 weeks ago

Removing extends Realm.Object from my classes fixed the issue. Thanks!