google / loaner

Automated Chromebook loaner management
Apache License 2.0
170 stars 63 forks source link

No variant found for unrecognized field: tags Error #91

Closed winnie-lam closed 4 years ago

winnie-lam commented 4 years ago

Hi @helfrichmichael,

I upgraded to the master version of the code and now I'm receiving an error statement saying "No variant found for unrecognized field: tags" when trying to audit a device. How do I resolve this?

Thank you!

helfrichmichael commented 4 years ago

Can you grab any relevant errors from the Chrome Developer Tools Console and also from Google Cloud Platform logging? You should see an HTTP request with a bit more information about the error in GCP logging a few seconds after it fails to audit.

Additionally, have you ensured that every app engine service (action-system, chrome, default, and endpoints) are serving the latest version that you deployed?

My best guess right now is you don't have a datastore kind of "Tag", but that's a ballpark guess without any logs. If you're able to provide the HTTP request of the audit from the network tab of the Chrome Devtools as well, that might be useful too, but please blur/remove any sensitive information such as email, serial number, device id, etc.

winnie-lam commented 4 years ago

Hi @helfrichmichael ,

Thanks for the reply! Here are the logs you requested. I see a different error message in the log now. I would get "AttributeError: 'NoneType' object has no attribute 'sort'" GCP Logging Chrome Developer Tool Console Network Log Chrome Developer Tool Console Log

winnie-lam commented 4 years ago

Hi,

I was wondering if this issue would be the cause of not being able to audit devices. I would get an internal server error when trying to audit a device. When I went into the logs to check what the bug was, I would see the error stated above.

Please advise. Thank you!

helfrichmichael commented 4 years ago

Reviewing that error, it appears you might be missing some CoreEvents. In GCP, go to Datastore, and select the 'CoreEvent' kind from the dropdown.

Your events should match up to this:

Screen Shot 2020-03-10 at 9 32 18 PM

If they don't you can attempt to adjust or take a screenshot and we can poke at this further.

winnie-lam commented 4 years ago

@helfrichmichael - It looks like I was missing the device_audit. I just created the entity and it looks like it works now. Thank you so much for your help!

helfrichmichael commented 4 years ago

Awesome! I'm glad to hear that fixed it for you!