question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python API fails on a call to /api/v2/reflection/api-methods with "Can not find message descriptor by type_url: type.googleapis.com/ApiListApproverSuggestionsArgs"

See original GitHub issue

This is a strange issue. GRR 3.2.4.5.

curl -v http://localhost:8000/api/v2/reflection/api-methods results in this:

> GET /api/v2/reflection/api-methods HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.47.0
> Accept: */*
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Date: Tue, 23 Apr 2019 18:02:06 GMT
< Server: WSGIServer/0.1 Python/2.7.12
< Content-Type: application/json; charset=utf-8
< Content-Length: 221603
< Content-Disposition: attachment; filename=response.json
< X-Content-Type-Options: nosniff
< X-API-Method: ListApiMethods
< X-No-Log: True
< Set-Cookie: csrftoken=$ATOKEN; Expires=Wed, 24-Apr-2019 04:02:06 GMT; Max-Age=36000; Path=/
< 
)]}'
{"items": [{"category":

note the )]}' returned as the first 4 bytes of the response. This breaks the GRR Python API client because it can’t parse the return. If I use the raw API shell, it seems to succeed.

Any idea what’s going on here?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
mbushkovcommented, Apr 23, 2019

Sure, glad I could help 😃 We should output a warning message in the grr-api-client if we detect a newer server version (created an issue for this: https://github.com/google/grr/issues/686).

0reactions
atkinsjcommented, Apr 23, 2019

Aha, I upgraded the server to 3.2.4.6 but didn’t think about the Python library. I was running:

grr-api-client==3.2.4.post3
grr-response-proto==3.2.4.post3

upgrading to grr-api-client-3.2.4.post6 resolved it.

Thanks for the handholding. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attribute error DESCRIPTOR while trying to convert google ...
This does not really answer my question but I find that one way to solve it and access the protobuf object is to...
Read more >
Package google.protobuf | Protocol Buffers
Api is a light-weight descriptor for a protocol buffer service. Field name, Type, Description. name, string, The fully qualified name of ...
Read more >
Docs · beta/wellknowntypes - Buf.build
Any contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides ......
Read more >
google.protobuf.descriptor — Protocol Buffers 4.21.1 ...
Descriptors essentially contain exactly the information found in a .proto file, ... Fully-qualified name of this protocol message type, which will include ...
Read more >
Namespace Google.Protobuf.WellKnownTypes (3.15.8)
The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found