In my static Qwik app (adapter), I use this function addCustomer
export const addCustomer = server$(async (data) => {...
to perform some task in my MongoDB when click in a Btn
<button onClick$={async () => {const resume = await addCustomer(customerRecord); ...}
, and everything works fine in development environment. So I pushed changes to production into Vercel host. Then when I use my function again it Fails giving me this error in browser console.
Uncaught (in promise) DOMException: The operation is insecure.
HELP!
I tried with globalAction$(), they are globally available across the whole app. Think about it like a "public" action.
export const useAddCustomer = globalAction$(async (data: any) => {...
It doesn't works in development neither in production.
Minimal reproduction. I create a new Qwik app, with react and static adapters. In header click link to visit Form route.