简体   繁体   中英

How to stop "keychain access" permission dialog on MacOS when debugging Flutter app on Visual Studio Code?

I had just moved from Android Studio to Visual Studio Code. I'm using Firebase in my app which I debug by running it on MacOS. Every time I do "Start Debugging" on VS code, I get this dialog which I learned to hate by this time. Even if I type my password and click "Always Allow", it still appears next time I start debugging. 在此处输入图像描述

I tried changing Access Control settings in Keychain but that didn't help. The dialog is driving me insane. Any ideas? 在此处输入图像描述

There are several cases when the permissions popup is presented and some of them cannot be fixed on Firebase side.

Could you please provide more details on your workflow:

  • Can you observe Keychain items created by your app with different signing settings? If you remove them, do you still observe the alert?
  • Do you observe the alert if you re-install your app without signing changes?
  • Once you allow access you should not see more alerts. It is the case for you?

Also, Please check the GitHub discussion on #5603 GitHub

You may add the following line to your Podfile for this and try:

pod 'FirebaseInstallations', :git=>'https://github.com/firebase/firebase-ios-sdk.git', :branch=>'master'

Open the Keychain Access app, which is in the the Utilities folder of your Applications folder.

From the list of keychains on the left side of the window, select "login."

From the Edit menu in the menu bar, choose “Change Password for Keychain 'login.'”

Enter the old password of your user account in the Current Password field. This is the password you were using before the password was reset.

Enter the new password of your user account in the New Password field. This is the password you're now using to log in to your Mac. Enter the same password in the Verify field.

Click OK when done, then quit Keychain Access.

After stealing a solid 3 days from my life, fixed for me with the following:

  • Created a new project on Firebase for the macOs client.
  • Added the GoogleService-Info.plist as described in the FlutterFire docs. [https://firebase.flutter.dev/docs/manual-installation/macos/]

When I revert this one commit with this only change and rebuild, the permissions dialog comes back immediately.

For those who want to replicate my working configuration, I use the following packages Google Sign In and Firebase Auth:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM