Can't login using firebase_app_distribution_login
RalfK92 opened this issue ยท 6 comments
Issue Description
When i try to use the firebase_app_distribuition_login function the link that is generated returns a 400 response code in the browser. I have tested it on my Macbook on our Mac Mini Build Server and a colleague at my company is having the issue.
Configuration
bundle exec fastlane run firebase_app_distribution_login --verbose
Complete verbose output
[โ] ๐
DEBUG [2022-04-12 11:13:37.70]: Checking if there are any plugins that should be loaded...
DEBUG [2022-04-12 11:13:37.70]: Loading 'fastlane-plugin-appicon' plugin
INFO [2022-04-12 11:13:37.70]: gem 'fastlane-plugin-appicon' is already installed
DEBUG [2022-04-12 11:13:37.71]: Loading 'fastlane-plugin-firebase_app_distribution' plugin
INFO [2022-04-12 11:13:37.71]: gem 'fastlane-plugin-firebase_app_distribution' is already installed
+-------------------------------------------+---------+------------------------------------------------+
| Used plugins |
+-------------------------------------------+---------+------------------------------------------------+
| Plugin | Version | Action |
+-------------------------------------------+---------+------------------------------------------------+
| fastlane-plugin-appicon | 0.16.0 | android_appicon, appicon |
| fastlane-plugin-firebase_app_distribution | 0.3.3 | firebase_app_distribution_login, |
| | | firebase_app_distribution_add_testers, |
| | | firebase_app_distribution_get_udids, |
| | | firebase_app_distribution, |
| | | firebase_app_distribution_get_latest_release, |
| | | firebase_app_distribution_remove_testers |
+-------------------------------------------+---------+------------------------------------------------+
objc[27891]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1e52d5eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1040904f8). One of the two will be used. Which one is undefined.
objc[27891]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1e52d5f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104090548). One of the two will be used. Which one is undefined.
objc[27891]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1e52d5f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104090598). One of the two will be used. Which one is undefined.
objc[27891]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x1e52d5fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1040905e8). One of the two will be used. Which one is undefined.
objc[27891]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x1e52d5ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104090638). One of the two will be used. Which one is undefined.
objc[27891]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x1e52d6040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104090688). One of the two will be used. Which one is undefined.
Successfully loaded Appfile at path '/Users/ralfkralicek/Coding/Work/appname-ios/fastlane/Appfile'
- app_identifier: 'bundleIdentifer'
- apple_id: 'email'
- team_id: 'teamid'
- itc_team_id: 'itc
-------
INFO [2022-04-12 11:13:37.81]: ---------------------------------------------
INFO [2022-04-12 11:13:37.81]: --- Step: firebase_app_distribution_login ---
INFO [2022-04-12 11:13:37.81]: ---------------------------------------------
INFO [2022-04-12 11:13:37.82]: Open the following address in your browser and sign in with your Google account:
INFO [2022-04-12 11:13:37.82]: https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&include_granted_scopes=true&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/cloud-platform
INFO [2022-04-12 11:13:37.82]:
[2022-04-12 11:13:37.82]: Enter the resulting code here:
Environment
Library | Version |
---|---|
fastlane | 2.2.6 |
fastlane-plugin-firebase_app_distribution | 0.3.3 |
Hi @RalfK92 - thanks for the report and sorry for the inconvenience. We are working on a fix for this but in the meantime a workaround is to use one of the other two authentication methods listed here: https://firebase.google.com/docs/app-distribution/ios/distribute-fastlane#authenticate. We will report back when we have an update.
@RalfK92 we've released a pre-release version 0.3.4.pre.1
of our fastlane plugin with a fix for the login issue. Feel free to use this version in the meantime. We plan to ship a new 0.3.4
version with the fix by the end of the week.
@tagboola @lfkellogg thanks for the fast replies. I will try to your proposed solutions tomorrow.
@tagboola i tried the 0.3.4.pre.1 release.
`bundle exec fastlane run firebase_app_distribution_login
[โ] ๐
+-------------------------------+-------------+-------------------------------+
| Used plugins |
+-------------------------------+-------------+-------------------------------+
| Plugin | Version | Action |
+-------------------------------+-------------+-------------------------------+
| fastlane-plugin-appicon | 0.16.0 | android_appicon, appicon |
| fastlane-plugin-firebase_app | 0.3.4.pre.1 | firebase_app_distribution_lo |
| _distribution | | gin, |
| | | firebase_app_distribution_ad |
| | | d_testers, |
| | | firebase_app_distribution_ge |
| | | t_udids, |
| | | firebase_app_distribution, |
| | | firebase_app_distribution_ge |
| | | t_latest_release, |
| | | firebase_app_distribution_re |
| | | move_testers |
+-------------------------------+-------------+-------------------------------+
08:28:04: --- Step: firebase_app_distribution_login ---
08:28:04: ---------------------------------------------
08:28:04: Open the following address in your browser and sign in with your Google account:
08:28:04: https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&include_granted_scopes=true&redirect_uri=http://localhost:8081&response_type=code&scope=https://www.googleapis.com/auth/cloud-platform&state=cac6fdb47daa665e0114bfc9076f70a3`
After copying the link into my browser i was able to select the google account but was then faced another error.
EDIT: After opening the link in Chrome the login worked. The error happened in Firefox
Hmm weird you received that error with Firefox. We tested the flow on Firefox and it seems to be working fine ๐ค
Did the login flow work for you on Firefox before it was broken? The new flow does require connecting to localhost
now. I wonder if there is a setting or extension that is preventing this. When you have a chance, can you try logging in with Firefox in troubleshoot mode?
What you guessed is actually true. I'm using a plugin to automatically remove tracking elements from URLs.
https://addons.mozilla.org/en-US/firefox/addon/clearurls/
Seems there is a percentage encoding stuff going on which leads to the error.
Pasting this into my browser the plugin enabled,
https://accounts.google.com/o/oauth2/auth ?access_type=offline &approval_prompt=force &client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com &include_granted_scopes=true &redirect_uri=http://localhost:8081 &response_type=code &scope=https://www.googleapis.com/auth/cloud-platform &state=b0838f27746e151994b08f82334450ac
produces this url:
https://accounts.google.com/o/oauth2/auth ?access_type=offline &approval_prompt=force &client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com &include_granted_scopes=true &redirect_uri=http%3A%2F%2Flocalhost%3A8081 &response_type=code &scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform &state=b0838f27746e151994b08f82334450ac
So no problem on your side. Thanks for your help.