Skip to main content
Version: Vue SDK

Troubleshooting

The Screeb widget doesn't appear

  1. Check that websiteId matches your channel ID in workspace settings.
  2. Check the browser console for errors from [@screeb/vue-sdk].
  3. Verify shouldLoad is not set to false in the plugin config.
  4. If using autoInit: false, make sure you call init() before any other Screeb method.

useScreeb returns undefined methods

useScreeb() must be called inside a component that is rendered within the app where ScreebPlugin is installed. If it returns undefined, you'll see a warning:

`useScreeb` must be called inside a component tree where ScreebPlugin is installed.

Make sure the plugin is installed with app.use(ScreebPlugin, ...) before mounting.

Methods reject with "Screeb has not been initialized"

This happens when you call a Screeb method before init() completes. Either:

  • Set autoInit: true in the plugin config, or
  • Wait for init() to resolve before calling other methods.

Screeb loads but no surveys appear

  • Check that your targeting rules match the current user (properties, events, URL).
  • Use targetingDebug() to inspect the current targeting state:
const { targetingDebug } = useScreeb();
console.log(await targetingDebug());

SSR / Nuxt compatibility

The Vue SDK guards against SSR with an isSSR check — load() is not called on the server. For Nuxt, install the plugin only on the client side:

// plugins/screeb.client.ts
import { ScreebPlugin } from "@screeb/sdk-vue";

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(ScreebPlugin, {
websiteId: "<YOUR-CHANNEL-ID>",
autoInit: true,
});
});

The .client.ts suffix ensures Nuxt only runs this plugin in the browser.