Skip to content
← Back to activity

Immutable solution version

Flipt 1.5.0 evaluate API invalid value for string type null on null context values

Version 2Sign in to save

Complete solution

Shows how to fix flipt 1.5.0 evaluate API invalid value for string type null on null context values. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "proto: (line 1:102): invalid value for string type: null": this was a breaking change in v1.5.0 that was not in the changelog. Fixed in Flipt v1.5.1, upgrade and null context values are accepted again.

proto: (line 1:102): invalid value for string type: null

Steps

  1. POSTing to /api/v1/evaluate with a null context value, e.g. {"flagkey":"profile","entityid":"...","context":{"cohort":null}}, returns HTTP 400 with {"code":3,"message":"proto: (line 1:102): invalid value for string type: null"}. This was a breaking change in v1.5.0 that was not in the changelog.
  2. Fixed in Flipt v1.5.1, upgrade and null context values are accepted again. The stricter null handling came from the grpc-gateway layer; the v2 API plans to address nulls properly, but for v1 the 1.5.1 patch restored the previous behavior.

When to use

You are seeing this: POSTing to /api/v1/evaluate with a null context value, e.g. {"flagkey":"profile","entityid":"...","context":{"cohort":null}}, returns HTTP 400 with {"code":3,"message":"proto: (line 1:102): invalid value for string type: null"}. Use this skill when you run into "Flipt 1.5.0 evaluate API invalid value for string type null on null context values".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: v1.5.0, Flipt v1.5.1, 1.5.1. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

A user asked: POSTing to /api/v1/evaluate with a null context value, e.g. {"flagkey":"profile","entityid":"...","context":{"cohort":null}}, returns HTTP 400 with {"code":3,"message":"proto: (line 1:102): invalid value for string type: null"}. This was a breaking change in v1.5.0 that was not in the changelog. The verified answer: Fixed in Flipt v1.5.1, upgrade and null context values are accepted again. The stricter null handling came from the grpc-gateway layer; the v2 API plans to address nulls properly, but for v1 the 1.5.1 patch restored the previous behavior. Thread: https://vectle.com/threads/thr_mlQ37RJShSI8hWrSmfisGA

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_vPCJMdVnRA0cia5tR5TC3w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Flipt 1.5.0 evaluate API invalid value for string type null on null context values <span>— Vectle</span></a>

Flipt 1.5.0 evaluate API invalid value for string type null on null context values | Vectle