Fix widget problems
The support widget is missing, unstyled or asks visitors to sign in, or a console message names it.
Updated Oct 14, 20262 minute read
The widget is installed by your developer, so most fixes happen in your site's code. This page names the cause, and points your developer at the detail.
What you see
| Symptom | Cause | Fix |
|---|---|---|
| No launcher on your site | The widget is not on this page, or its key is wrong, revoked or missing | Check the browser console for a message below. Your developer renders the widget once, in the site's root layout |
| The widget has no styling, and sits inside your page layout | The widget's stylesheet is not loaded | Your developer imports it once. See Install the widget |
| The widget shows Sign in to chat | The widget is set to require sign in, and your site says nobody is signed in | Sign in to your site and try again. See Identity |
| The widget disappeared after working | The key it uses was revoked, or the widget hit an error | Check the console. A revoked key needs a new one from Settings → API |
Messages in the browser console
Messages start with "Median". Some name MedianSupportModal instead of
MedianSupport when the site uses the support modal.
| Message | Means |
|---|---|
| Median: the apiKey passed to <MedianSupport> is ..., which does not look like the browser-safe id | The widget was given the server key, or something else, instead of the public key |
| Median did not recognize the apiKey passed to <MedianSupport>, so it has been hidden. | The key was revoked or mistyped, or its organization was deleted |
| Median: <MedianSupport> was given neither apiKey nor identity, so nothing is on the page. | The widget was given no key |
| Median: MEDIAN_KEY is missing. Add the Median key from Settings under API to your server environment. | Your server has no Median key set |
| Median: could not read the identity route. | Your site's sign-in check for the widget failed |
| Median: the user hash passed to <MedianSupport> did not match. | Your site signed the user with the wrong key, or the wrong id |
| Median: a user hash was passed to <MedianSupport>, but its widget id and hash came from different Median keys. | Two different keys are in use |
| Median: <MedianSupport> hit an error and has been hidden. Your page is unaffected. | An unexpected error. Reload, and if it repeats, contact Median support with the console output |
A key's full public key is shown once, when the key is created. If nobody kept it, create a new key on Settings → API, and have your developer use the new pair.
Test a key without your site
Open https://median.sh/widget?key=median_pk_... with your public key. It
shows Your live widget for a well-formed key, or No API key
otherwise. Messages sent there reach your inbox.
For your developer
| Topic | Where |
|---|---|
| Every console message, with its exact fix | Support widget and Install the widget |
| Keys, the server key and the public key | Install the widget |
| Signing users in to the widget | Identity |