Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(firestore): NaN cannot be set #556

Closed
5 of 16 tasks
robingenz opened this issue Feb 14, 2024 · 2 comments
Closed
5 of 16 tasks

bug(firestore): NaN cannot be set #556

robingenz opened this issue Feb 14, 2024 · 2 comments
Labels
bug/fix Something isn't working package: firestore platform: android Android platform
Milestone

Comments

@robingenz
Copy link
Member

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Firestore
  • Cloud Messaging
  • Cloud Storage
  • Performance
  • Remote Config

Version

5.4.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

The following works on iOS, but not on Android:

await FirebaseFirestore.setDocument({
  reference: `samples/1`,
  data: {
    nan: NaN,
  },
});

iOS:
grafik

Android:
grafik

Expected behavior

It should be possible to set an value to NaN on Android.

Reproduction

Steps to reproduce

await FirebaseFirestore.setDocument({
  reference: `samples/1`,
  data: {
    nan: NaN,
  },
});

Other information

The reason for this behavior is that Capacitor converts NaN to null on Android.

Capacitor doctor

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 5.7.0
  @capacitor/core: 5.7.0
  @capacitor/android: 5.7.0
  @capacitor/ios: 5.7.0

Installed Dependencies:

  @capacitor/cli: 5.4.2
  @capacitor/android: 5.4.2
  @capacitor/core: 5.4.2
  @capacitor/ios: 5.4.2

[success] iOS looking great! 👌
[success] Android looking great! 👌

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
@robingenz
Copy link
Member Author

Waiting for ionic-team/capacitor#7251

@robingenz robingenz added this to the v6.0.0 milestone Feb 15, 2024
@robingenz
Copy link
Member Author

@robingenz robingenz closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/fix Something isn't working package: firestore platform: android Android platform
Projects
None yet
Development

No branches or pull requests

1 participant