cancel
Showing results for 
Search instead for 
Did you mean: 

Google Home APIs sample app issues

dbeaven
Community Member

I've been trying to work w/ the new beta Android Google Home APIs but I'm running into issues.

I started w/ the sample app since that seems an obvious first step.
(https://developers.home.google.com/apis/android/sample-app/build).

However, I've not been able to get it to work w/ my Google Cloud OAuth project. I've
been through the entire process at least 3 times and I'm either missing
something or something is missing in the instructions. I've logged an issue
w/ the sample app hoping to get some sort of guidance.
(https://github.com/google-home/google-home-api-sample-app-android/issues/1)

The flow that I see on my end is:

  1. Launch app
  2. App says "permissions state: NOT GRANTED"
  3. Click "Google Home API Sample App" Button
  4. Choose my google account (which has google home set up and is associated w/ my OAuth project)
  5. I never see my Homes listed. I just get a flash on the screen and then the prompt saying "Permissions Result: CANCELLED | User cancelled OAuth consent UI". But I never saw a consent page and I never saw a list of my Homes.

Has anyone outside of Google gotten this sample to work?

Thanks!

1 Recommended Answer

armen_dpe
Solutions Expert
Solutions Expert

Thanks for sharing. This error indicates a manual cancellation action by a developer, or an unmet condition during the authentication flow (such as the network being down). Each application calling the Home APIs must complete OAuth registration from the Google Cloud console as described in the developer guide. Accounts using the APIs must be registered as test users as described, and the apps need to be signed with appropriate keys.

View Recommended Answer in original post

4 REPLIES 4

armen_dpe
Solutions Expert
Solutions Expert

Thanks for sharing. This error indicates a manual cancellation action by a developer, or an unmet condition during the authentication flow (such as the network being down). Each application calling the Home APIs must complete OAuth registration from the Google Cloud console as described in the developer guide. Accounts using the APIs must be registered as test users as described, and the apps need to be signed with appropriate keys.

Thanks for the feedback. I'll provide further info.

  1. There was no manual cancelation as the app user was never presented w/ the option to cancel.
  2. OAuth registration (as described in the instructions) was performed twice from scratch and checked multiple times.
  3. The gmail account being used is listed as a test user.
  4. The app signing key was pulled from Android Studio as described in the instructions.
  5. Also, the app package was renamed as instructed and that package name is used in the OAuth project as instructed.

Probably the biggest issue is that I can't see through debugging where the breakage is. The app doesn't report very useful information and Logcat provides next to nothing pertaining to the error.

As you suggest, I believe there is something wrong in the OAuth flow but I can't find any step that was missed which is why I tend to feel there is something missing or assumed from the instructions.

Thanks for confirmation. Can you please create an issue tracker here with all details and provide the bug id when replying to my message. I will forward your issue to internal teams for further investigation. 

When creating your bug on issue tracker choose Public Trackers > Smart Home for the component and  Home APIs for template. 

HomeApis.png

Thanks for the info on creating an issue. I've created this issue (https://issuetracker.google.com/issues/390272619). I think I attached the log you are looking for. I also went back and triple checked my OAuth settings, SHA1, package name, etc. and it is all correct as far as I can tell.