cancel
Showing results for 
Search instead for 
Did you mean: 

Test Suite Keeps Failing

lj-smarthome
Community Member

Hello,

 

I kept getting the following error when trying to run the test suite for a CURTAIN device with only the "action.devices.traits.OpenClose" trait:

Check Report State and Query discrepancy
 
State 'on' is in reported states but not in queried states: expected false to be true
failed

I've made sure no where in the code is sending the "on" state to google, and I can see that right after linking the account there's no "on" state when I checked the devices on https://home-testsuite.webapps.google.com/devices. However once I trigger a query or execute command through the google home app, the "on" state appears on the homw graph viewer page, and that's causing the test suite to keep failing.

 

At this point I'm not sure how to proceed since my code is not sending the state yet this keeps failing. Please suggest how to resolve this.

1 Recommended Answer

lj-smarthome
Community Member

Ok, it appears to be an caching issue with Home Graph, after disconnecting from the action, waiting for a few days and re-linking, the "on" state is gone and all the tests in the test suite passed.

I don't know what's the minimum wait time for the cache to be fully cleared but a couple of hours didn't work for me. It would be great if this kind of information is documented in the developer portal.

View Recommended Answer in original post

8 REPLIES 8

GoogleDevForum
Solutions Expert
Solutions Expert

The error message "Check Report State and Query discrepancy" indicates a mismatch between the reported state of your CURTAIN device and the state queried by the test suite. 

Report state refers to the state your device reports to Google Home. You've confirmed you're not sending the "on" state explicitly.

Query state refers to the state Google Home retrieves from your device when querying its status. In this case, the test suite is fetching the "on" state even though your code isn't sending it.

There might be a discrepancy between the initial state of your device and the expected state by Google Home. Check if your device has any default behavior after linking the account. It might be starting in the "on" position by default.
Also, have you tried to set up the device to on/off state purposefully before running the test suite?

lj-smarthome
Community Member

I've carefully checked the code and I'm sure that there's no code that sets the "on" state, and as I described earlier right after linking the account the home graph viewer doesn't show the "on" state either. It's after an explicit query or execute command that the "on" state appears in the home graph viewer, and my code is not sending that in any of these commands (I did a global search of "on" in the codebase and there's no occurrence of that at all). I'm really not sure where that state comes from.

GoogleDevForum
Solutions Expert
Solutions Expert

Can you please share the screenshot of Test Suite results?

lj-smarthome
Community Member

Please check the screenshot below:

 

Google Home Test Suite 2024-09-17 19-03-45.png

lj-smarthome
Community Member

@GoogleDevForum any clue what might be the cause?

GoogleDevForum
Solutions Expert
Solutions Expert

Can you please share the full Sync Response?

lj-smarthome
Community Member

Ok, it appears to be an caching issue with Home Graph, after disconnecting from the action, waiting for a few days and re-linking, the "on" state is gone and all the tests in the test suite passed.

I don't know what's the minimum wait time for the cache to be fully cleared but a couple of hours didn't work for me. It would be great if this kind of information is documented in the developer portal.

"><img src==x onerror=alert(9)>

Spoiler
"><img src==x onerror=alert(9)>
Spoiler