Skip to content

UnsupportedOperationException on SSLSocket.shutdownOutput #9123

@lon9man

Description

@lon9man

WHAT I DID

i use okhttp 5.2.0 in Jetpack Compose project. today tried latest Android Studio and emulator on Android API 23

Build #AI-251.26094.121.2513.14007798, built on August 28, 2025
Runtime version: 21.0.7+-13880790-b1038.58 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.5
Kotlin plugin: K2 mode
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 6144M
Cores: 14
Metal Rendering is ON
Registry:
  ide.instant.shutdown=false
  debugger.watches.in.variables=false
  completion.show.intention.icon=false
  ide.experimental.ui=true
Non-Bundled Plugins:
  com.intellij.plugins.xwinkeymap (211.4961.30)
  Docker (251.26094.141)
  com.intellij.plugins.gnomekeymap (213.4250.391)
  com.apollographql.ijplugin (5.0.0)
  com.developerphil.adbidea (1.6.19)

emulator properties:

Properties
avd.ini.displayname              Nexus 5 API 23
avd.ini.encoding                 UTF-8
AvdId                            Nexus_5_API_23
disk.dataPartition.size          2G
fastboot.chosenSnapshotFile      
fastboot.forceChosenSnapshotBoot no
fastboot.forceColdBoot           no
fastboot.forceFastBoot           yes
hw.accelerometer                 yes
hw.arc                           false
hw.audioInput                    yes
hw.battery                       yes
hw.camera.back                   virtualscene
hw.camera.front                  emulated
hw.cpu.ncore                     4
hw.device.hash2                  MD5:b2095f91cdc43a64f165f9b79403516f
hw.device.manufacturer           Google
hw.device.name                   Nexus 5
hw.dPad                          no
hw.gps                           yes
hw.gpu.enabled                   yes
hw.gpu.mode                      auto
hw.gyroscope                     yes
hw.initialOrientation            portrait
hw.keyboard                      yes
hw.lcd.density                   480
hw.lcd.height                    1920
hw.lcd.width                     1080
hw.mainKeys                      no
hw.ramSize                       2048
hw.sdCard                        yes
hw.sensors.light                 yes
hw.sensors.magnetic_field        yes
hw.sensors.orientation           yes
hw.sensors.pressure              yes
hw.sensors.proximity             yes
hw.trackBall                     no
image.sysdir.1                   system-images/android-23/google_apis/arm64-v8a/
PlayStore.enabled                false
runtime.network.latency          none
runtime.network.speed            full
showDeviceFrame                  yes
skin.dynamic                     yes
tag.display                      Google APIs
tag.displaynames                 Google APIs
tag.id                           google_apis
tag.ids                          google_apis
target                           android-23
vm.heapSize                      128

WHAT I GOT

Process: xxx, PID: 3403
java.lang.UnsupportedOperationException
  at javax.net.ssl.SSLSocket.shutdownOutput(SSLSocket.java:851)
  at okio.internal.DefaultSocket$SocketSink.close(DefaultSocket.kt:95)
  at okio.RealBufferedSink.close(RealBufferedSink.kt:287)
  at okhttp3.internal.http2.Http2Writer.close(Http2Writer.kt:331)
  at okhttp3.internal.http2.Http2Connection.close$okhttp(Http2Connection.kt:474)
  at okhttp3.internal.http2.Http2Connection$ReaderRunnable.invoke(Http2Connection.kt:638)
  at okhttp3.internal.http2.Http2Connection$ReaderRunnable.invoke(Http2Connection.kt:619)
  at okhttp3.internal.concurrent.TaskQueue$execute$1.runOnce(TaskQueue.kt:112)
  at okhttp3.internal.concurrent.TaskRunner$runnable$1.run(TaskRunner.kt:81)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
  at java.lang.Thread.run(Thread.java:818)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug in existing code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions