thanos-io/thanos · error

proto: wrong wireType =

Error message

proto: wrong wireType = %d for field Type

What it means

Hand-written protobuf unmarshalling of Chunk: field 1 (Type) arrived with a wire type other than varint (0). The serialized bytes at fault do not match the Chunk schema, indicating corrupted or version-incompatible encoding of the chunk message.

Solutions

  1. Re-fetch the chunk from a healthy replica
  2. Verify the block containing the chunk
  3. Ensure sender and receiver use the same generated proto definitions
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/store/storepb/custom.go:616 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07). Data as JSON: /api/errors/662c2a5b35997ccc. Report an issue: GitHub.

Appendix: source

Thrown at pkg/store/storepb/custom.go:616

			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Chunk: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Chunk: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
			}
			m.Type = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowTypes
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Type |= Chunk_Encoding(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {

View on GitHub (pinned to 35b8b99117)