{"id":6608,"date":"2025-11-12T10:50:27","date_gmt":"2025-11-12T10:50:27","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=6608"},"modified":"2026-06-05T11:24:26","modified_gmt":"2026-06-05T11:24:26","slug":"hostinger-horizons-troubleshooting-supabase","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/hostinger-horizons-troubleshooting-supabase\/","title":{"rendered":"Hostinger Horizons: Fixing Supabase configuration issues"},"content":{"rendered":"<p>Hostinger Horizons now includes a native integrated backend for newly created projects. Projects that were previously connected to Supabase can still continue using that integration. This guide helps troubleshoot common Supabase-related issues in Hostinger Horizons, such as authentication loops, Row Level Security (RLS) violations, and project connection errors.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">To find Supabase settings in Hostinger Horizons, look for the green bolt in the top navigation bar &#9889;<br>\n<img decoding=\"async\" class=\"alignnone size-medium wp-image-11133\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/06\/image-3-300x66.png\" alt=\"\" width=\"300\" height=\"66\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/06\/image-3-300x66.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/06\/image-3.png 434w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div><h2 id=\"h-before-you-start\">Before you start<\/h2><ul>\n<li>Confirm you have access to your Supabase Dashboard.<\/li>\n<li>For a first attempt at general fixes, follow this guide: <a href=\"https:\/\/www.hostinger.com\/support\/10506025-hostinger-horizons-troubleshooting\/\">Horizons troubleshooting<\/a>.<\/li>\n<li>Ensure any external services are online &ndash;refer to their status page if needed, and try again later in case of temporary issues or maintenance.<\/li>\n<\/ul><h2 id=\"h-resolve-authentication-and-rls-issues\">Resolve authentication and RLS issues<\/h2><p>Authentication is the most frequent source of errors in Supabase integrations. Follow these steps to ensure your credentials and permissions are correct.<\/p><ol>\n<li><strong>Verify credentials<\/strong>: Ensure the Project URL and Public\/Anon key match your Supabase API settings exactly.<\/li>\n<li><strong>Use the native client<\/strong>: Locate the <code>customSupabaseClient.js<\/code> file in your project. Do not create duplicate files like <code>supabase.js<\/code>, as these often contain placeholder data that breaks the connection.<\/li>\n<li><strong>Configure Auth providers<\/strong>: In your Supabase Dashboard, go to Auth &rarr; Settings. Ensure Email login is enabled. Add later other sign-in methods only if needed.<\/li>\n<li><strong>Set URL redirects<\/strong>: In Supabase, go to Auth &rarr; URL Configuration, and add your project&rsquo;s preview and production URLs to the Redirect URLs list.<\/li>\n<li><strong>Check RLS policies<\/strong>: If data isn&rsquo;t loading, check your Row Level Security (RLS) in Supabase. Ensure your policies allow &ldquo;Read&rdquo; or &ldquo;Write&rdquo; actions for the authenticated user.<\/li>\n<\/ol><p>Redeploy your application after updating keys or URLs to ensure changes take effect.<\/p><p>If Horizons added extra Supabase files by mistake, do not attempt to delete them. Instead, <a href=\"https:\/\/www.hostinger.com\/support\/11010357-hostinger-horizons-restore-message-button-to-fix-errors\/\">undo the changes<\/a> that created the additional files, then try a prompt similar to this:<\/p><p style=\"margin-left: 40px\"><em>Use <\/em><code>customSupabaseClient.js<\/code><em> for all Supabase calls. Remove any duplicate clients and update imports accordingly.<\/em><\/p><h2 id=\"h-fix-signup-and-timing-errors\">Fix signup and timing errors<\/h2><p>If your app users get an <strong>RLS violation<\/strong> message in the console immediately after signing up, the app may be trying to write to the database before the user is fully authorized.<\/p><ol>\n<li>Check the console error to identify the database table that caused the issue. Include that table name in your prompt to get more accurate results from Horizons.<\/li>\n<li>Refactor the flow using a prompt in Horizons to move database requests:<br>\n<em>Move initial database manipulation logic from sign up to initial sign in. Ensure all requests respect RLS and occur only after the user is authorized.<\/em><\/li>\n<\/ol><h2 id=\"h-fix-redirect-loops-on-tab-switch\">Fix redirect loops on tab switch<\/h2><p>Users may be redirected to the home page when returning to a browser tab. This happens when the app checks the session before Supabase finishes re-validating it.<\/p><p>Update the visibility logic using a prompt like this:<\/p><p style=\"margin-left: 40px\"><em>Update the Supabase logic using<\/em> <code>visibilitychange<\/code> <em>to check authentication state. Ensure the user session is fully acknowledged before any route redirection.<\/em><\/p><h2 id=\"h-restore-missing-credentials\">Restore missing credentials<\/h2><p>If every action triggers a <strong>Missing API Key<\/strong> error, the connection between platforms may have desynced.<\/p><ol>\n<li><strong>Reconnect<\/strong>: Disconnect and then reconnect your Supabase project within the Horizons dashboard to refresh the API file.<\/li>\n<li><strong>Redeploy<\/strong>: After updating keys, redeploy your application to ensure the new environment variables are active.<\/li>\n<\/ol><p>If you can&rsquo;t clearly locate or replicate the issue, check the Supabase logs for further details, matching the timestamp with the time when the issue may have happened.<\/p><h2 id=\"h-troubleshooting-builds-and-dependency-errors\">Troubleshooting builds and dependency errors<\/h2><p>If the Hostinger Horizons preview fails to start or <code>npm install<\/code> hangs after you add Supabase-related libraries, it usually indicates a version conflict.<\/p><ol>\n<li><strong>Pin stable versions<\/strong>: Ensure your <code>package.json<\/code> uses specific, stable version numbers for libraries instead of broad ranges.<\/li>\n<li><strong>Resolve conflicts via prompt<\/strong>: Use the following prompt in the Hostinger Horizons editor:<br>\n<em>Resolve dependency conflicts without modifying <\/em><code>vite.config.js<\/code>. Keep only essential packages and prefer stable versions.<\/li>\n<li><strong>Revert build config changes<\/strong>: If an AI-suggested tool modified your Vite configuration, revert to the last working version and ask the assistant to implement the feature without altering core build settings.<\/li>\n<\/ol><p>In addition:<\/p><ul>\n<li>Avoid adding heavy or complex packages that may cause the installation process to stall.<\/li>\n<li>Do not manually edit <code>vite.config.js<\/code>, as this can lead to persistent build failures.<\/li>\n<\/ul><p>&nbsp;<\/p><p>By following these steps, you can maintain a stable connection between your legacy Supabase backend and Hostinger Horizons.<\/p><p><strong>NOTES<\/strong><\/p><ul>\n<li data-kodee=\"hide\">You can get further support on the integration between Horizons and Supabase by clicking&nbsp;<strong>Ask Kodee <\/strong>on the Horizons platform and sharing the details and timeframe of the issue at hand.<\/li>\n<li>For support regarding internal Supabase database behavior, refer to the Supabase <a href=\"https:\/\/supabase.com\/docs\/guides\/troubleshooting\" target=\"_blank\" rel=\"noopener\">documentation<\/a> or <a href=\"https:\/\/supabase.com\/support\" target=\"_blank\" rel=\"noopener\">contact<\/a> them.<\/li>\n<li>For practical help directly in your project, consider a reaching out to a <a href=\"https:\/\/www.fiverr.com\/\" target=\"_blank\" rel=\"noopener\">developer<\/a>.<\/li>\n<\/ul><div>\n<article class=\"text-token-text-primary w-full focus:outline-none [--shadow-height:45px] has-data-writing-block:pointer-events-none has-data-writing-block:-mt-(--shadow-height) has-data-writing-block:pt-(--shadow-height) [&amp;:has([data-writing-block])&gt;*]:pointer-events-auto [content-visibility:auto] supports-[content-visibility:auto]:[contain-intrinsic-size:auto_100lvh] scroll-mt-[calc(var(--header-height)+min(200px,max(70px,20svh)))]\" dir=\"auto\" data-turn-id=\"request-WEB:9b3f9d92-1d77-409a-8efa-1a7797fe6991-15\" data-testid=\"conversation-turn-32\" data-scroll-anchor=\"true\" data-turn=\"assistant\">\n<div class=\"text-base my-auto mx-auto pb-10 [--thread-content-margin:--spacing(4)] thread-sm:[--thread-content-margin:--spacing(6)] thread-lg:[--thread-content-margin:--spacing(16)] px-(--thread-content-margin)\">\n<div class=\"[--thread-content-max-width:40rem] thread-lg:[--thread-content-max-width:48rem] mx-auto max-w-(--thread-content-max-width) flex-1 group\/turn-messages focus-visible:outline-hidden relative flex w-full min-w-0 flex-col agent-turn\">\n<div class=\"flex max-w-full flex-col grow\">\n<div class=\"min-h-8 text-message relative flex w-full flex-col items-end gap-2 text-start break-words whitespace-normal [.text-message+&amp;]:mt-1\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"44af350d-9816-4e80-8a7b-d70aa98d3f3a\" data-message-model-slug=\"gpt-5\">\n<div class=\"flex w-full flex-col gap-1 empty:hidden first:pt-[1px]\">\n<div class=\"markdown prose dark:prose-invert w-full break-words light markdown-new-styling\">\n<article class=\"text-token-text-primary w-full focus:outline-none [--shadow-height:45px] has-data-writing-block:pointer-events-none has-data-writing-block:-mt-(--shadow-height) has-data-writing-block:pt-(--shadow-height) [&amp;:has([data-writing-block])&gt;*]:pointer-events-auto [content-visibility:auto] supports-[content-visibility:auto]:[contain-intrinsic-size:auto_100lvh] scroll-mt-[calc(var(--header-height)+min(200px,max(70px,20svh)))]\" dir=\"auto\" data-turn-id=\"request-WEB:9b3f9d92-1d77-409a-8efa-1a7797fe6991-16\" data-testid=\"conversation-turn-34\" data-scroll-anchor=\"true\" data-turn=\"assistant\">\n<div class=\"text-base my-auto mx-auto pb-10 [--thread-content-margin:--spacing(4)] thread-sm:[--thread-content-margin:--spacing(6)] thread-lg:[--thread-content-margin:--spacing(16)] px-(--thread-content-margin)\">\n<div class=\"[--thread-content-max-width:40rem] thread-lg:[--thread-content-max-width:48rem] mx-auto max-w-(--thread-content-max-width) flex-1 group\/turn-messages focus-visible:outline-hidden relative flex w-full min-w-0 flex-col agent-turn\">\n<article class=\"text-token-text-primary w-full focus:outline-none [--shadow-height:45px] has-data-writing-block:pointer-events-none has-data-writing-block:-mt-(--shadow-height) has-data-writing-block:pt-(--shadow-height) [&amp;:has([data-writing-block])&gt;*]:pointer-events-auto [content-visibility:auto] supports-[content-visibility:auto]:[contain-intrinsic-size:auto_100lvh] scroll-mt-[calc(var(--header-height)+min(200px,max(70px,20svh)))]\" dir=\"auto\" data-turn-id=\"850c7def-f40f-44de-8662-db6d58d77360\" data-testid=\"conversation-turn-40\" data-scroll-anchor=\"true\" data-turn=\"assistant\">\n<div class=\"text-base my-auto mx-auto pb-10 [--thread-content-margin:--spacing(4)] thread-sm:[--thread-content-margin:--spacing(6)] thread-lg:[--thread-content-margin:--spacing(16)] px-(--thread-content-margin)\">\n<div class=\"[--thread-content-max-width:40rem] thread-lg:[--thread-content-max-width:48rem] mx-auto max-w-(--thread-content-max-width) flex-1 group\/turn-messages focus-visible:outline-hidden relative flex w-full min-w-0 flex-col agent-turn\">\n<div class=\"flex max-w-full flex-col grow\">\n<div class=\"min-h-8 text-message relative flex w-full flex-col items-end gap-2 text-start break-words whitespace-normal [.text-message+&amp;]:mt-1\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"b0be8eb2-81cb-4b9d-86a8-92e8cd44b36b\" data-message-model-slug=\"gpt-5\">\n<div class=\"flex w-full flex-col gap-1 empty:hidden first:pt-[1px]\">\n<div class=\"markdown prose dark:prose-invert w-full break-words light markdown-new-styling\">\n<article class=\"text-token-text-primary w-full focus:outline-none [--shadow-height:45px] has-data-writing-block:pointer-events-none has-data-writing-block:-mt-(--shadow-height) has-data-writing-block:pt-(--shadow-height) [&amp;:has([data-writing-block])&gt;*]:pointer-events-auto [content-visibility:auto] supports-[content-visibility:auto]:[contain-intrinsic-size:auto_100lvh] scroll-mt-[calc(var(--header-height)+min(200px,max(70px,20svh)))]\" dir=\"auto\" data-turn-id=\"request-WEB:9b3f9d92-1d77-409a-8efa-1a7797fe6991-20\" data-testid=\"conversation-turn-42\" data-scroll-anchor=\"true\" data-turn=\"assistant\">\n<div class=\"text-base my-auto mx-auto pb-10 [--thread-content-margin:--spacing(4)] thread-sm:[--thread-content-margin:--spacing(6)] thread-lg:[--thread-content-margin:--spacing(16)] px-(--thread-content-margin)\">\n<div class=\"[--thread-content-max-width:40rem] thread-lg:[--thread-content-max-width:48rem] mx-auto max-w-(--thread-content-max-width) flex-1 group\/turn-messages focus-visible:outline-hidden relative flex w-full min-w-0 flex-col agent-turn\">\n<div class=\"mt-3 w-full empty:hidden\"><\/div>\n<\/div>\n<\/div>\n<\/article>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/article>\n<\/div>\n<\/div>\n<\/article>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/article>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Resolve common authentication, database, and connection errors when using Supabase integration<\/p>\n","protected":false},"author":591,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[293],"tags":[],"class_list":["post-6608","post","type-post","status-publish","format-standard","hentry","category-hostinger-horizons"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/hostinger-horizons-troubleshooting-supabase","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/6608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/591"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=6608"}],"version-history":[{"count":12,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/6608\/revisions"}],"predecessor-version":[{"id":11134,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/6608\/revisions\/11134"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=6608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=6608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=6608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}