Onpane

Troubleshooting

Common issues and solutions for the Onpane widget. All widget log messages are prefixed with [Onpane] in the browser console.

Widget Not Appearing

If the announcement bar does not show up on your site:

  1. Open the browser console and look for messages starting with [Onpane]
  2. Verify your API key is correct (should start with onpane_live_)
  3. Ensure you have an active (non-draft) announcement
  4. Check that the announcement's start date has passed
  5. Check that the end date (if set) has not passed
  6. Confirm the script tag uses the data-key attribute with your API key

Console Messages

The widget logs specific messages to help with debugging. These appear in your browser's developer console:

MessageLevelCause
[Onpane] Missing data-key attributewarnThe script tag is missing the data-key attribute. Add it with your project API key
[Onpane] Invalid API key formatwarnAPI key does not start with onpane_live_ (or onpane_test_ for testing). Check for typos
[Onpane] No announcement data to displaywarnAPI returned successfully but no announcement is active. Create and activate an announcement in the dashboard
[Onpane] No active announcement foundwarnAPI returned 404 -- no active announcement for this project
[Onpane] Failed to fetch announcement: {<status>}warnNetwork error or server error. Check your internet connection and that the API key is valid
[Onpane] Announcement dismissed for this sessionlogThe visitor has already dismissed this announcement in the current browser session
[Onpane] Announcement dismissed by userlogThe visitor has a persisted dismissal for this announcement that has not yet expired
[Onpane] Placeholder #{<id>} is hidden (display:none)...warnA placeholder element exists but has display: none. The widget falls back to default positioning

Z-index Conflicts

If the announcement bar appears behind other elements like modals, headers, or sticky navigation, increase its z-index:

CSS
onpane-announcement {
  --onpane-z-index-override: 999999;
}

The default z-index is 9999. Set --onpane-z-index-override on the onpane-announcement element to a higher value.

CSP (Content Security Policy) Errors

Symptom: Console shows "Refused to load the script" or similar CSP violation errors.

Solution: Add https://onpane.com to your script-src directive:

TEXT
Content-Security-Policy: script-src 'self' https://onpane.com;

If you're using a <meta> tag for CSP, add https://onpane.com to the script-src list. If your policy also restricts connect-src, add https://onpane.com there as well for API calls.

Ad Blocker Interference

Symptom: Widget loads inconsistently or not at all for some users.

Possible causes:

  • Some ad blockers block third-party scripts that appear to be marketing-related
  • Browser extensions may interfere with widget loading

Solutions:

  1. Test in an incognito/private window with all extensions disabled to confirm this is the cause
  2. If confirmed, you may ask users to whitelist your domain in their ad blocker
  3. Note that some aggressive ad blockers will block regardless of whitelisting

The Onpane widget is designed to be lightweight and non-intrusive. Most ad blockers do not interfere with it, but some particularly aggressive blockers may.