Remember to specify the plugin name in the title!
Device / Emulator and OS
Please complete the following information for each phone and/or emulator you're experiencing this bug on:
- Device: Android Studio AVD
- Device: Samsung Galaxy S10+ (SM G975F)
- OS: Android 10
NB: Bugs pertaining to old devices/OS versions will likely not be fixed.
Describe the bug
Google Account is requested for authentication, login successfully. Once login has been processed, the device shows a loading screen in two stages:
- Loader contained within a white card, stretching the entire width of the screen, only tall enough to accomodate the loader, centered vertically. Stays in this state for less than 5 seconds.
- Loader contained within a white card, with the loader at the very top of the card. Same width as before except the card is much taller. Stays in this state perpetually unless cancelled by the user using the hardware back button.
The same behaviour is exhibited on both the physical Android device and the Android Emulator.
I have setup the OAuth 2.0 Client ID as per the instuctions. I have attempted to use two different Google Accounts, both of which are listed as Test Users (as my Google API project is still in Testing and awaiting approval).
I am using the test project code provided on the package's page and have tried a range of different combinations of Data Types in my request to no avail.
Interestingly, before I changed the package name on my app to match what the package name is on my Google API OAuth 2.0 Client ID, the behaviour was indentical.
On the physical device, Google Fit is installed and has been setup. On the Android Emulator, you cannot setup Google Fit but I have read that this does not matter as it will pull through dummy data anyway (allegedly).
To Reproduce
Create a Flutter app using the sample code on the package's page. Run the project on either an Android Emulator or physical device. Attempt to load latest Google Fit data and login to a Google Account. Observe the two different loading screens as described above.
Expected behavior
The Google Fit data to be pulled through and displayed, as I have successfully managed to achieve on iOS.
Actual behavior
The two loading screens are displayed as described above, with the latter of the two remaining on the screen perpetually until the hardware back button is pressed.
See the console outpit below. Note that the last line is output shortly after the login dialogue pops up (where you choose a Google Account) and no further output is displayed thereafter:
I/ViewRootImpl@25dde13[MainActivity]( 5564): ViewPostIme pointer 0
I/ViewRootImpl@25dde13[MainActivity]( 5564): ViewPostIme pointer 1
W/ActivityThread( 5564): handleWindowVisibility: no activity for token android.os.BinderProxy@3f7cf1f
D/PhoneWindow( 5564): forceLight changed to true [] from com.android.internal.policy.PhoneWindow.updateForceLightNavigationBar:4274 com.android.internal.policy.DecorView.updateColorViews:1547 com.android.internal.policy.PhoneWindow.dispatchWindowAttributesChanged:3252 android.view.Window.setFlags:1153 com.android.internal.policy.PhoneWindow.generateLayout:2474
I/MultiWindowDecorSupport( 5564): [INFO] isPopOver = false
I/MultiWindowDecorSupport( 5564): updateCaptionType >> DecorView@1167b96[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
D/MultiWindowDecorSupport( 5564): setCaptionType = 0, DecorView = DecorView@1167b96[]
I/ViewRootImpl@129676e[SignInHubActivity]( 5564): setView = com.android.internal.policy.DecorView@1167b96 TM=true MM=false
I/ViewRootImpl@25dde13[MainActivity]( 5564): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager( 5564): prepareNavigationBarInfo() DecorView@46aa177[MainActivity]
Screenshots
The first loading screen which is displayed only momentarily:
The second loading screen which is displayed perpetually:
Flutter doctor
[✓] Flutter (Channel master, 1.26.0-2.0.pre.409, on macOS 11.1 20C69 darwin-x64, locale en-GB)
• Flutter version 1.26.0-2.0.pre.409 at /Users/olliesaer/GitHub/flutter
• Framework revision 3fbe1a5904 (15 minutes ago), 2021-01-19 16:49:03 -0600
• Engine revision 609036f2bf
• Dart version 2.12.0 (build 2.12.0-236.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/olliesaer/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• 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)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.3, Build version 12C33
! CocoaPods 1.8.4 out of date (1.10.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] 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)
[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.18.1
[✓] Connected device (4 available)
• SM G975F (mobile) • R58M23PMKYN • android-arm64 • Android 10 (API 29)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• iPhone 12 Pro Max (mobile) • C125C6E9-4685-4825-A11F-D59FE24AAC14 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.141
! Doctor found issues in 1 category.
Additional information
N/A, however I can provide any information which may help upon request.
bugfix