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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃敟 馃悰] 'FirestoreFieldPath' cannot be used in conjunction with a different Query.orderBy() parameter error #4968

Closed
2 of 7 tasks
V3RT1AG0 opened this issue Feb 28, 2021 · 3 comments
Labels
Help: Needs Triage Issue needs additional investigation/triaging. Impact: Bug New bug report

Comments

@V3RT1AG0
Copy link

V3RT1AG0 commented Feb 28, 2021

Issue

Error: firebase.firestore().collection().orderBy() Invalid query. Query.where() fieldPath parameter: 'FirestoreFieldPath' cannot be used in conjunction with a different Query.orderBy() parameter

I am getting above error on Android device even when I am using FirestoreFieldPath as first orderBy parameter. As mentioned here it should work. Below is my block of code.

const globalGroups = firestore().collection('chat/global/groups');
globalGroups
          .where(firestore.FieldPath.documentId(), 'in', conversationIdArr)
          .orderBy(firestore.FieldPath.documentId())
          .orderBy('updatedAt') //adding this orderBy throws an error
          .get()

Project Files

Javascript

package.json:

{
  "name": "xxx",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.12.0",
    "@react-native-community/google-signin": "^5.0.0",
    "@react-native-community/netinfo": "^5.9.6",
    "@react-native-firebase/admob": "^10.8.1",
    "@react-native-firebase/analytics": "^10.8.1",
    "@react-native-firebase/app": "^10.8.1",
    "@react-native-firebase/auth": "^10.8.1",
    "@react-native-firebase/firestore": "^10.8.1",
    "axios": "^0.18.0",
    "lodash": "^4.17.15",
    "moment": "^2.24.0",
    "normalizr": "^3.3.0",
    "react": "16.13.1",
    "react-native": "0.63.0",
    "react-native-admob": "^2.0.0-beta.6",
    "react-native-device-info": "^5.6.5",
    "react-native-fbsdk": "^2.0.0",
    "react-native-gallery-swiper": "^1.22.2",
    "react-native-image-zoom-viewer": "^2.2.26",
    "react-native-modal": "^11.5.6",
    "react-native-navigation": "^6.12.2",
    "react-native-onesignal": "^3.9.1",
    "react-native-searchable-dropdown": "^1.0.8",
    "react-native-sectioned-multi-select": "^0.7.1",
    "react-native-splash-screen": "^3.2.0",
    "react-native-thumbnail-video": "^0.1.2",
    "react-native-vector-icons": "^7.0.0",
    "react-native-version-number": "^0.3.6",
    "react-native-webview": "^10.8.2",
    "react-native-youtube": "^2.0.1",
    "react-redux": "^7.0.3",
    "redux": "^4.0.4",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^1.1.0",
    "babel-jest": "^25.1.0",
    "eslint": "^6.5.1",
    "jest": "^25.1.0",
    "metro-react-native-babel-preset": "^0.59.0",
    "react-test-renderer": "16.13.1",
    "reactotron-react-native": "^5.0.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "rnpm": {
    "assets": [
      "./assets/fonts/"
    ]
  }
}

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • [ X] my application is an AndroidX application?
  • [X ] I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 881.23 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.8.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 23, 24, 27, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.1
      System Images: android-26 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0.1 4.0.1
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_262 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.0 => 0.63.0 
  npmGlobalPackages:
    *react-native*: Not Found


  • Platform that you're experiencing the issue on:
    • iOS
    • [] Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 10.8.1
  • Firebase module(s) you're using that has the issue:
    • react-native-firebase/firestore
  • Are you using TypeScript?
    • N


@V3RT1AG0 V3RT1AG0 added Help: Needs Triage Issue needs additional investigation/triaging. Impact: Bug New bug report labels Feb 28, 2021
@V3RT1AG0 V3RT1AG0 changed the title 'FirestoreFieldPath' cannot be used in conjunction with a different Query.orderBy() parameter error 馃敟 'FirestoreFieldPath' cannot be used in conjunction with a different Query.orderBy() parameter error Feb 28, 2021
@V3RT1AG0 V3RT1AG0 changed the title 馃敟 'FirestoreFieldPath' cannot be used in conjunction with a different Query.orderBy() parameter error [馃敟 馃悰] 'FirestoreFieldPath' cannot be used in conjunction with a different Query.orderBy() parameter error Feb 28, 2021
@mikehardy
Copy link
Collaborator

I notice the reference link you post is to the nodejs implementation - we are based on the firebase-android-sdk and firebase-ios-sdk - they behave differently - are you sure this is supported in those underlying SDKs?

@abhinav-official
Copy link

@mikehardy why are you always in hurry to close issue rather than understand the issue.

@mikehardy
Copy link
Collaborator

Issues that have very low probability of being understood due to lack of information or that have very low likelihood of causing a change in the repo since they are project related or simply unrelated to the repo are closed as fast as possible to keep the list clear for things that are demonstrated to be actual implementation issues. Closing is reversible so this is an efficient style for a high traffic repo that attracts low quality / low effort issues on a regular basis.

Why do you post ad hominem comments on old issues? Borderline abusive behavior, please keep things focused on technical items. If you or your company can demonstrate a technical issue in the repo, open an issue providing the details requested in the template and any following comments and you should get attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help: Needs Triage Issue needs additional investigation/triaging. Impact: Bug New bug report
Projects
None yet
Development

No branches or pull requests

3 participants