Paging 3 with Ktor Server: Unable to create converter for class ApiResponse error=java.lang.IllegalArgumentException: Unable to create converter

I’m encountering an issue while trying to paginate data from a Ktor server using the Paging 3 library in my Android project. The error I’m receiving is:
error=java.lang.IllegalArgumentException: Unable to create converter for class com.example.realhome.domain.model.ApiResponse
The Error coming from the log in this code


@ExperimentalCoilApi
@Composable
fun listContent(propertys: LazyPagingItems<Property>,navHostController: NavHostController){
    Log.d("List content", propertys.loadState.toString())
LazyColumn(contentPadding = PaddingValues(all =10.dp),
    verticalArrangement = Arrangement.spacedBy(10.dp)){
  items(
      items = propertys,
      key = {property->property.id}){
property->property?.let { Propertyitem(property = it, navHostController = navHostController) }
  }
}

    }

And the desired data is not showing in the app
here is the retrofit code

object networkModule {
@Provides
@Singleton
    fun providehttpclient():OkHttpClient{
        return OkHttpClient.Builder().readTimeout(15,TimeUnit.MINUTES)
            .connectTimeout(15,TimeUnit.MINUTES).build()
    }


    @Provides
    @Singleton
    fun provideretrfitinstance(okHttpClient: OkHttpClient): Retrofit {
        val contentType = "application/json".toMediaType()
        return Retrofit.Builder().baseUrl(BASE_URL).client(okHttpClient)
            .addConverterFactory(Json.asConverterFactory(contentType)).build()

    }
}

and the project is building and installing fine but no data is showing

I tried to check the api response code and the remote mediator code and they were fine and I can’t know what went wrong


interface PropertyApi {
    @GET("/RealHomes/Properites")
    suspend fun getallproperties(
        @Query("page") page:Int = 1
    ):ApiResponse

and here is the remote mediator code


@ExperimentalPagingApi
//@OptIn(ExperimentalPagingApi::class)
class propertyRemoteMediator @Inject constructor(
    private val PropertyApi: PropertyApi,
    private val propertyDatabase: propertyDatabase


) : RemoteMediator<Int, Property>() {

    private val propertyDao = propertyDatabase.propertyDao()
    private val propertyRemoteKeyDao = propertyDatabase.propertyRemoteKeyDao()


    override suspend fun load(
        loadType: LoadType,
        state: PagingState<Int, Property>
    ): MediatorResult {
        return try {
            val page = when (loadType) {
                LoadType.PREPEND -> {
                    val remotekey = getRemoteKeyClosetToCurrentPosition(state)
                    remotekey?.nextpage?.minus(1) ?: 1
                }

                LoadType.REFRESH -> {
                    val remoteKey = getRemoteKeyForFirst(state)
                    val prevpage = remoteKey?.prevpage
                        ?: return MediatorResult.Success(endOfPaginationReached = remoteKey != null)

                    prevpage
                }

                LoadType.APPEND -> {
                    val remoteKey = getRemoteKeyForLastItem(state)
                    val nextpage = remoteKey?.nextpage
                        ?: return MediatorResult.Success(endOfPaginationReached = remoteKey != null)
                    nextpage

                }
            }


            val respose = PropertyApi.getallproperties(page = page)
            if (respose.properties.isNotEmpty()) {
                propertyDatabase.withTransaction {
                    if (loadType == LoadType.REFRESH) {
                        propertyDao.deleteAllProperties()
                        propertyRemoteKeyDao.deleteAllRemoteKeys()
                    }
                    val prevpage = respose.prevpage
                    val nextpage = respose.nextpage
                    val keys = respose.properties.map { property ->
                        propertyRemoteKey(
                            id = property.id,
                            prevpage = prevpage,
                            nextpage = nextpage

                        )
                    }
                    propertyRemoteKeyDao.addAllRemoteKeys(keys)
                    propertyDao.addProperty(respose.properties)
                }

            }
            MediatorResult.Success(endOfPaginationReached = respose.nextpage == null)
        } catch (e: Exception) {
            return MediatorResult.Error(e)
        }
        TODO("Not yet implemented")
    }


    private suspend fun getRemoteKeyClosetToCurrentPosition(state: PagingState<Int, Property>):
            propertyRemoteKey? {
        return state.anchorPosition?.let { position ->
            state.closestItemToPosition(position)?.id?.let { id ->
                propertyRemoteKeyDao.getRemoteKey(id = id)
            }
        }
    }

    private suspend fun getRemoteKeyForFirst(state: PagingState<Int, Property>): propertyRemoteKey? {
        return state.pages.firstOrNull { it.data.isNotEmpty() }?.data?.firstOrNull()
            ?.let { property ->
                propertyRemoteKeyDao.getRemoteKey(id = property.id)
            }
    }

    private suspend fun getRemoteKeyForLastItem(state: PagingState<Int, Property>): propertyRemoteKey? {
        return state.pages.lastOrNull { it.data.isNotEmpty() }?.data?.lastOrNull()
            ?.let { property -> propertyRemoteKeyDao.getRemoteKey(id = property.id) }
    }


}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật