Since the last update, I've been experiencing the following issue: I have a query for a subcollection of users called "consultasSalvas," and it has always worked fine. The production version is also functioning correctly. However, now in FlutterFlow (FF), I'm encountering the following error in the console:
Uncaught (in promise) Error: NoSuchMethodError: 'code'
method not found
Receiver: Instance of 'NativeError'
Arguments: []
at Object.throw_ [as throw] (dart_sdk.js:5463:11)
at Object.defaultNoSuchMethod (dart_sdk.js:5894:15)
at p.noSuchMethod (dart_sdk.js:7191:19)
at Object.noSuchMethod (dart_sdk.js:5891:30)
at Object.dload (dart_sdk.js:5528:17)
at tela_lista_consulta_model.dart:75:17
at RootZone.runUnary (dartsdk.js:41265:59)
at FutureListener.catchError.handleError (dartsdk.js:36481:33)
at handleError (dart_sdk.js:37055:51)
at Future.propagateToListeners (dart_sdk.js:37081:17)
at [_completeError] (dart_sdk.js:36918:23)
at RootZone.runBinaryGuarded (dartsdk.js:41218:11)
at sendError (dart_sdk.js:34951:26)
at [_sendError] (dart_sdk.js:34965:13)
at [_addError] (dart_sdk.js:34895:27)
at [_addError] (dart_sdk.js:39133:25)
at [_handleError] (dart_sdk.js:39088:24)
at [_handleError] (dart_sdk.js:39158:38)
at RootZone.runBinaryGuarded (dartsdk.js:41218:11)
at sendError (dart_sdk.js:34951:26)
at [_sendError] (dart_sdk.js:34968:11)
at [_addError] (dart_sdk.js:34895:27)
at [_addError] (dart_sdk.js:39133:25)
at [_handleError] (dart_sdk.js:39370:26)
at [_handleError] (dart_sdk.js:39158:38)
at RootZone.runBinaryGuarded (dartsdk.js:41218:11)
at sendError (dart_sdk.js:34951:26)
at [_sendError] (dart_sdk.js:34968:11)
at [_addError] (dart_sdk.js:34895:27)
at [_addError] (dart_sdk.js:39133:25)
at [_handleError] (dart_sdk.js:39088:24)
at [_handleError] (dart_sdk.js:39158:38)
at RootZone.runBinaryGuarded (dartsdk.js:41218:11)
at sendError (dart_sdk.js:34951:26)
at [_sendError] (dart_sdk.js:34968:11)
at [_addError] (dart_sdk.js:34895:27)
at dart_sdk.js:35606:34
at [_forEachListener] (dart_sdk.js:35452:13)
at [_sendError] (dart_sdk.js:35605:31)
at SyncBroadcastStreamController.new.addError (dartsdk.js:35400:25)
at firestore.dart:442:57
at Object._checkAndCall (dart_sdk.js:5666:16)
at Object.dcall (dart_sdk.js:5671:17)
at ret (dart_sdk.js:63548:21)
at index.esm2017.js:16377:14
I contacted support the first time, and they informed me that it was a known issue. After some time, I reached out again yesterday, and the support team downloaded the code and ran it locally. They found that Firebase returned the need to create an index and provided me with a link. However, when I created the index, it caused issues in production as one user could see another user's subcollection. The index was using a unique set of values filled in exemptions, so I had to delete the index. Upon further testing, I noticed that removing the "order by" clause makes it work, but the data is returned unordered, which is not the intended behavior for the app.
Has anyone else encountered a similar problem and found a solution? I've mentioned that I have an APK with this working perfectly, but they insist there are no errors in FF.