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

java.lang.NoSuchMethodError on kotlinx.coroutines.selects.SelectKt.onTimeout #127

Closed
martijnblankestijn opened this issue May 20, 2023 · 3 comments

Comments

@martijnblankestijn
Copy link

Thanks for the library. Stumbled upon it when looking for a kotlin library in the style of Alpakka which I have used in my Scala days ;-)

When using the library in a testcase, the kafka consumer flow does not process anything and gives the stacktrace below.

Importing the kotlinx-coroutines-bom:1.6.4, the same version as was advertised in the libs.versions.toml to force the use of 1.6.4 within my project did not help.
The only thing that helped was cloning the git repo, build a SNAPSHOT from main and that ran without an issue on 1.6.4.
It also worked after upgrading the project to kotlinx-coroutines-bom:1.7.1"

Would it be possible to create a new release?

The stacktrace

	Suppressed: java.lang.NoSuchMethodError: 'void kotlinx.coroutines.selects.SelectKt.onTimeout-8Mi8wO0(kotlinx.coroutines.selects.SelectBuilder, long, kotlin.jvm.functions.Function1)'
		at io.github.nomisRev.kafka.internal.FlowTimeChunkedKt$chunked$3.invokeSuspend(FlowTimeChunked.kt:67)
		at io.github.nomisRev.kafka.internal.FlowTimeChunkedKt$chunked$3.invoke(FlowTimeChunked.kt)
		at io.github.nomisRev.kafka.internal.FlowTimeChunkedKt$chunked$3.invoke(FlowTimeChunked.kt)
		at kotlinx.coroutines.flow.internal.FlowCoroutineKt$scopedFlow$1$1.invokeSuspend(FlowCoroutine.kt:51)
		at kotlinx.coroutines.flow.internal.FlowCoroutineKt$scopedFlow$1$1.invoke(FlowCoroutine.kt)
		at kotlinx.coroutines.flow.internal.FlowCoroutineKt$scopedFlow$1$1.invoke(FlowCoroutine.kt)
		at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
		at kotlinx.coroutines.flow.internal.FlowCoroutineKt.flowScope(FlowCoroutine.kt:33)
		at kotlinx.coroutines.flow.internal.FlowCoroutineKt$scopedFlow$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:113)
		at PositionConsumer$positionsFlow$1$invokeSuspend$$inlined$map$1.collect(SafeCollector.common.kt:113)
		at kotlinx.coroutines.flow.FlowKt__EmittersKt$onStart$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:120)
		at kotlinx.coroutines.flow.FlowKt__EmittersKt$onCompletion$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:114)
		at kotlinx.coroutines.flow.internal.ChannelFlowMerge$collectTo$2$1.invokeSuspend(Merge.kt:69)
		at _COROUTINE._BOUNDARY._(CoroutineDebugging.kt:46)
		at io.github.nomisRev.kafka.internal.FlowTimeChunkedKt$chunked$3.invokeSuspend(FlowTimeChunked.kt:91)
		at kotlinx.coroutines.flow.internal.FlowCoroutineKt$scopedFlow$1$1.invokeSuspend(FlowCoroutine.kt:51)
		at kotlinx.coroutines.flow.FlowKt__EmittersKt$onStart$$inlined$unsafeFlow$1.collect(Emitters.kt:120)
		at kotlinx.coroutines.flow.FlowKt__EmittersKt$onCompletion$$inlined$unsafeFlow$1.collect(Emitters.kt:114)
		at kotlinx.coroutines.flow.internal.ChannelFlowMerge$collectTo$2$1.invokeSuspend(Merge.kt:69)
		at kotlinx.coroutines.flow.FlowKt__EmittersKt$onStart$$inlined$unsafeFlow$1.collect(Emitters.kt:120)
		at kotlinx.coroutines.flow.FlowKt__EmittersKt$onCompletion$$inlined$unsafeFlow$1.collect(Emitters.kt:114)
		at kotlinx.coroutines.flow.FlowKt__CollectKt$launchIn$1.invokeSuspend(Collect.kt:50)
	Caused by: java.lang.NoSuchMethodError: 'void kotlinx.coroutines.selects.SelectKt.onTimeout-8Mi8wO0(kotlinx.coroutines.selects.SelectBuilder, long, kotlin.jvm.functions.Function1)'
		at io.github.nomisRev.kafka.internal.FlowTimeChunkedKt$chunked$3.invokeSuspend(FlowTimeChunked.kt:67)
@nomisRev
Copy link
Owner

Hey @martijnblankestijn,

Thank you so much for this issue.

There was indeed a breaking change in 1.7.0 of KotlinX. I will release a patch version in the coming week to fix this issue.

@martijnblankestijn
Copy link
Author

Thanks, I really appreciate the work!

@nomisRev
Copy link
Owner

Hey @martijnblankestijn,

Thank you again for the report, and support ☺️ I will invest some more time later this year to polish up the library, and release 1.0.0. Any feedback you might have towards that would be greatly appreciated! A public roadmap will be created soon.

New 0.3.1 release changelog can be found here, https://github.com/nomisRev/kotlin-kafka/releases/tag/0.3.1

nomisRev pushed a commit to arrow-kt/arrow-website that referenced this issue May 22, 2023
#202)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[io.github.nomisrev:kotlin-kafka](https://togithub.com/nomisrev/kafka-kotlin)
([source](https://togithub.com/nomisrev/kotlin-kafka)) | `0.3.0` ->
`0.3.1` |
[![age](https://badges.renovateapi.com/packages/maven/io.github.nomisrev:kotlin-kafka/0.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/maven/io.github.nomisrev:kotlin-kafka/0.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/maven/io.github.nomisrev:kotlin-kafka/0.3.1/compatibility-slim/0.3.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/maven/io.github.nomisrev:kotlin-kafka/0.3.1/confidence-slim/0.3.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>nomisrev/kotlin-kafka</summary>

###
[`v0.3.1`](https://togithub.com/nomisRev/kotlin-kafka/releases/tag/0.3.1)

[Compare
Source](https://togithub.com/nomisrev/kotlin-kafka/compare/0.3.0...0.3.1)

### 0.3.1

Fixes breaking change introduced by KotlinX Coroutines 1.7.x, reported
in
[nomisRev/kotlin-kafka#127.
This release contains no actual changes except for dependency updates.

#### What's Changed

- Update all dependencies to v5.4.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#62
- Update all dependencies to v3.2.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#63
- Update dependency gradle to v7.5.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#64
- Update all dependencies to v5.4.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#65
- Update gradle/gradle-build-action action to v2.2.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#66
- Update gradle/gradle-build-action action to v2.2.4 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#67
- Update all dependencies to v2 (major) by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#69
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#68
- Update gradle/gradle-build-action action to v2.3.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#70
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#71
- Update all dependencies to v2.0.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#72
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#73
- Update gradle/gradle-build-action action to v2.3.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#74
- Update actions/setup-java action to v3.5.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#75
- Update all dependencies to v2.0.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#77
- Update all dependencies to v3.3.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#78
- Update all dependencies to v1.7.20 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#79
- Update gradle/gradle-build-action action to v2.3.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#80
- Update dependency org.testcontainers:kafka to v1.17.4 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#81
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#82
- Update dependency org.jetbrains.kotlinx.kover to v0.6.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#83
- Update actions/checkout action to v3.1.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#84
- Update dependency org.testcontainers:kafka to v1.17.5 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#85
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#86
- Update actions/setup-java action to v3.6.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#87
- Update gradle/gradle-build-action action to v2.3.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#88
- Update all dependencies to v5.5.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#89
- Update all dependencies to v5.5.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#90
- Update all dependencies to v5.5.4 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#91
- Update all dependencies to v1.7.21 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#92
- Update dependency org.testcontainers:kafka to v1.17.6 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#93
- Update all dependencies to v2.0.4 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#94
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#95
- Update all dependencies to v1.7.22 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#96
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#97
- Update actions/setup-java action to v3.8.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#98
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#99
- Update actions/setup-java action to v3.9.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#100
- Remove duplicate constructor param by
[@&#8203;nomisRev](https://togithub.com/nomisRev) in
[nomisRev/kotlin-kafka#101
- Fix pause during rebalance by
[@&#8203;nomisRev](https://togithub.com/nomisRev) in
[nomisRev/kotlin-kafka#103
- Update all dependencies to v1.8.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#104
- Update actions/checkout action to v3.3.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#105
- Update all dependencies to v3.3.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#106
- Update all dependencies to v1.8.10 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#107
- Update all dependencies to v5.5.5 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#108
- Update all dependencies to v3.4.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#109
- Update actions/setup-java action to v3.10.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#110
- Update dependency gradle to v8 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#111
- Update gradle/gradle-build-action action to v2.4.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#112
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#113
- Update actions/checkout action to v3.4.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#114
- Update all dependencies to v2.0.7 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#115
- Update actions/checkout action to v3.5.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#116
- Update actions/setup-java action to v3.11.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#117
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#118
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#119
- Update all dependencies to v5.6.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#120
- Update all dependencies to v5.6.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#121
- Update dependency gradle to v8.1.1 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#122
- Update all dependencies to v1.8.21 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#123
- Update all dependencies to v1.7.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#124
- Update all dependencies by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#125
- Update dependency org.jetbrains.kotlinx.kover to v0.7.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[nomisRev/kotlin-kafka#126

**Full Changelog**:
nomisRev/kotlin-kafka@0.3.0...0.3.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/arrow-kt/arrow-website).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45OC4wIiwidXBkYXRlZEluVmVyIjoiMzUuOTguMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants