Skip to content
Panel(opens in a new tab)

Troubleshooting: Widgets

This page lists common problems with installing the Widgets, building a search page, and redirecting search to a results page. Each entry gives the cause, the fix, and the page that covers the topic in full. If your problem isn’t listed, email support@vviinn.com with your site, what you tried, and the error you see.

Cause

Vue tries to resolve the vviinn tags as Vue components.

Fix

Tell the Vue compiler that tags starting with vviinn- are custom elements. In vite.config.js or vite.config.ts, add this to the Vue plugin options:

vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith("vviinn-"),
},
},
}),

In Nuxt, set the same isCustomElement function under vue.compilerOptions in nuxt.config.

Details

Install the Widgets

Angular Reports Errors for the vviinn Tags

Section titled “Angular Reports Errors for the vviinn Tags”

Cause

Angular’s compiler accepts custom elements only in a module or standalone component that declares CUSTOM_ELEMENTS_SCHEMA.

Fix

Add CUSTOM_ELEMENTS_SCHEMA to schemas in every module or standalone component that uses the widgets, and call defineCustomElements() once in main.ts.

Details

Install the Widgets

Cause

Visual Search needs HTTPS to use the camera. The WebView also needs JavaScript, and the app needs camera permission.

Fix

Host the page with the widgets on an HTTPS server and load its URL in the WebView. Turn on JavaScript in unrestricted mode, and request camera permission in the app, in AndroidManifest.xml on Android and Info.plist on iOS.

Details

Install the Widgets

The Search Bar Shows Results instead of Redirecting

Section titled “The Search Bar Shows Results instead of Redirecting”

Cause

results-page-url needs vviinn-widgets 2.211.0 or later, and earlier versions ignore it. A standalone vviinn-vps-button or vviinn-vps-widget also shows results in its modal unless show-results-in-modal="false" is set.

Fix

Update the Widgets to 2.211.0 or later. On standalone visual-search entry points, add show-results-in-modal="false" next to results-page-url.

Details

Redirect Search to a Results Page

Cause

vviinn-results reads the search from the URL only when it has results-page-url itself, and only under the parameter names set in results-page-params.

Fix

Set results-page-url on vviinn-results. If you rename the URL parameters, give results-page-params the same value on every component that has results-page-url. Renaming needs vviinn-widgets 2.217.0 or later.

Details

Redirect Search to a Results Page

Section titled “Auto-Suggest Links Break in a Single-Page App”

Cause

Your vviinnRedirect listener calls preventDefault() for every redirect and routes it internally. That includes Query-to-URL Mappings (detail.source is auto-suggest), which often point outside your search flow.

Fix

Route only the results-page redirects and let the widget follow the others:

document.addEventListener("vviinnRedirect", (event) => {
const { source, url } = event.detail;
if (source === "auto-suggest") return; // let the widget follow it
event.preventDefault();
router.push(url);
});

Details

Redirect Search to a Results Page