[destination-hubspot] OAuthAuthenticator never refreshes expired tokens
- Vorherrschende Sprache
- Python
- Sterne
- 22.1k
- Forks
- 5.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
### Connector Name
destination-hubspot
### Connector Version
0.0.10
### What step the error happened?
During the sync
### Relevant information
### Problem
OAuthAuthenticator.isTokenExpired() is hardcoded to return false. The token is fetched once and never refreshed. HubSpot OAuth tokens expire after 30 minutes, causing destination-hubspot syncs to fail with 401 at the 30-minute mark.
`The OAuth token used to make this call expired 0 second(s) ago.`
### Relevant log output
```shell
2026-03-10 16:04:42 destination ERROR DefaultDispatcher-worker-2 i.a.c.l.t.DestinationTaskLauncher$WrappedTask(execute):129 Caught exception in task LoadPipelineStepTask(DlqLoaderAccumulator, part=0) java.lang.IllegalStateException: Invalid response with status code 401 while starting ingestion: {"status":"error","message":"The OAuth token used to make this call expired 0 second(s) ago.","correlationId":"019cd9fe-d093-7d4f-99bc-45975fdcf7c6","category":"EXPIRED_AUTHENTICATION","context":{"expire time":["2026-03-10T23:04:41.164Z"]}}
at io.airbyte.integrations.destination.hubspot.HubSpotState.flush(HubSpotLoader.kt:86) ~[io.airbyte.airbyte-integrations.connectors-destination-hubspot.jar:?]
at io.airbyte.integrations.destination.hubspot.HubSpotLoader.accept(HubSpotLoader.kt:159) ~[io.airbyte.airbyte-integrations.connectors-destination-hubspot.jar:?]
at io.airbyte.integrations.destination.hubspot.HubSpotLoader.accept(HubSpotLoader.kt:137) ~[io.airbyte.airbyte-integrations.connectors-destination-hubspot.jar:?]
at io.airbyte.cdk.load.pipeline.dlq.DlqLoaderAccumulator.accept(DlqLoaderPipelineStep.kt:79) ~[bulk-cdk-toolkit-legacy-task-load-dlq-1.0.1.jar:?]
at io.airbyte.cdk.load.pipeline.dlq.DlqLoaderAccumulator.accept(DlqLoaderPipelineStep.kt:56) ~[bulk-cdk-toolkit-legacy-task-load-dlq-1.0.1.jar:?]
at io.airbyte.cdk.load.task.internal.LoadPipelineStepTask$execute$$inlined$fold$1.emit(Reduce.kt:225) ~[bulk-cdk-toolkit-legacy-task-loader-1.0.1.jar:?]
at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:33) ~[kotlinx-coroutines-core-jvm-1.10.2.jar:?]
at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt(Channels.kt:1) ~[kotlinx-coroutines-core-jvm-1.10.2.jar:?]
at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Channels.kt) ~[kotlinx-coroutines-core-jvm-1.10.2.jar:?]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-2.1.10.jar:2.1.10-release-473]
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100) [kotlinx-coroutines-core-jvm-1.10.2.jar:?]
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124) [kotlinx-coroutines-core-jvm-1.10.2.jar:?]
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89) [kotlinx-coroutines-core-jvm-1.10.2.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586) [kotlinx-coroutines-core-jvm-1.10.2.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820) [kotlinx-coroutines-core-jvm-1.10.2.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717) [kotlinx-coroutines-core-jvm-1.10.2.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704) [kotlinx-coroutines-core-jvm-1.10.2.jar:?]
```
### Contribute
- [x] Yes, I want to contribute
---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/11603
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.