Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error when using Kotlin 1.5.0 #319

Closed
kggilmer opened this issue May 8, 2021 · 4 comments
Closed

Runtime error when using Kotlin 1.5.0 #319

kggilmer opened this issue May 8, 2021 · 4 comments
Assignees
Labels
bug This issue is a bug.
Milestone

Comments

@kggilmer
Copy link
Contributor

kggilmer commented May 8, 2021

I created a fresh project to do a video demo, wrote some code and ran it. Found an error that after some experimentation seems related to Kotlin 1.5.0 as when I downgrade to 1.4.32 there is no error.

Sample code:

fun main(): Unit = runBlocking {
    val bucketName = "kotlin-sdk-s3-demo2"
    val client = S3Client { region = "us-east-2" }

    try {
        // Create a bucket
        val createBucketResponse = client.createBucket(CreateBucketRequest.invoke {
            bucket = bucketName
            createBucketConfiguration {
                locationConstraint = BucketLocationConstraint.UsEast2

            }
        })
        ...

Error:

Exception in thread "main" java.lang.NoSuchMethodError: 'double kotlin.time.TimeMark.elapsedNow-UwyO8pc()'
	at software.aws.clientrt.http.operation.SerializeHandler.call(SdkOperationExecution.kt:186)
	at software.aws.clientrt.http.operation.SerializeHandler.call(SdkOperationExecution.kt:101)
	at software.aws.clientrt.http.operation.InitializeHandler.call(SdkOperationExecution.kt:98)
	at software.aws.clientrt.io.middleware.Phase.handle(Phase.kt:46)
	at software.aws.clientrt.io.middleware.DecoratedHandler.call(Middleware.kt:40)
	at software.aws.clientrt.http.operation.SdkHttpOperationKt.execute(SdkHttpOperation.kt:86)
	at software.aws.clientrt.http.operation.SdkHttpOperationKt.roundTrip(SdkHttpOperation.kt:69)
	at aws.sdk.kotlin.services.s3.DefaultS3Client.createBucket(DefaultS3Client.kt:347)
	at S3WriteReadKt$main$1.invokeSuspend(S3WriteRead.kt:16)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at S3WriteReadKt.main(S3WriteRead.kt:10)
	at S3WriteReadKt.main(S3WriteRead.kt)

TimeMark does not seem to be referenced from SdkOperationExection however there is time measurement that may be related.

Possibly related:

@kggilmer kggilmer added the bug This issue is a bug. label May 8, 2021
@kggilmer
Copy link
Contributor Author

So kotlinx-coroutines-core is only in RC form for 1.5.0. Unable to find anything definitive regarding expected compat between minor versions or ETA in completion of RC for the library. Asking in kotlin slack.

@kggilmer kggilmer self-assigned this May 13, 2021
@kggilmer
Copy link
Contributor Author

Verified that bumping our compiled version in the SDK resolves the issue for client programs depending on Kotlin 1.5.0 and 1.4.32.

Per my note above, it would seem that the 1.5 release is not yet complete as the coroutines library doesn't have a stable 1.5 version yet. Based on this will hold off on completing this task until all dependencies we need are on a 1.5x release to avoid any potential issues w/ version mixing.

@kggilmer
Copy link
Contributor Author

Removing from current sprint as PRs are not actionable until coroutines dep has a 1.5 release.

@aajtodd
Copy link
Contributor

aajtodd commented Jun 3, 2021

closed by 348 and other linked PR's

@aajtodd aajtodd closed this as completed Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants