Docs Demo Dashboard Get your key
On this page
  1. Console messages
  2. Symptoms
    1. Nothing appears and the console is clean
    2. On localhost, the bar says this browser cannot keep comments
    3. The bar appeared for a moment and vanished
    4. The bar covers my header, or my header jumped
    5. Comments show on the wrong page, or every page shows the same comments
    6. Comments left on staging are not on production
    7. Pins drift or disappear after a deploy
    8. The snapshot is blank or partial
    9. Google sign-in is not offered
    10. Live updates do not arrive

Troubleshooting

Open the browser console first. Every reason the script declines to appear is printed there, prefixed [SharedLayers], and each message says what to do.

Console messages

[SharedLayers] No embed key. Add data-key="sl_embed_…" to the script tag, or pass { key } to Comments.init(). The key is in your dashboard under API Key.

The tag has neither data-key nor data-project-id. Usually a templating variable that rendered empty, or a type="module" tag, which cannot see its own attributes.

[SharedLayers] This embed key is not recognised: sl_embed_xxxxxxxx… Check it against the one in your dashboard, or make a new one — a revoked key reads the same way.

The key does not match any active key. Compare it character by character with the dashboard; keys that were revoked or regenerated produce this too.

[SharedLayers] This key is for acme.com, so it will not load on acme-preview.dev. A key works on one domain and its subdomains. Make a key for this site under API Key in your dashboard, or remove the domain from this one there.

A key takes the first domain it loads on, and works there and on its subdomains. This page is on another domain. Make a key for this site, or remove the old domain from the key so it can take this one. A hosting platform's preview addresses and your own computer never count; see Embed keys and domains.

[SharedLayers] Installing by script is part of Pro, and the account this key belongs to is on the free plan, so the widget will not load. https://sharedlayers.com/dashboard?page=billing

The account that made the key is on the free plan. Upgrade, or use the Chrome extension, which shows the same comments and is free.

[SharedLayers] Could not reach SharedLayers to check this key.

The request to the database host failed before it could answer. Almost always a Content Security Policy missing connect-src, a corporate proxy, or an ad blocker with an aggressive list. The error object logged with it says which. This is the one refusal that cannot be lenient: without an answer there is no site to show comments for.

[SharedLayers] Could not check the plan for this project; carrying on.

Legacy data-project-id installs only. The licence check did not get an answer, and the script chose to load anyway rather than hide a paying customer's comments. Nothing to fix unless it is constant, in which case see the message above.

[Comments] Already initialized.

The script ran twice on one page: two tags, or a tag plus an init call, or a component that mounts the tag and re-renders. Install it once, outside any component.

[SharedLayers] Could not read the layers in the project folder.

On an app on your own computer, where comments are kept in the project folder, the browser lost its permission to the folder or the folder moved. Choose it again from the layer menu. See Apps on your computer.

Symptoms

Nothing appears and the console is clean

On localhost, the bar says this browser cannot keep comments

Comments on an app on your own computer are kept in its project folder, and only Chrome and Edge let a page write to a folder. Open the page in one of them. Nothing is sent to SharedLayers from a local app, so there is no fallback.

The bar appeared for a moment and vanished

The widget mounted on the key check remembered from an earlier visit, and the fresh answer overruled it: the key has been revoked, the account has left the Pro plan, or the key belongs to another domain. The console says which. The remembered answer is dropped the moment it is overruled, so once the cause is fixed a reload is enough.

The bar covers my header, or my header jumped

The bar shifts fixed and sticky elements that have a pixel top. A header positioned with top: 0 is moved down 44 px, which is intended. One positioned with a percentage, calc(), or with both top and bottom set is left where it was and the bar may overlap it. Give it a pixel top, read var(--sl-inset-top, 0px) in your own CSS, or switch to data-layout="button".

Comments show on the wrong page, or every page shows the same comments

Your site distinguishes pages by a query parameter and the script does not know which. Set data-page-params. The reverse, comments that vanish when a tracking parameter is added, cannot happen unless you set data-page-params="*".

Comments left on staging are not on production

That is by design: every address keeps its own comments and layers, so staging.acme.com, uat.acme.com and acme.com never mix, even with one key. See Addresses. Connected AI apps show the address each comment was left on, and the dashboard's Notifications page can pick one.

Pins drift or disappear after a deploy

The elements they were anchored to changed their selector. Typically hashed class names, or a wrapper that was added or removed. Give reviewable elements stable ids or data- attributes. See How pins anchor.

The snapshot is blank or partial

Cross-origin images, videos and iframes cannot be read and render blank; that is the browser, not the script. An image that fails to load is drawn blank too, rather than costing the whole picture. Fonts hosted cross-origin without CORS headers fall back to a system font in the picture. A snapshot that never appears usually ran out of its 8 second budget on a very large page. Set window.__SL_SNAP_DEBUG = true before commenting and the script logs how long each step took.

Google sign-in is not offered

The install uses data-project-id. Google requires an embed key, which lets the sign-in popup verify the site. Switch the attribute to data-key.

Live updates do not arrive

The websocket to the database host is blocked. Add wss://mtgpolxyqamundksrksi.supabase.co to connect-src, and check any proxy that terminates websockets. Comments still save; they just need a reload to appear for other people.