Mohamed Akram Lahdir
11/03/2025, 3:06 PM2025-11-03 16:04:15 destination ERROR DefaultDispatcher-worker-5 i.a.c.l.t.DestinationTaskLauncher$WrappedTask(execute):129 Caught exception in task io.airbyte.cdk.load.task.internal.InputConsumerTask@5ab458c7 java.lang.NullPointerException: Cannot invoke "io.airbyte.protocol.models.v0.AirbyteGlobalState.getStreamStates()" because the return value of "io.airbyte.protocol.models.v0.AirbyteStateMessage.getGlobal()" is null
at io.airbyte.cdk.load.message.DestinationMessageFactory.isSnapshotCheckpoint(DestinationMessageFactory.kt:254) ~[bulk-cdk-core-load-0.1.54.jar:?]
at io.airbyte.cdk.load.message.DestinationMessageFactory.fromAirbyteProtocolMessage(DestinationMessageFactory.kt:170) ~[bulk-cdk-core-load-0.1.54.jar:?]
at io.airbyte.cdk.load.message.ProtocolMessageDeserializer.deserialize(DestinationMessageDeserializer.kt:50) ~[bulk-cdk-core-load-0.1.54.jar:?]
at io.airbyte.cdk.load.task.internal.ReservingDeserializingInputFlow.collect(ReservingDeserializingInputFlow.kt:46) ~[bulk-cdk-core-load-0.1.54.jar:?]
at io.airbyte.cdk.load.task.internal.ReservingDeserializingInputFlow$collect$1.invokeSuspend(ReservingDeserializingInputFlow.kt) ~[bulk-cdk-core-load-0.1.54.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:?]
Suppressed: io.airbyte.cdk.TransientErrorException: Input was fully read, but some streams did not receive a terminal stream status message. If the destination did not encounter other errors, this likely indicates an error in the source or platform. Streams without a status message: [Category]
at io.airbyte.cdk.load.state.SyncManager.markInputConsumed(SyncManager.kt:116) ~[bulk-cdk-core-load-0.1.54.jar:?]
at io.airbyte.cdk.load.state.PipelineEventBookkeepingRouter.close(PipelineEventBookkeepingRouter.kt:300) ~[bulk-cdk-core-load-0.1.54.jar:?]
at io.airbyte.cdk.load.task.internal.InputConsumerTask.execute(InputConsumerTask.kt:120) ~[bulk-cdk-core-load-0.1.54.jar:?]
at io.airbyte.cdk.load.task.internal.InputConsumerTask$execute$1.invokeSuspend(InputConsumerTask.kt) ~[bulk-cdk-core-load-0.1.54.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:?]kapa.ai
11/03/2025, 3:07 PMCannot invoke "io.airbyte.protocol.models.v0.AirbyteGlobalState.getStreamStates()" because the return value of "io.airbyte.protocol.models.v0.AirbyteStateMessage.getGlobal()" is null is a known issue in Airbyte, especially when using Change Data Capture (CDC) sources with certain destinations (including BigQuery, DuckDB, Firebolt, Typesense, Pinecone, and others). This error typically occurs when the destination connector receives a state message of type GLOBAL, but the global field is null or not properly handled by the destination. This can happen if: - The source emits state in the legacy format, but the destination expects the new protocol (with GLOBAL or STREAM state types). - The destination connector does not properly handle all possible state message types, especially GLOBAL. - There is a protocol mismatch between the source and destination, often after Airbyte or connector upgrades. Key points from the knowledge sources: - The Airbyte protocol now supports three state types: LEGACY, STREAM, and GLOBAL. Destinations must handle all types, and if a GLOBAL state is received, the global field must not be `null`—otherwise, this error will occur. If the state is LEGACY, the data field is used instead. If not set, it defaults to LEGACY [see protocol docs](https://docs.airbyte.com/platform/understanding-airbyte/airbyte-protocol#airbytestatemessage). - This issue has been reported across multiple connectors and is often due to destinations not being updated to handle the new protocol, or sources emitting legacy state when the destination expects the new format [see issues](https://github.com/airbytehq/airbyte/issues/38749) [see issues](https://github.com/airbytehq/airbyte/issues/55697). - A workaround that has helped some users is to downgrade the source connector to an older version that emits state in the expected format, or to update the source to emit STREAM state instead of LEGACY or GLOBAL [see user workaround](https://github.com/airbytehq/airbyte/issues/38749). - The Airbyte team and contributors have acknowledged this as a bug, especially for Python CDK destinations, and recommend updating the destination to handle all state types or reverting to a prior CDK version as a temporary fix [see contributor comments](https://github.com/airbytehq/airbyte/issues/55697). What you can do: 1. Check connector versions: Make sure both your source and destination connectors are up to date. If the issue started after an upgrade, try downgrading the source connector to a version that previously worked. 2. Check state message format: If you control the source, ensure it emits state in the STREAM format, which is preferred and most widely supported. 3. If using a custom or Python CDK destination: Update the destination to handle all state types, especially GLOBAL, or look for updates from the Airbyte team addressing this protocol handling. 4. Monitor Airbyte issues: This is a known, open issue and is being tracked for multiple connectors. You may want to follow or comment on the relevant GitHub issues for updates. Summary: This is a protocol compatibility issue between source and destination connectors regarding state message handling. The most robust solution is to ensure both connectors are updated and compatible with the latest Airbyte protocol, or to use a source that emits STREAM state messages if possible. If you need an immediate workaround, downgrading the source connector or switching to a destination that is known to handle the new protocol (such as MotherDuck) may help [see issues and comments](https://github.com/airbytehq/airbyte/issues/38749) [see issues and comments](https://github.com/airbytehq/airbyte/issues/55697). If you need more specific guidance, please provide your source and destination connector versions.