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

subscribePresence() fails with 404 #220

Open
truenicoco opened this issue Jan 24, 2023 · 2 comments
Open

subscribePresence() fails with 404 #220

truenicoco opened this issue Jan 24, 2023 · 2 comments

Comments

@truenicoco
Copy link

I haven't managed to determine exactly when/why/how this happens, but this has also been reported by other users of my XMPP gateway based on skpy.
Usually when this happens, I can't subscribe to presences a few hours or days, and then I retry and it just works.
Sending and receiving message do not seem affected by this.

Account type

Old skype account now linked to a microsoft account, login via username/password

Steps to reproduce

Unfortunately, I can't reliably reproduce this issue.

Result or traceback

Traceback (most recent call last):
  File "/venv/lib/python3.9/site-packages/slidge/core/gateway.py", line 594, in _login_wrap
    status = await session.login()
  File "/venv/lib/python3.9/site-packages/slidge/plugins/skype.py", line 154, in login
    self.sk.subscribePresence()
  File "/venv/lib/python3.9/site-packages/skpy/main.py", line 96, in subscribePresence
    self.conn.endpoints["self"].subscribePresence(self.contacts)
  File "/venv/lib/python3.9/site-packages/skpy/conn.py", line 1105, in subscribePresence
    self.subscribe()
  File "/venv/lib/python3.9/site-packages/skpy/conn.py", line 1090, in subscribe
    self.conn("POST", "{0}/users/ME/endpoints/{1}/subscriptions".format(self.conn.msgsHost, self.id),
  File "/venv/lib/python3.9/site-packages/skpy/conn.py", line 237, in __call__
    raise SkypeApiException("{0} response from {1} {2}".format(resp.status_code, method, url), resp)
skpy.core.SkypeApiException: ('404 response from POST https://azwus2-client-s.gateway.messenger.live.com/v1/users/ME/endpoints/SELF/subscriptions', <Response [404]>)
@Terrance
Copy link
Owner

404 is a weird response for this as the HTTP endpoint and the SELF "endpoint" both always exist...

I'm wondering if this is a delayed case of User is in a different cloud -- usually Skype will tell you to use a specific subdomain, which SkPy has handling for but only during sign-in. I'll need to see the response headers/body for this to know what's actually going on though -- if it's an intermittent failure then you may need to leave HTTP debugging on until it happens again (no performance penalty, it's just extra print statements).

@truenicoco
Copy link
Author

Thanks for your reply! I'll turn on debug logs then and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants