Kotlin coroutine support missing

Open
#177 16 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
kotlin
Domain
api, mobile-dev

Research direction

Start by reproducing the crash from NextcloudRetrofitServiceMethod.invoke() at line 124 with the suspend methods in the shown BookmarkService interface. Compare the parameter annotations and coroutine-generated method shape with the Retrofit 2.6.4 dependencies. Done means both suspend calls work without the exception while preserving their query parameters.

Written by the indexing model from the issue text.

Description

enhancement

I always get an exception on line 124 of NextcloudRetrofitServiceMethod.invoke():

        // Build/parse dynamic parameters
        for(int i = 0; i < parameterAnnotationsArray.length; i++) {
            Annotation annotation = parameterAnnotationsArray[i][0]; // <----- Blows up

I tried debugging this method, but every time it hits a breakpoint in here the app crashes.

Here's my Retrofit:

interface BookmarkService {

    @GET("bookmark")
    suspend fun getBookmarks(
        @Query("folder") folderId: Int,
        @Query("page") page: Int,
        @Query("tags") tags: List<String>
    ): DtoBookmarks

    @GET("folder?layers=1")
    suspend fun getFolders(
        @Query("root") parentFolderId: Int
    ): DtoFolders
}

These are my dependencies:

    implementation 'com.github.nextcloud:Android-SingleSignOn:0.5.0-rc4'
    implementation 'com.squareup.retrofit2:retrofit:2.6.4'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.4'

Let me know if you need any more info.

Dominant language
Java
Stars
74
Forks
36
Avg merge
1d 6h
Merged PRs (30d)
15

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/Android-SingleSignOn

All issues in nextcloud/Android-SingleSignOn

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.