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

Timeout Error #105

Closed
philipk19238 opened this issue Feb 4, 2023 · 1 comment
Closed

Timeout Error #105

philipk19238 opened this issue Feb 4, 2023 · 1 comment

Comments

@philipk19238
Copy link

Describe the bug
A clear and concise description of what the bug is.

I've been experiencing consistent timeouts with the Square API. I have verified the credentials I have been using is correct - including access token, application ID, etc. I also recreated the requests using cURL and the requests library and those requests are timing out as well. (I made sure to ping some other public endpoints as well to ensure it wasn't a network issue on my end)

Here are the logs I get:

File "/backend/./www/www/api/auth_controller.py", line 39, in end_square_oauth_flow
sweetspot-backend-1  |     oauth_client = auth.get_square_client(oauth_end_flow.access_token)
sweetspot-backend-1  |   File "/backend/./common/common/square/auth.py", line 48, in get_square_client
sweetspot-backend-1  |     return Client(access_token, settings.SQUARE_ENVIRONMENT)
sweetspot-backend-1  |   File "/usr/local/lib/python3.8/site-packages/square/client.py", line 228, in __init__
sweetspot-backend-1  |     self.config = Configuration(
sweetspot-backend-1  |   File "/usr/local/lib/python3.8/site-packages/square/configuration.py", line 68, in __init__
sweetspot-backend-1  |     super().set_http_client(self.create_http_client())
sweetspot-backend-1  |   File "/usr/local/lib/python3.8/site-packages/square/configuration.py", line 103, in create_http_client
sweetspot-backend-1  |     return RequestsClient(
sweetspot-backend-1  |   File "/usr/local/lib/python3.8/site-packages/apimatic_requests_client_adapter/requests_client.py", line 45, in __init__
sweetspot-backend-1  |     http_client_instance.timeout = timeout

Expected behavior
I expect the API call to immediately return me a response.

To Reproduce
Steps to reproduce the bug:

  1. Initiate API Client
  2. Pass in Access Token
  3. Make request

Screenshots
If applicable, add screenshots to help explain the bug.

Square SDK version
squareup==25.0.0.20221214

Additional context
Run inside local docker container (Fast API)

@havenwood havenwood added bug Something isn't working and removed bug Something isn't working labels Mar 22, 2023
@havenwood
Copy link
Collaborator

Since this can be reproduced from cURL it seems the issue isn't specific to the SDK and is instead related to some combination of the server environment, network and Square API.

@philipk19238 I'm just closing this issue here since it doesn't appear to be caused by the SDK itself, but if you're having any ongoing issues please join us in https://squ.re/slack or https://developer.squareup.com/forums and we can help debug what's going on with the failed requests.

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

2 participants