Supabase plugin not available on initial load

Hello, getting an issue that seems to be related to the weweb supabase plugin.

After login I am getting this in the console:

I have tried using the official way of login and I have also used my coded version:

try {
// Start loading indicator
variables[“6eef353f-d5e3-4de7-b13e-9325ba8a907d”] = true;

const email = variables[“854762e2-d125-410d-8095-7b8608c0c09a-value”];
const password = variables[“49bd0a9f-cd42-491c-9137-e404b58a7202-value”];

if (!email || !password) {
alert(“Please enter both email and password.”);
variables[“6eef353f-d5e3-4de7-b13e-9325ba8a907d”] = false;
return;
}

const supabase = plugins.supabaseAuth;

if (!supabase || !supabase.publicInstance || !supabase.publicInstance.auth) {
throw new Error(“Supabase Auth plugin not properly configured in WeWeb.”);
}

// Attempt to sign in
const { data, error } = await supabase.publicInstance.auth.signInWithPassword({
email,
password,
});

if (error) {
alert(error.message || “Login failed. Please check your credentials.”);
variables[“6eef353f-d5e3-4de7-b13e-9325ba8a907d”] = false;
return;
}

// Login successful - Wait for session to be established
// Give WeWeb time to update the auth state
await new Promise(resolve => setTimeout(resolve, 500));

// Verify we have a valid user session before proceeding
const { data: { session } } = await supabase.publicInstance.auth.getSession();

if (!session?.user?.id) {
console.warn(“Session not yet available, skipping profile update”);
} else {
// Now update user-profile collection with valid user ID
try {
await utilsFunctions.executeGlobalFunction’138543bd-5be6-4816-925c-8c8403053e61’;
} catch (profileError) {
console.error(“Profile update error:”, profileError);
// Don’t block navigation even if profile update fails
}
}

// Navigate to dashboard
utilsFunctions.goToPage(‘internal’, {
pageId: ‘9008b515-2eac-411f-8b62-db85a1c1b5b1’,
loadProgress: true,
loadProgressColor: ‘#3b82f6
});

variables[“6eef353f-d5e3-4de7-b13e-9325ba8a907d”] = false;

} catch (err) {
console.error(“Unexpected login or navigation error:”, err);
alert(err.message || “An unexpected error occurred during login.”);
variables[“6eef353f-d5e3-4de7-b13e-9325ba8a907d”] = false;
}

No new updates here, I tried all weekend to get the supabase plugin calling however it seems to be the plugin itself with the issue, can someone at weweb take a look at this?

Hi Zakkery,:waving_hand:

please submit this issue to our support chat so our team can take a look at your issue.

1 Like