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

Provide a page referencing API Error codes and messages with sitiations where they might be encountered #61

Open
senthilmk opened this issue Sep 7, 2020 · 7 comments

Comments

@senthilmk
Copy link

Whenn I try and send an SMS, I enounter this message. I could not find any information on the signarlwire site.

WARNING:root:relay.signalwire.com seems down..
INFO:root:Connection closed..

@lpradovera
Copy link
Collaborator

I assume you are using Relay. It also looks like the error message is clear on what is happening.
Have you checked you have the correct Space URL?

@senthilmk
Copy link
Author

Well, if the space url is incorrect, should there be a message indicating it rather than a weird message indicating some endpoint being down?

@edolix
Copy link
Contributor

edolix commented Sep 8, 2020

Hi @senthilmk, can you share a code snippet to help me reproduce the error please? You can include the Python version and environment too.
Thanks!

@WilliamOConnell
Copy link

Sorry to resurrect this but I'm having the same issue. @lpradovera mentioned something about a Space URL, where would that be passed to the library? I'm struggling to find any reference to that in the docs.

I'm using code very similar to this example and getting the error when calling consumer.run(). Digging into the code I see an error on line 88 of client.py:

Cannot connect to host relay.signalwire.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')]

@WilliamOConnell
Copy link

From what I can tell, the issue is that aiohttp is using an incomplete/outdate set of root certificates. This can be resolved by passing the bundle from certifi in connection.py:

async def connect(self):
  logging.debug('Connecting to: {0}'.format(self.host))
  ssl_context = ssl.create_default_context(cafile=certifi.where())
  self.ws = await self._session.ws_connect(self.host, ssl_context=ssl_context)

Happy to make a PR for it if that'd be helpful, I'm not sure if there's a better solution though.

@edolix
Copy link
Contributor

edolix commented Feb 14, 2023

Hey @WilliamOConnell!

I made some tests and i'm not seeing the CERTIFICATE_VERIFY_FAILED error. Can you give it another shot and also share more infos about your environment (SDK/python version / OS)?

FYI: the Space URL is out of context for this issue.

Thanks!

@WilliamOConnell
Copy link

I'm using Python 3.10 on Windows 10 (x64). Signalwire package version 2.0.4. When I run it I get the WARNING:root:relay.signalwire.com seems down.. message but with a debugger I can see that it's catching an SSL error.

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

No branches or pull requests

4 participants