Bug report
Describe the bug
storage_client 2.5.0 introduced _transformStorageUrl() in SupabaseStorageClient which unconditionally rewrites storage URLs:
https://<project-ref>.supabase.co/storage/v1
→ https://<project-ref>.storage.supabase.co/v1
The dedicated storage host (*.storage.supabase.co) is not available on all projects. For projects where it isn't enabled, every storage API call fails with StorageException: Invalid Storage request.
This silently breaks createSignedUrl, createSignedUrls, upload, download, and all other storage operations.
To Reproduce
- Have a Supabase project where
<project-ref>.storage.supabase.co returns 404
- Upgrade to
storage_client 2.5.0 (via supabase_flutter ^2.3.4 + flutter pub upgrade)
- Call
supabase.storage.from('any-bucket').createSignedUrl('any/path.jpg', 3600)
- Get
StorageException: Invalid Storage request
Expected behavior
The URL transformation should either:
- Check if the dedicated host is available before rewriting (e.g., HEAD request or feature flag)
- Fall back to the legacy URL if the dedicated host returns an error
- Not be applied by default — let projects opt in
Evidence
Verified the dedicated host doesn't exist for our project:
https://<ref>.storage.supabase.co/v1/object/list/posts → 404
https://<ref>.supabase.co/storage/v1/object/list/posts → 400 (alive, needs auth)
Root cause
storage_client.dart lines 58-85:
static String _transformStorageUrl(String url) {
// Unconditionally rewrites to *.storage.supabase.co
// No availability check, no fallback
}
Workaround
Pin storage_client to 2.4.0 in pubspec.yaml:
dependency_overrides:
storage_client: 2.4.0
Version
supabase_flutter: 2.12.1
storage_client: 2.5.0
supabase: 2.10.3
- Flutter 3.41.5 / Dart 3.11.1
Platform
Android (also affects iOS — any platform using storage_client 2.5.0)
Bug report
Describe the bug
storage_client2.5.0 introduced_transformStorageUrl()inSupabaseStorageClientwhich unconditionally rewrites storage URLs:The dedicated storage host (
*.storage.supabase.co) is not available on all projects. For projects where it isn't enabled, every storage API call fails withStorageException: Invalid Storage request.This silently breaks
createSignedUrl,createSignedUrls,upload,download, and all other storage operations.To Reproduce
<project-ref>.storage.supabase.coreturns 404storage_client2.5.0 (viasupabase_flutter ^2.3.4+flutter pub upgrade)supabase.storage.from('any-bucket').createSignedUrl('any/path.jpg', 3600)StorageException: Invalid Storage requestExpected behavior
The URL transformation should either:
Evidence
Verified the dedicated host doesn't exist for our project:
https://<ref>.storage.supabase.co/v1/object/list/posts→ 404https://<ref>.supabase.co/storage/v1/object/list/posts→ 400 (alive, needs auth)Root cause
storage_client.dartlines 58-85:Workaround
Pin
storage_clientto 2.4.0 inpubspec.yaml:Version
supabase_flutter: 2.12.1storage_client: 2.5.0supabase: 2.10.3Platform
Android (also affects iOS — any platform using
storage_client2.5.0)