Skip to content

[Bug]: Detected mismatched Protobuf Gencode/Runtime major versions #192

Closed

Description

@sanjeevbiswasautodesk

What happened?

Trying to run the sample code in python directory from https://github.com/google-a2a/a2a-samples and getting this error after following the instructions here
cd samples/python/agents/a2a_mcp
uv venv # (if not already done)
source .venv/bin/activate

Note: Change the host and port as needed.

uv run src/a2a_mcp/agents/ --agent-card agent_cards/orchestrator_agent.json --port 10101

File "/Users/xxxxx/Public/xxxx/a2a-samples/samples/python/agents/a2a_mcp/.venv/lib/python3.13/site-packages/google/protobuf/runtime_version.py", line 50, in _ReportVersionError
raise VersionError(msg)
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.

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. rajeshvelicheti commented on Jun 13, 2025

    @rajeshvelicheti
    Contributor

    This should be addressed with #189

    You can also upgrade your potobuf runtime, pip install --upgrade protobuf (or pip install protobuf>=6.31.1) as a workaround.

  2. sanjeevbiswasautodesk commented on Jun 13, 2025

    @sanjeevbiswasautodesk
    Author

    I am sorry but looks like your python code samples repo is broken , i have added the dependency and installed pip install protobuf and now i got this error,

    uv run src/a2a_mcp/agents/ --agent-card agent_cards/orchestrator_agent.json --port 10101
    × No solution found when resolving dependencies:
    ╰─▶ Because google-ai-generativelanguage==0.6.15 depends on one of:
    protobuf>=3.20.2,<4.21.0
    protobuf>4.21.5,<6.0.0.dev0
    and google-generativeai==0.8.5 depends on
    google-ai-generativelanguage==0.6.15, we can conclude that
    google-generativeai==0.8.5 depends on one of:
    protobuf>=3.20.2,<4.21.0
    protobuf>4.21.5,<6.0.0.dev0

      And because only google-generativeai<=0.8.5 is available, we can
      conclude that google-generativeai>=0.8.5 depends on one of:
          protobuf>=3.20.2,<4.21.0
          protobuf>4.21.5,<6.0.0.dev0
    
      And because your project depends on google-generativeai>=0.8.5 and
      protobuf==6.31.1, we can conclude that your project's requirements are
      unsatisfiable.
    
  3. sanjeevbiswasautodesk commented on Jun 19, 2025

    @sanjeevbiswasautodesk
    Author

    uv add "a2a-sdk==0.2.5" worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions