<@U04S8PLJWMT> after upgrading to 2.0.1, chart 1.9...
# ask-ai
e
@kapa.ai after upgrading to 2.0.1, chart 1.9.1, I'm getting: 2025-11-26 164349,518 [io-executor-thread-2] ERROR i.g.o.k.KLogger$DefaultImpls(error):811 - Swallowed error. java.lang.NullPointerException: Cannot invoke "io.airbyte.config.SyncStats.getSourceStateMessagesEmitted()" because "totalStats" is null at io.airbyte.persistence.job.tracker.TrackingMetadata.generateJobAttemptMetadata(TrackingMetadata.kt:173) at io.airbyte.persistence.job.tracker.JobTracker.generateJobAttemptMetadata(JobTracker.kt:509) at io.airbyte.persistence.job.tracker.JobTracker.trackSync$lambda$7(JobTracker.kt:248) at io.airbyte.commons.lang.Exceptions.swallow(Exceptions.kt:67) at io.airbyte.persistence.job.tracker.JobTracker.trackSync(JobTracker.kt:217) at io.airbyte.commons.server.handlers.helpers.JobCreationAndStatusUpdateHelper.trackCompletion(JobCreationAndStatusUpdateHelper.kt:444) at io.airbyte.commons.server.handlers.JobsHandler.jobSuccessWithAttemptNumber(JobsHandler.kt:192) at io.airbyte.server.apis.controllers.JobsApiController.jobSuccessWithAttemptNumber$lambda$12(JobsApiController.kt:162) at io.airbyte.server.apis.ApiHelper.execute(ApiHelper.kt:32) at io.airbyte.server.apis.controllers.JobsApiController.jobSuccessWithAttemptNumber(JobsApiController.kt:161) at io.airbyte.server.apis.controllers.$JobsApiController$Definition$Exec.dispatch(Unknown Source) at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invokeUnsafe(AbstractExecutableMethodsDefinition.java:461) at io.micronaut.context.DefaultBeanContext$BeanContextUnsafeExecutionHandle.invokeUnsafe(DefaultBeanContext.java:4438) at io.micronaut.web.router.AbstractRouteMatch.execute(AbstractRouteMatch.java:272) at io.micronaut.web.router.DefaultUriRouteMatch.execute(DefaultUriRouteMatch.java:38) at io.micronaut.http.server.RouteExecutor.executeRouteAndConvertBody(RouteExecutor.java:465) at io.micronaut.http.server.RouteExecutor.lambda$callRoute$5(RouteExecutor.java:442) at io.micronaut.core.execution.ExecutionFlow.lambda$async$0(ExecutionFlow.java:92) at io.micronaut.core.propagation.PropagatedContext.lambda$wrap$3(PropagatedContext.java:232) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583)
k
The error you're encountering:
Copy code
java.lang.NullPointerException: Cannot invoke "io.airbyte.config.SyncStats.getSourceStateMessagesEmitted()" because "totalStats" is null
is related to the Airbyte job tracking logic, specifically when generating job attempt metadata. This type of error has been reported in various forms in previous Airbyte versions, often linked to missing or null statistics in the sync job's state or metadata. From the knowledge sources, similar issues have occurred when: - The state message emitted by a source does not contain the required
sourceStats
attribute. Airbyte expects the source to always populate the
sourceStats
in a state message, which includes counts of records associated with the state message. If this is missing, it can result in a
NullPointerException
when the system tries to access these stats, as seen in your stack trace. This was specifically mentioned in a recent issue with the ClickHouse destination, but the root cause is generic to how Airbyte processes state messages and stats in job tracking logic. The relevant code expects
totalStats
(or similar stats objects) to be non-null, and if a connector (especially a custom or older one) does not emit these, the error occurs. The solution is to ensure your source connector emits state messages with the required stats populated, especially after upgrading to newer Airbyte versions that enforce this requirement more strictly. See the discussion here: [destination-clickhouse sync fails with error java.lang.NullPointerException](https://github.com/airbytehq/airbyte/issues/69140). - There have also been similar
NullPointerException
issues in the past related to missing or null values in job tracking metadata, such as
max_seconds_before_source_state_message_emitted=null
, which caused failures in job tracking and notification logic. These were often resolved by updating all Airbyte components to the latest compatible versions and ensuring that all connectors and platform components are in sync after an upgrade. See examples here: [NullPointerException: "schedule" is null](https://discuss.airbyte.io/t/2760) and [Error running Sheets Sync](https://discuss.airbyte.io/t/2532). What you should do: 1. Check your source connector: Make sure it is up-to-date and compatible with Airbyte 2.x. If you are using a custom connector, update it to emit state messages with the
sourceStats
attribute populated. 2. Update all components: If you upgraded Airbyte, ensure all connectors and platform components are also upgraded to versions compatible with 2.0.1. 3. Review connector logs: Look for any warnings or errors about missing state stats or other metadata during syncs. 4. If using custom sources: Refer to the Airbyte connector development documentation to ensure your connector is emitting the required state message structure for Airbyte 2.x. If after these steps the issue persists, you may want to open a GitHub issue with detailed logs and connector versions, as this could indicate a bug or a missing migration step in the upgrade process. Let me know if you need more specific troubleshooting steps!
e
I also get ERROR i.g.o.k.s.i.Slf4jLogger(error):128 - 0.4.3 when updating images @kapa.ai
k
A message from kapa.ai
I'm sorry, but the knowledge sources provided do not contain any information about the specific error message:
Copy code
ERROR    i.g.o.k.s.i.Slf4jLogger(error):128 - 0.4.3 when updating images
There is no explicit mention of this error or its cause in the available documentation, GitHub issues, or forum posts. If you can provide more context or logs, I may be able to help further. Otherwise, I recommend checking the Airbyte logs for more details or reaching out on the Airbyte community forums for additional support.