flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

[FIREBASE_AUTH] 'UserAgent.h' file not found flutter firebase iOS

Open expertdevs opened this issue 6 years ago • 54 comments

I am working on flutter application with firebase, when i use the firebaseAuth plugin application give the following error

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                           131.2s
Failed to build iOS app
Error output from Xcode build:
↳
2020-02-28 16:05:06.832 XCBBuildService[68423:382033] Failed to remove: 
/Users/apple/Library/Developer/Xcode/DerivedData/Runner- hfqwisipukhnqobtbsvjhfltdbgs/Build/Intermediates.noindex/XCBuildData/1be627f6c729f1a388e5fec96804d392-manifest.xcbuild: unlink(/Users/apple/Library/Developer/Xcode/DerivedData/Runner-hfqwisipukhnqobtbsvjhfltdbgs/Build/Intermediates.noindex/XCBuildData/1be627f6c729f1a388e5fec96804d392-manifest.xcbuild): No such file or directory (2)
2020-02-28 16:05:07.269 XCBBuildService[68423:382033] Failed to remove: /Users/apple/Library/Developer/Xcode/DerivedData/Runner-hfqwisipukhnqobtbsvjhfltdbgs/Build/Intermediates.noindex/XCBuildData/1be627f6c729f1a388e5fec96804d392-desc.xcbuild: unlink(/Users/apple/Library/Developer/Xcode/DerivedData/Runner-hfqwisipukhnqobtbsvjhfltdbgs/Build/Intermediates.noindex/XCBuildData/1be627f6c729f1a388e5fec96804d392-desc.xcbuild): No such file or directory (2)
* BUILD FAILED *


Xcode's output:
↳
/Users/apple/Library/Android/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.15.5+2/darwin/Classes/FLTFirebaseAuthPlugin.m:7:9: fatal error: 'UserAgent.h' file not found
#import "UserAgent.h"
        ^~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

i using these libraries-

firebase_auth: 0.15.5+2
firebase_storage: ^3.1.1
cloud_firestore: ^0.13.4

anyone have idea how to solve this error?, i have already done following things

flutter clean
deleted podfile.lock
deleted pods folder
pod deintegrate
pod repo update
pod install

but don't help me to solve this error

expertdevs avatar Feb 28 '20 10:02 expertdevs

Having the same issue.

coredeveloper avatar Feb 28 '20 10:02 coredeveloper

firebase_auth: 0.15.4 <- this helped to solve the issue for a while (while devs a busy digging).

coredeveloper avatar Feb 28 '20 11:02 coredeveloper

Me too. It seems firebase_core 0.4.4+2 is the culprit. Forcing the old version:

  firebase_core: 0.4.4 # do NOT use ^ !

Fixed to the build for me.

knaeckeKami avatar Feb 28 '20 11:02 knaeckeKami

i didnot receive otp for web mobile authentication

motorahul avatar Feb 28 '20 11:02 motorahul

I changed dependencies. try this.

dependencies: 
  firebase_auth: 0.15.3
dependency_overrides:
  firebase_core: 0.4.4

Don't use ^ in version.

woody-kim avatar Feb 28 '20 11:02 woody-kim

Nothing happened no OTP again

On Fri, 28 Feb 2020, 17:22 Woody Kim, [email protected] wrote:

I changed dependencies. try this.

dependencies: firebase_auth: 0.15.3dependency_overrides: firebase_core: 0.4.4

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FirebaseExtended/flutterfire/issues/2084?email_source=notifications&email_token=AKMFHNX3J6Q4A67IWP3B2LTRFD3JNA5CNFSM4K5N2NV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENIIVZY#issuecomment-592480999, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKMFHNVZ4KVEZTHFNC5DM6TRFD3JNANCNFSM4K5N2NVQ .

motorahul avatar Feb 28 '20 14:02 motorahul

I'm having this issue related to Cloud Firestore. Can confirm using firebase_core: 0.4.4 "fixes" the issue. Thank you everyone for posting this so timely, y'all saved my butt!

zachary-russell avatar Feb 28 '20 14:02 zachary-russell

I used for phone authentication flutter web In case of mobile I received the OTP , but for web didn't get , having same code base

On Fri, 28 Feb 2020, 20:12 Zachary Russell, [email protected] wrote:

I'm having this issue related to Cloud Firestore. Can confirm using firebase_core: 0.4.4 "fixes" the issue. Thank you everyone for posting this so timely, y'all saved my butt!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FirebaseExtended/flutterfire/issues/2084?email_source=notifications&email_token=AKMFHNVYTYFYIATB4P2O3LLRFEPF7A5CNFSM4K5N2NV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENIX25I#issuecomment-592543093, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKMFHNWA2TFCYHMITXHCBPDRFEPF7ANCNFSM4K5N2NVQ .

motorahul avatar Feb 28 '20 15:02 motorahul

I am transitively using firebase_core: 0.4.4, but still have the build issue.

Running Xcode build...                                                  
                                                   
Xcode build done.                                            9.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/anthony/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.15.5+2/darwin/Classes/FLTFirebaseAuthPlugin.m:7:9: fatal error: 'UserAgent.h' file not found
    #import "UserAgent.h"
            ^~~~~~~~~~~~~
    1 error generated.

My flutter pub deps show:

    |-- cloud_firestore 0.13.4
    |   |-- cloud_firestore_platform_interface 1.1.0
    |   |   |-- collection...
    |   |   |-- firebase_core...
    |   |   |-- flutter...
    |   |   |-- meta...
    |   |   '-- plugin_platform_interface 1.0.2
    |   |       '-- meta...
    |   |-- cloud_firestore_web 0.1.1
    |   |   |-- cloud_firestore_platform_interface...
    |   |   |-- firebase 7.2.1
    |   |   |   |-- http...
    |   |   |   |-- http_parser...
    |   |   |   '-- js...
    |   |   |-- firebase_core...
    |   |   |-- flutter...
    |   |   |-- flutter_web_plugins 0.0.0
    |   |   |   |-- collection...
    |   |   |   |-- flutter...
    |   |   |   |-- meta...
    |   |   |   |-- typed_data...
    |   |   |   '-- vector_math...
    |   |   |-- http_parser 3.1.3
    |   |   |   |-- charcode...
    |   |   |   |-- collection...
    |   |   |   |-- source_span...
    |   |   |   |-- string_scanner...
    |   |   |   '-- typed_data...
    |   |   |-- js 0.6.1+1
    |   |   '-- meta...
    |   |-- firebase_core 0.4.4
    |   |   |-- firebase_core_platform_interface 1.0.3
    |   |   |   |-- flutter...
    |   |   |   |-- meta...
    |   |   |   '-- quiver...
    |   |   |-- firebase_core_web 0.1.1+2
    |   |   |   |-- firebase...
    |   |   |   |-- firebase_core_platform_interface...
    |   |   |   |-- flutter...
    |   |   |   |-- flutter_web_plugins...
    |   |   |   |-- js...
    |   |   |   '-- meta...
    |   |   |-- flutter...
    |   |   '-- meta...
    |   |-- flutter...
    |   '-- meta...

awhitford avatar Feb 29 '20 01:02 awhitford

Rolling back firebase_auth to 0.15.4 worked for me. I'm not exactly certain which version broke, but 0.15.4 works and 0.15.5+2 does not.

awhitford avatar Feb 29 '20 03:02 awhitford

i have some problem with OTP can't sent in some time

athlona64 avatar Feb 29 '20 07:02 athlona64

Even after rolling back firebase_auth to 0.15.4 I'm getting this error

/Users/divyanshubhargava/workspace/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.15.5+2/darwin/Classes/FLTFirebaseAuthPlugin.m:7:9: fatal error: 'UserAgent.h' file not found
    #import "UserAgent.h"

divyanshub024 avatar Feb 29 '20 07:02 divyanshub024

@divyanshub024 please remember to remove the ^ before the version -- because you don't want to accept the newer version; and you may need to flutter clean too before building.

awhitford avatar Feb 29 '20 07:02 awhitford

@awhitford Oh I missed that. It was taking newer because of ^. Thanks a lot for the help.

divyanshub024 avatar Feb 29 '20 07:02 divyanshub024

I changed dependencies. try this.

dependencies: 
  firebase_auth: 0.15.3
dependency_overrides:
  firebase_core: 0.4.4

Thanks for your solution, it solved mine too

ViniciusSossela avatar Feb 29 '20 20:02 ViniciusSossela

@athlona64 am also have the same issue with an app using OTP. It was working fine previously doe.

pojoba02 avatar Feb 29 '20 22:02 pojoba02

I also ran into the issue as well, for now my dependencies are dependencies: firebase_auth: ^0.15.4 firebase_core: ^0.4.4 doesn't seem to work even though earlier I had no issues

Edit: working now removed all " ^ " from the front of the number in pubspec.yaml

Pedro1Torres avatar Mar 01 '20 06:03 Pedro1Torres

The same issue. Rollback to older versions is working.

ikarelin avatar Mar 01 '20 13:03 ikarelin

I did not get OTP for flutter web authentication using flutter for mobile number I tried everything plz help me

On Sun, 1 Mar 2020, 18:54 Igor Karelin, [email protected] wrote:

The same issue. Rollback to older versions is working.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FirebaseExtended/flutterfire/issues/2084?email_source=notifications&email_token=AKMFHNSG7DNPCJUQKP5WKZDRFJOZXA5CNFSM4K5N2NV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENM7CDY#issuecomment-593096975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKMFHNR6Y3755MVBQOM3FZTRFJOZXANCNFSM4K5N2NVQ .

motorahul avatar Mar 02 '20 01:03 motorahul

@woody-kim thanks, you solution worked

expertdevs avatar Mar 02 '20 05:03 expertdevs