Flutter错误:FIROAuthProvider credentialWithProviderID:提供者

问题描述 投票:1回答:1

我有一个内置的应用程序,想添加firebase_auth和cloud_firestore。它曾经工作得很顺利。然后,将以下两行添加到pubspec.yaml中:

  firebase_auth: ^0.15.4
  cloud_firestore: ^0.13.0+1

然后运行软件包。不执行任何其他操作,如果我运行我的项目,则会出现以下错误:

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                           132.2s
Failed to build iOS app
Error output from Xcode build:
↳
    2020-01-31 14:17:56.015 xcodebuild[41367:4940394]  DTDeviceKit: deviceType from 00008006-0007354C3EFA002E was NULL
    2020-01-31 14:17:57.763 xcodebuild[41367:4940338] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fbdeb156390), Baseduo, iPhone, 13.3.1 (17D5050a), 4be1310269eaf14dd153c6def229bddceaeebbe6> == Underlying device preparation errors ==
    2020-01-31 14:17:57.763 xcodebuild[41367:4940338] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fbdeb156390), Baseduo, iPhone, 13.3.1 (17D5050a), 4be1310269eaf14dd153c6def229bddceaeebbe6> -- Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
    Domain: com.apple.platform.iphoneos
    Code: 5
    Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <DVTPlatform:0x7fbde662bd20:'com.apple.platform.iphoneos':<DVTFilePath:0x7fbde662bca0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>. DTDKDeviceIdentifierIsIDID: 0
    --
    2020-01-31 14:17:57.763 xcodebuild[41367:4940338] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fbdeb156390), Baseduo, iPhone, 13.3.1 (17D5050a), 4be1310269eaf14dd153c6def229bddceaeebbe6> == END: Underlying device preparation errors ==
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/Baseduo/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.15.4/ios/Classes/FLTFirebaseAuthPlugin.m:505:38: error: no known class method for selector 'credentialWithProviderID:IDToken:rawNonce:accessToken:'
          credential = [FIROAuthProvider credentialWithProviderID:provider
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/Baseduo/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.15.4/ios/Classes/FLTFirebaseAuthPlugin.m:514:38: error: no known class method for selector 'credentialWithProviderID:IDToken:rawNonce:'
          credential = [FIROAuthProvider credentialWithProviderID:provider
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2 errors generated.
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    Command CompileSwift failed with a nonzero exit code
    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.

Flutter Doctor也没有任何响应:

/Users/Baseduo/Developer/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.15.2 19C57, locale en-TR)
    • Flutter version 1.12.13+hotfix.7 at /Users/Baseduo/Developer/flutter
    • Framework revision 9f5ff2306b (4 days ago), 2020-01-26 22:38:26 -0800
    • Engine revision a67792536c
    • Dart version 2.7.0

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at /Users/Baseduo/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.0.beta.2

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (2 available)
    • Baseduo             • 4be1310269eaf14dd153c6def229bddceaeebbe6 • ios • iOS 13.3.1
    • iPhone 11 Pro Max • 954398E8-1CB7-4189-B2E6-84E9F87BB94A     • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)

! Doctor found issues in 1 category.
Process finished with exit code 0

我无法采取任何措施来解决该问题,感谢您的回答。

谢谢,

ps:我在其他应用程序中使用了相同的操作,没有问题。

ps2:适用于Android模拟器。

ios firebase android-studio flutter ios-simulator
1个回答
0
投票

在ios目录中运行pod update可解决此问题(至少直到下一次)。参见this bug report

© www.soinside.com 2019 - 2024. All rights reserved.