Closed owowouwu closed 2 years ago
Hmm, so running the same query twice you get different results? But you can reliably replicate the issue? Can you talk a little more on what you do before your queries, such as segment definition and authentication steps order?
Trying to make sure if it's a bug I can fix vs an API issue that needs to be kicked up to Google.
Thanks for the report!
Turns out it was an issue on my end, I was overwritting the viewId somewhere resulting in that garbage being sent through as the view ID.
Sorry for this, I'm feeling kind of stupid now but it is what it is
No worries! It could still be a bug if I can't defensively check what is sent as the viewId - was it a number or string?
I basically did something like this
viewId <- blah
viewId <- google_analytics(...)
viewID was the name of the property I was looking at so I thought it natural to do it this way but obviously it overwrote the actual ID so if I ran the query again it wouldn't work.
So I basically sent through a whole dataframe and it looks like it got turned into that json object I attached in the screenshot.
What goes wrong
When I run a couple of queries everything is fine, but when I go to run a query again with the same view ID I used before I get an error "Unknown name "viewID" at 'report_requests[0]' : Proto field is not repeating, cannot start list".
Steps to Reproduce
I run
then run
same view ID, but different date. Segments are built in GA segments. I will get the error.
Output
Console output with
options(googleAuthR.verbose=2)
- it goes even longer than this and is obviously an invalid payload.Session Info