You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Detected mismatched Protobuf Gencode/Runtime major versions #187
ImportError while loading conftest '/Users/nbrake/scm/any-agent/tests/conftest.py'.
tests/conftest.py:12: in<module>
from any_agent.config import AgentFramework
src/any_agent/__init__.py:2: in<module>
from .frameworks.any_agent import AgentRunError, AnyAgent
src/any_agent/frameworks/any_agent.py:14: in<module>
from any_agent.tools.wrappers import _wrap_tools
src/any_agent/tools/__init__.py:1: in<module>
from .a2a import a2a_tool, a2a_tool_async
src/any_agent/tools/a2a.py:17: in<module>
from a2a.client import A2ACardResolver, A2AClient
.venv/lib/python3.13/site-packages/a2a/client/__init__.py:9: in<module>
from a2a.client.grpc_client import A2AGrpcClient
.venv/lib/python3.13/site-packages/a2a/client/grpc_client.py:7: in<module>
from a2a.grpc import a2a_pb2, a2a_pb2_grpc
.venv/lib/python3.13/site-packages/a2a/grpc/a2a_pb2.py:12: in<module>
_runtime_version.ValidateProtobufRuntimeVersion(
.venv/lib/python3.13/site-packages/google/protobuf/runtime_version.py:106: in ValidateProtobufRuntimeVersion
_ReportVersionError(
.venv/lib/python3.13/site-packages/google/protobuf/runtime_version.py:50: in _ReportVersionError
raise VersionError(msg)
E google.protobuf.runtime_version.VersionError: Detected mismatched Protobuf Gencode/Runtime major versions when loading a2a.proto: gencode 6.31.1 runtime 5.29.5. Same major version is required. See Protobuf version guarantees at https://protobuf.dev/support/cross-version-runtime-guarantee.
VeshRaazThapa:
It appears that the issue is specific to a2a-sdk version 0.2.6. As a temporary workaround, you can use version 0.2.5 by running the following command:
Activity
ak-ag commentedon Jun 12, 2025
Refer:
#185
VeshRaazThapa:
It appears that the issue is specific to a2a-sdk version 0.2.6. As a temporary workaround, you can use version 0.2.5 by running the following command:
uv add "a2a-sdk==0.2.5"
njbrake commentedon Jun 12, 2025
Hmm. Is there some sort of other root caus? In my case, it actually is working ok on 0.2.6, but fails when I upgrade to 0.2.7.
Working fine:

Broken:

rajeshvelicheti commentedon Jun 12, 2025
Upgrading your runtime to match the generator should solve this issue.
to check your current version,
pip show protobuf
To upgrade
pip install protobuf>=6.31.1
You could try this in your venv if needed.
fix: Add `protobuf==6.31.1` to dependencies (#189)