© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•14mo ago•
2 replies
LornMalvo

Supabase-storage installation problem

Hello,

I have a Kotlin Spring Boot project.
I'm trying to install supabase storage but I'm having problems

Here is my Supabase configuration file:

@Configuration
class SupabaseConfiguration {
    @Bean
    fun supabaseClient(): SupabaseClient {
        return createSupabaseClient(
            supabaseUrl = "http://XX.XX.XX.XX:8000/",
            supabaseKey = "XXXXX"
        ) {
            install(Auth)
            install(Postgrest)
            install(Storage) {
                transferTimeout = 90.seconds // Default: 120 seconds
            }
            defaultSerializer = KotlinXSerializer(Json)
        }
    }
}
@Configuration
class SupabaseConfiguration {
    @Bean
    fun supabaseClient(): SupabaseClient {
        return createSupabaseClient(
            supabaseUrl = "http://XX.XX.XX.XX:8000/",
            supabaseKey = "XXXXX"
        ) {
            install(Auth)
            install(Postgrest)
            install(Storage) {
                transferTimeout = 90.seconds // Default: 120 seconds
            }
            defaultSerializer = KotlinXSerializer(Json)
        }
    }
}


I use the Supabase client in my service :

@Service
class BucketService(

) {
    @Autowired
    private lateinit var supabaseClient: SupabaseClient

    suspend fun getBucketById(): String {
        val bucket = supabaseClient.storage.retrieveBucketById("data") ?: throw IllegalArgumentException("No data found")
        return bucket.name
    }

}
@Service
class BucketService(

) {
    @Autowired
    private lateinit var supabaseClient: SupabaseClient

    suspend fun getBucketById(): String {
        val bucket = supabaseClient.storage.retrieveBucketById("data") ?: throw IllegalArgumentException("No data found")
        return bucket.name
    }

}


The error occurs when I try to call my endpoint :

Error: (Supabase-Core) GET request to endpoint /storage/v1/bucket/data failed with exception Parameter specified as non-null is null: method io.ktor.client.engine.apache5.BasicResponseConsumer.consumeResponse, parameter httpContext
java.lang.NullPointerException: Parameter specified as non-null is null: method io.ktor.client.engine.apache5.BasicResponseConsumer.consumeResponse, parameter httpContext


I think it must come from the Ktor configuration
I just put the dependencies in my pom.xml
Any idea ?

Thanks
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Supabase Storage
SupabaseSSupabase / help-and-questions
4y ago
Storage problem
SupabaseSSupabase / help-and-questions
5w ago
Supabase storage issue
SupabaseSSupabase / help-and-questions
7d ago
Supabase Storage error
SupabaseSSupabase / help-and-questions
3mo ago