realm-js: Error: RealmObject cannot be called as a function
How frequently does the bug occur?
All the time
Description
I am getting this error only on android side when i am going to add data. IOS side it is working properly !
this is my versions
“realm”: “^10.6.1”, “react”: “17.0.2”, “react-native”: “0.65.0”,
Stacktrace & log output
// Add a single WOListData using parameters
let addWOListData = (
_totalTimeSpent,
_totalPlannedMechanicTime,
_mechanicName,
_appointmentId,
_workOrderNumber,
_ifsWorkOrderStatusId,
_workOrderColor,
_licensePlateNumber,
_model,
_brandName,
_logo,
_customerName,
_mobileNo,
_description,
_plannedTime,
_bookedDate,
_updatedDate,
_workOrderStatus,
_dealer,
_appointmentGuid
) => {
realm.write(() => {
const WOList = realm.create("WOList", {
totalTimeSpent: _totalTimeSpent,
totalPlannedMechanicTime: _totalPlannedMechanicTime,
mechanicName: _mechanicName,
appointmentId: _appointmentId,
workOrderNumber: _workOrderNumber,
ifsWorkOrderStatusId: _ifsWorkOrderStatusId,
workOrderColor: _workOrderColor,
licensePlateNumber: _licensePlateNumber,
model: _model,
brandName: _brandName,
logo: _logo,
customerName: _customerName,
mobileNo: _mobileNo,
description: _description,
plannedTime: _plannedTime,
bookedDate: _bookedDate,
updatedDate: _updatedDate,
workOrderStatus: _workOrderStatus,
dealer: _dealer,
appointmentGuid: _appointmentGuid,
});
printLog("Wooho WOListData ADDED", WOList);
});
};
Can you reproduce the bug?
Not yet
Reproduction Steps
No response
Version
10.6.1
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
Android 12 (31 API)
Build environment
Which debugger for React Native: …
Cocoapods version
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 30 (13 by maintainers)
I don’t see any issues with the code snippet. Could you try to remove all build folders, clear all caches and remove the app from your device?