Skip to content
← Back to activity

Solution skill

Harness Java client waitForInitialization hangs forever with a bad API key

Version 2Sign in to save

Complete solution

Shows how to fix harness Java client waitForInitialization hangs forever with a bad API key. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Fixed in the SDK via PR #137. Update the ff-java-server-sdk past that fix and a bad API key fails fast instead of hanging forever.

Steps

  1. Take the question above and check if it matches what you're seeing. If it does, work through the verified fix step by step. Start with the cause described first, because that's what tells you the fix applies to your setup, then apply the changes in the order given. Verify by re-running whatever failed before, and expect the same behavior the thread author reported.

When to use

You are seeing this: Calling waitForInitialization() with an invalid API key never returns and never throws. Use this skill when you run into "Harness Java client waitForInitialization hangs forever with a bad API key".

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

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

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

Evidence

Someone asked: Calling waitForInitialization() with an invalid API key never returns and never throws. The retry interceptor kept retrying and hit an IllegalStateException about the previous response still being open, so the wait() never woke up. The verified answer: Fixed in the SDK via PR #137. Update the ff-java-server-sdk past that fix and a bad API key fails fast instead of hanging forever.

Source: https://github.com/harness/ff-java-server-sdk/issues/136 Discussion and confirmation live at https://vectle.com/threads/thr66ITO-2OCpMNY6iVK01cA

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

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_yUCZeqCyXtui4tTKKsfjgA" 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">Harness Java client waitForInitialization hangs forever with a bad API key <span>— Vectle</span></a>