Skip to content

[firebase-database][iOS] attempt to insert nil object from objects[0] #105

Closed
@danouche93

Description

@danouche93

Hi, I use this new plugin of firebase because the old one is deprecated. Thank you for developing this !
I open this ticket because I have an issue when setting a value in Firebase Database. When the object I send has one or more properties that are null, I get the error ERROR Error: Uncaught (in promise): Error: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0] and the object is not send.
This issue only occurs in iOS. In Android it is working fine, whenever there are null properties, it is not sent to the database, it would be great to have the same behavior. I use NativeScript with Angular.

Nativescript : 8.2.3
Package.json

{
  "name": "TinaAppV2",
  "main": "./src/main.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "~13.2.0",
    "@angular/common": "~13.2.0",
    "@angular/compiler": "~13.2.0",
    "@angular/core": "~13.2.0",
    "@angular/forms": "~13.2.0",
    "@angular/platform-browser": "~13.2.0",
    "@angular/platform-browser-dynamic": "~13.2.0",
    "@angular/router": "~13.2.0",
    "@nativescript-community/ui-pulltorefresh": "^2.5.1",
    "@nativescript/angular": "^13.0.0",
    "@nativescript/core": "~8.2.2",
    "@nativescript/datetimepicker": "^2.1.9",
    "@nativescript/firebase-core": "^2.1.0",
    "@nativescript/firebase-crashlytics": "^2.1.0",
    "@nativescript/firebase-database": "^2.1.0",
    "@nativescript/firebase-messaging": "^2.1.0",
    "@nativescript/geolocation": "^8.0.2",
    "@nativescript/mlkit-barcode-scanning": "^1.0.5",
    "@nativescript/mlkit-core": "^1.0.5",
    "@nativescript/theme": "~3.0.2",
    "@nstudio/nativescript-checkbox": "^2.0.5",
    "@nstudio/nativescript-floatingactionbutton": "^3.0.4",
    "nativescript-forgm-sound": "^1.1.3",
    "nativescript-ui-chart": "^9.0.2",
    "nativescript-ui-sidedrawer": "^10.0.2",
    "rxjs": "~7.5.0",
    "zone.js": "~0.11.5"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^13.3.6",
    "@angular/compiler-cli": "~13.2.0",
    "@nativescript/android": "8.2.2",
    "@nativescript/ios": "8.2.3",
    "@nativescript/types": "~8.2.0",
    "@nativescript/webpack": "~5.0.6",
    "@ngtools/webpack": "~13.2.0",
    "typescript": "~4.5.5"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingios

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions