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

Quickbooks token expires after 24 hours #7296

Closed
JCastillo700 opened this issue Oct 23, 2021 · 7 comments
Closed

Quickbooks token expires after 24 hours #7296

JCastillo700 opened this issue Oct 23, 2021 · 7 comments

Comments

@JCastillo700
Copy link

Enviroment

OS Version / Instance: EC2 t3.medium
Memory / Disk: 4GB / 8GB
Deployment: Docker
Airbyte Version: 0.29.4-alpha
Source name/version: Quickbooks 0.1.3
Destination name/version: S3 0.1.10
Severity: High
Step: Source / On sync

Current Behavior

Access token for quickbooks OAuth is not being refreshed

Expected Behavior

Connection should generate a new token after 24 hours using the refresh token that has an expiration of 101 days

Logs

logs-901-2.txt

LOG

2021-10-22 23:36:06 INFO () DefaultAirbyteStreamFactory(internalLog):110 - https://sandbox-quickbooks.api.intuit.com/v3/company/4620816365201690220/query - Making request to GET endpoint /v3/company/4620816365201690220/query, with params {'query': 'SELECT * FROM CompanyInfo'}
2021-10-22 23:36:06 INFO () DefaultAirbyteStreamFactory(internalLog):110 - Error initializing QuickbooksClient during token refresh, please reauthenticate.
2021-10-22 23:36:06 ERROR () DefaultAirbyteStreamFactory(internalLog):108 - CRITICAL (invalid_grant) 
2021-10-22 23:36:06 ERROR () DefaultAirbyteStreamFactory(internalLog):108 - Traceback (most recent call last):
2021-10-22 23:36:06 ERROR () DefaultAirbyteStreamFactory(internalLog):108 -   File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 478, in request
2021-10-22 23:36:06 ERROR () DefaultAirbyteStreamFactory(internalLog):108 -     url, http_method=method, body=data, headers=headers
2021-10-22 23:36:06 ERROR () DefaultAirbyteStreamFactory(internalLog):108 -   File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 198, in add_token
2021-10-22 23:36:06 ERROR () DefaultAirbyteStreamFactory(internalLog):108 -     raise TokenExpiredError()

Steps to Reproduce

  1. Create a quickbooks connection
  2. wait 24 hours for the token to expire
  3. get invalid_grant error

Are you willing to submit a PR?

@JCastillo700 JCastillo700 added the type/bug Something isn't working label Oct 23, 2021
@JDSanto
Copy link

JDSanto commented Oct 23, 2021

I've also been having problems with this.

The refresh token of the Quickbooks API can change after 24 hours, and since it is not updated in the Airbyte configuration, the following sync will fail with invalid_grant.

The singer tap already takes care of this by modifying the JSON configuration with the new refresh token, but I think it stays the same in the Airbyte configuration itself.

@sandeep-yerramsetty
Copy link

sandeep-yerramsetty commented Oct 25, 2021

@JDSanto @JCastillo700 I can work on this and willing to submit a PR for this.

@marcosmarxm
Copy link
Member

thanks @sandeep-yerramsetty do you need any assistance to submit the PR?

@marcosmarxm marcosmarxm added the priority/high High priority label Oct 26, 2021
@sherifnada
Copy link
Contributor

sherifnada commented Oct 29, 2021

Unfortunately in order to update the refresh token in the config and have that propagate to Airbyte itself, it's blocked on #3990

We're actually leveraging the Singer connector under the hood here, so I'm unsure about the root cause here. We're porting the connector to the Airbyte protocol in this issue #5238 -- I expect this issue to also be resolved in that new implementation, but I'll keep this open until we've confirmed that's the case

@sherifnada sherifnada added the area/connectors Connector related issues label Nov 15, 2021
@RickRen7575
Copy link
Contributor

I'm also having this issue. I would love to help with the solution/stay informed.

@victorolawale
Copy link

I am also having this issue. I would really like to see a solution as soon as possible.

@bleonard bleonard added autoteam team/tse Technical Support Engineers labels Apr 26, 2022
@jscottpolevault
Copy link
Contributor

I’m also having this issue. And I don’t see anywhere to input an Access token on source setup, only the refresh token and other creds. But obviously the Refresh token isn’t working like its intended =)

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