flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

Having this issue a couple of days back

Open rokipet opened this issue 3 years ago • 11 comments

/Users/yosbelgonzalez/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTTransactionStreamHandler.m:138:40: Use of undeclared identifier 'FIRTransactionOptions'

/Users/yosbelgonzalez/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.5/ios/Classes/FLTTransactionStreamHandler.m:138:26: Use of undeclared identifier 'options'

/Users/yosbelgonzalez/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.5/ios/Classes/FLTTransactionStreamHandler.m:139:3: Use of undeclared identifier 'options'; did you mean 'optind'?
-----------------------------------------------------------------------------

 FIRTransactionOptions *options = [[FIRTransactionOptions alloc] init];
  options.maxAttempts = maxAttempts.integerValue;

  [firestore runTransactionWithOptions:options
                                 block:transactionRunBlock
                            completion:transactionCompleteBlock];

Use of undeclared identifier 'FIRTransactionOptions'
Use of undeclared identifier 'options'

rokipet avatar Aug 23 '22 03:08 rokipet

@YosbelGonzalez01 The error you shared is pointing to below:

https://github.com/firebase/flutterfire/blob/7418dfd91c4fc7982c6bc6b1e8de80f9bccd575b/packages/cloud_firestore/cloud_firestore/ios/Classes/FLTTransactionStreamHandler.m#L138

https://github.com/firebase/flutterfire/blob/7418dfd91c4fc7982c6bc6b1e8de80f9bccd575b/packages/cloud_firestore/cloud_firestore/ios/Classes/FLTTransactionStreamHandler.m#L139

maxAttempts is newly added feature to the plugin as part of this : https://github.com/firebase/flutterfire/commit/9da7cc36cb266e4f5a0de26dfe727e0a4687f1a0

After upgrading plugin version from 3.4.4 to 3.4.5, did you run flutter pub get ? If so, try cleaning your pub cache then flutter clean and see if it helps.

darshankawar avatar Aug 23 '22 10:08 darshankawar

Hello @darshankawar thanks for your response im still having this issue i have done almost everything and the issue persist

rokipet avatar Aug 24 '22 02:08 rokipet

Can you provide more details as which command are you running that throws this error ? Can you also provide complete error log in properly formatted text along with your pubspec.yaml and flutter doctor -v ?

You mentioned since couple of days back you started to see this issue. Did you upgrade any flutterfire dependency or made any changes in any of your files that started to throw these errors ?

darshankawar avatar Aug 24 '22 09:08 darshankawar

Hey @YosbelGonzalez01. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Sep 02 '22 01:09 google-oss-bot

✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-x64, locale en-US) • Flutter version 3.0.5 at /Users/yosbelgonzalez/Developer/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f1875d570e (7 weeks ago), 2022-07-13 11:24:16 -0700 • Engine revision e85ea0e79c • Dart version 2.17.6 • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at /Users/yosbelgonzalez/Library/Android/sdk • Platform android-33, build-tools 33.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.3

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.70.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.46.0

[✓] Connected device (2 available) • macOS (desktop) • macos • darwin-x64 • macOS 12.4 21F79 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.52

[✓] HTTP Host Availability • All required HTTP hosts are available

• No issues found! yosbelgonzalez@Mac-Pro-de-Yosbel thechurchapp %

rokipet avatar Sep 02 '22 01:09 rokipet

name: thebibleapp description: A new Flutter project. publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.02+02

environment: sdk: ">=2.12.0 <3.0.0"

dependencies: flutter: sdk: flutter

cupertino_icons: ^1.0.4 flutter_icons: git: url: https://github.com/adarsh-technocrat/flutter-icons.git branch: null-safety-migration google_mobile_ads: ^1.1.0 get: ^4.6.5 hive: ^2.2.3 intl: ^0.17.0 shared_preferences: ^2.0.13 loading_animations: ^2.2.0 package_info: ^2.0.2 path_provider: ^2.0.11 provider: ^6.0.2 sqflite: ^2.0.1 url_launcher: ^6.0.17 uuid: ^3.0.5 share: ^2.0.4 flutter_widget_from_html: ^0.8.5 webview_flutter: ^3.0.4 firebase_core: ^1.12.0 firebase_auth: ^3.3.7 firebase_messaging: ^12.0.3 firebase_database: ^9.0.6 cloud_firestore: ^3.1.8

fluttertoast: ^8.0.8 google_maps_flutter: ^2.1.2 geolocator: ^8.2.0 http: ^0.13.4 shimmer: ^2.0.0 modal_bottom_sheet: ^2.0.1 country_code_picker: ^2.0.2

flutter_spinkit: ^5.0.0 flutter_local_notifications: ^9.1.4 cached_network_image: ^3.2.1 chewie: ^1.3.4 video_player: ^2.4.5 equatable: ^2.0.3

flutter_geofire: ^2.0.1

device_info_plus: ^4.0.0 onesignal_flutter: ^3.4.0

dev_dependencies: flutter_test: sdk: flutter json_serializable: ^6.1.4 build_runner: ^2.0.4

#flutter packages pub run flutter_launcher_icons:main flutter_launcher_icons: ^0.9.0 flutter_icons: image_path: "assets/icon/icon.png" android: true ios: true

flutter:

uses-material-design: true

assets: - assets/images/ - assets/databases/ - assets/church.mp4 - assets/prayers.jpg

rokipet avatar Sep 02 '22 01:09 rokipet

Maybe i did a update that i dont remeber this error is only on ios but it does work on android the app

rokipet avatar Sep 02 '22 01:09 rokipet

Thanks for the update. From your pubspec.yaml, I see that you are on a bit older sdk constraint. I suggest you to upgrade it to latest / most recent: sdk: ">=2.17.2 <3.0.0"

Also, please upgrade all your third party plugins to latest because some of them could be using flutterfire dependency which might be conflicting after you upgraded flutterfire plugins, so try running flutter pub upgrade.

Also, are you using dart-only initialization for firebase app ? or using GoogleService-info.plist ?

darshankawar avatar Sep 02 '22 10:09 darshankawar

that didnt reslove the problem here the new one name: thebibleapp description: A new Flutter project. publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.02+02

environment: sdk: ">=2.12.0 <3.0.0"

dependencies: flutter: sdk: flutter

cupertino_icons: ^1.0.4 flutter_icons: git: url: https://github.com/adarsh-technocrat/flutter-icons.git branch: null-safety-migration google_mobile_ads: ^2.0.1 get: ^4.6.5 hive: ^2.2.3 intl: ^0.17.0 shared_preferences: ^2.0.13 loading_animations: ^2.2.0 package_info: ^2.0.2 path_provider: ^2.0.11 provider: ^6.0.2 sqflite: ^2.0.1 url_launcher: ^6.0.17 uuid: ^3.0.5 share: ^2.0.4 flutter_widget_from_html: ^0.8.5 webview_flutter: ^3.0.4 firebase_core: ^1.12.0 firebase_auth: ^3.3.7 firebase_messaging: ^13.0.0 firebase_database: ^9.0.6 cloud_firestore: ^3.1.8

fluttertoast: ^8.0.8 google_maps_flutter: ^2.1.2 geolocator: ^9.0.1 http: ^0.13.4 shimmer: ^2.0.0 modal_bottom_sheet: ^2.0.1 country_code_picker: ^2.0.2

flutter_spinkit: ^5.0.0 flutter_local_notifications: ^9.1.4 cached_network_image: ^3.2.1 chewie: ^1.3.4 video_player: ^2.4.5 equatable: ^2.0.3

flutter_geofire: ^2.0.1

device_info_plus: ^4.0.0 onesignal_flutter: ^3.4.0

dev_dependencies: flutter_test: sdk: flutter json_serializable: ^6.1.4 build_runner: ^2.0.4

#flutter packages pub run flutter_launcher_icons:main flutter_launcher_icons: ^0.10.0 flutter_icons: image_path: "assets/icon/icon.png" android: true ios: true

flutter:

uses-material-design: true

assets: - assets/images/ - assets/databases/ - assets/church.mp4 - assets/prayers.jpg

rokipet avatar Sep 02 '22 22:09 rokipet

I have no idea why is it throwing that error, but feel like it could be related to the dependency conflict between other community plugins you are using.

Can you please provide the entire error log ?

darshankawar avatar Sep 05 '22 11:09 darshankawar

Hey @YosbelGonzalez01. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Sep 14 '22 01:09 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@YosbelGonzalez01 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Sep 23 '22 01:09 google-oss-bot