exoplayerandroid-media3

Exoplayer: https://go_fm.streampartner.nl/live?type=.mp3 url not playing


Does anyone know what this error of Exoplayer is trying to play: https://go_fm.streampartner.nl/live?type=.mp3:

2024-04-16 17:16:03.298 8130-8228 LoadTask com.familiekoning.radionedplus E Unexpected exception loading stream java.lang.IllegalArgumentException: Invalid input to toASCII: go_fm.streampartner.nl at java.net.IDN.toASCII(IDN.java:115) at javax.net.ssl.SNIHostName.(SNIHostName.java:99) at com.android.org.conscrypt.Platform.getSSLParameters(Platform.java:192) at com.android.org.conscrypt.ConscryptEngine.getSSLParameters(ConscryptEngine.java:525) at com.android.org.conscrypt.ConscryptEngineSocket.getSSLParameters(ConscryptEngineSocket.java:186) at com.android.okhttp.internal.Platform.configureTlsExtensions(Platform.java:121) at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:191) at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153) at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116) at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30) at androidx.media3.datasource.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:678) at androidx.media3.datasource.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:575) at androidx.media3.datasource.DefaultHttpDataSource.open(DefaultHttpDataSource.java:399) at androidx.media3.datasource.DefaultDataSource.open(DefaultDataSource.java:275) at androidx.media3.datasource.StatsDataSource.open(StatsDataSource.java:86) at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1029) at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:421) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012) Caused by: The input does not conform to the STD 3 ASCII rules. line: 0. preContext: . postContext: o_fm at android.icu.impl.IDNA2003.convertToASCII(IDNA2003.java:218) at android.icu.impl.IDNA2003.convertIDNToASCII(IDNA2003.java:276) at android.icu.text.IDNA.convertIDNToASCII(IDNA.java:654) at com.android.icu.text.ExtendedIDNA.convertIDNToASCII(ExtendedIDNA.java:50) at java.net.IDN.toASCII(IDN.java:108) ... 27 more 2024-04-16 17:16:03.322 8130-8168 ExoPlayerImplInternal com.familiekoning.radionedplus E Playback error androidx.media3.exoplayer.ExoPlaybackException: Source error at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:717) at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:693) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: androidx.media3.exoplayer.upstream.Loader$UnexpectedLoaderException: Unexpected IllegalArgumentException: Invalid input to toASCII: go_fm.streampartner.nl at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:442) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012) Caused by: java.lang.IllegalArgumentException: Invalid input to toASCII: go_fm.streampartner.nl at java.net.IDN.toASCII(IDN.java:115) at javax.net.ssl.SNIHostName.(SNIHostName.java:99) at com.android.org.conscrypt.Platform.getSSLParameters(Platform.java:192) at com.android.org.conscrypt.ConscryptEngine.getSSLParameters(ConscryptEngine.java:525) at com.android.org.conscrypt.ConscryptEngineSocket.getSSLParameters(ConscryptEngineSocket.java:186) at com.android.okhttp.internal.Platform.configureTlsExtensions(Platform.java:121) at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:191) at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153) at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116) at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30) at androidx.media3.datasource.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:678) at androidx.media3.datasource.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:575) at androidx.media3.datasource.DefaultHttpDataSource.open(DefaultHttpDataSource.java:399) at androidx.media3.datasource.DefaultDataSource.open(DefaultDataSource.java:275) at androidx.media3.datasource.StatsDataSource.open(StatsDataSource.java:86) at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1029) at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:421) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)  at java.lang.Thread.run(Thread.java:1012)  Caused by: The input does not conform to the STD 3 ASCII rules. line: 0. preContext: . postContext: o_fm

                                                                                                      at android.icu.impl.IDNA2003.convertToASCII(IDNA2003.java:218)
                                                                                                      at android.icu.impl.IDNA2003.convertIDNToASCII(IDNA2003.java:276)
                                                                                                      at android.icu.text.IDNA.convertIDNToASCII(IDNA.java:654)
                                                                                                      at com.android.icu.text.ExtendedIDNA.convertIDNToASCII(ExtendedIDNA.java:50)
                                                                                                      at java.net.IDN.toASCII(IDN.java:108)

Solution

  • This SO post and this GitHub issue answers the question, it is due to the URL containing an underscore character which the toAscii() method cannot handle.

    Thanks!