Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete composer query response for get_entity_id_from_vanity_name #18

Closed
dvmcconnell opened this issue Jul 31, 2019 · 4 comments
Closed
Labels
bug Something isn't working question Further information is requested
Milestone

Comments

@dvmcconnell
Copy link

In get_entity_id_from_vanity_name I was frequently getting an empty list back in json_response['payload']['entries'], so I inspected the json and noticed the lid key. I tried using that when there weren't any 'entries', and everything worked like magic - something like:

    if not json_response['payload']['entries']:
        return json_response['lid']

Not sure if anyone else is having this issue, but thought I would post anyway.

Thanks so much for creating this!

@mobeigi
Copy link
Owner

mobeigi commented Aug 1, 2019

I've had the COMPOSER_QUERY_ENDPOINT fail on me before where it would kind of be rate limited after being hit too quickly. More info in my writeup: http://bit.ly/fb2cal-blogpost

However, this seems like a different issue.
I'm not too sure why the json_response['payload']['entries'] would be empty. Could you dump the entire json_response to file and post it here or email me the payload at me@mobeigi.com. The composer query endpoint should have no sensitive data besides your friends name (value query param).

In either case, falling back to use the json_response['lid'] shouldn't be an issue.

@mobeigi mobeigi added the question Further information is requested label Aug 1, 2019
@dvmcconnell
Copy link
Author

sure here you go

{
  "lid": "6719972747743822150", 
  "__ar": 1, 
  "gkxData": {}, 
  "bootloadable": {}, 
  "qexData": {}, 
  "bxData": {}, 
  "ixData": {}, 
  "payload": {
    "end_of_threads": true, 
    "entries": []
  }
}

@mobeigi
Copy link
Owner

mobeigi commented Aug 1, 2019

@dvmcconnell That isn't right at all. That lid key seems to be related to something entirely different. What has happened here is that an entity id failed to be fetched and your code changes just made it use some arbitrary id which allowed the script to continue instead of causing it to rightfully fail. This will result in duplicate entries in your calendar every time its imported if the calendar UID is not unique for one of your friends.

Issue #2 will help in this scenario. Also the aforementioned limitation of the COMPOSER_QUERY_ENDPOINT is probably what you are facing too. I suggest removing your change and running the original version again, it should work for you after some time. If not more logging via #12 is coming soon.

@dvmcconnell
Copy link
Author

Ah alright, thanks for the info

@mobeigi mobeigi added the bug Something isn't working label Aug 4, 2019
@mobeigi mobeigi changed the title Empty payload entries solution for get_entity_id_from_vanity_name Incomplete composer query response for get_entity_id_from_vanity_name Aug 4, 2019
@mobeigi mobeigi added this to the 1.0.4 milestone Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants