Hi,
I’m using Yatse 8.5.5/210652 @ Tolriq on Android 4.4.2,
and connecting to Kodi 2:17.4+git20170822.1 on Ubuntu 14.04.5 LTS.
I find I can’t play mp3s, or anything much, from the remote Kodi server. Occasionally if I persist I can play a track, but what usually happens when I play an album is a silent pause, and Yatse moves on to the next track, then another silent pause and the next, until the playlist is finished, or it shows a warning “too many errors, stopping playback”.
Playing audio files locally on the phone seems to work fine. Also, if I download the files first by clicking the down-arrow button, and they get a tick in the corner, they’ll play fine.
Enabling debugging in Yatse, I see the following in the logs (longer snippet below)
HTTP FAILED: java.net.ProtocolException: Unexpected status line:
There is nothing after the colon. The next line indicates the download is closed.
I infer Yatse is using OkHTTP, which has this error in the source:
It looks like it’s getting a malformed header. But when I download the URL in the logs with wget, I see the following headers, which look normal, and the download works fine:
wget --debug -v http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3Setting --verbose (verbose) to 1
DEBUG output created by Wget 1.17.1 on linux-gnu.
Reading HSTS entries from /home/nick/.wget-hsts
URI encoding = ‘UTF-8’
--2018-08-22 20:41:42-- http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3
Connecting to 192.168.0.51:8080... connected.
Created socket 3.
Releasing 0x000055bc60832560 (new refcount 0).
Deleting unused 0x000055bc60832560.
---request begin---
GET /vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3 HTTP/1.1
User-Agent: Wget/1.17.1 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: 192.168.0.51:8080
Connection: Keep-Alive
---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 200 OK
Content-Length: 3955911
Last-Modified: Sat, 13 May 2017 10:45:12 GMT
Expires: Thu, 22 Aug 2019 19:42:09 GMT
Content-Type: audio/mpeg3
Cache-Control: public, max-age=31536000
Accept-Ranges: bytes
Date: Wed, 22 Aug 2018 19:42:09 GMT
---response end---
200 OK
Registered socket 3 for persistent reuse.
Length: 3955911 (3.8M) [audio/mpeg3]
Saving to: ‘%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3’
I’ve even tried to replicate it with this groovy script, that uses okhttp, and it manages to download the file ok. So I suspect the problem is not with the Kodi server,
@Grab(group='com.squareup.okhttp3', module='okhttp', version='3.11.0')
import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url('http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3')
.build();
Response response = client.newCall(request).execute();
println response.headers()
I’ve also googled for the exception and related terms and not really found anything, certainly not Yatse related.
A longer segment of the logs surrounding the error. This error is repeated a few times before Yatse stops trying.
2018-08-22 19:04:39.219 Verbose/MusicPlayer: b.i@5231: Play: 0
2018-08-22 19:04:39.223 Verbose/MusicPlayer: e$1.a@1150: New audio focus: 2
2018-08-22 19:04:39.224 Verbose/StatusObserver: b$1.a@201: Status changed: 1
2018-08-22 19:04:39.227 Verbose/MusicPlayer: e.i@373: Acquiring wakelock
2018-08-22 19:04:39.231 Verbose/MusicPlayer: g.a@478: onPlayerStateChanged: true / 2
2018-08-22 19:04:39.234 Verbose/MusicPlayer: g.b@545: Starting playback of: http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.
mp3
2018-08-22 19:04:39.235 Verbose/MusicPlayer: g.b@552: onPositionDiscontinuity: 0 [1]
2018-08-22 19:04:39.238 Verbose/StatusObserver: b$1.a@201: Status changed: 2
2018-08-22 19:04:39.251 Verbose/FirebaseManager: a.i@413: Result: T999
2018-08-22 19:04:39.268 Verbose/MusicPlayer: g.a@466: onTimelineChanged: 0
2018-08-22 19:04:39.269 Verbose/MusicPlayer: g.c@562: onSeekProcessed
2018-08-22 19:04:39.285 Verbose/RemoteMediaItemDataSource: j.a@31: Preparing item: http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCind
erella.mp3
2018-08-22 19:04:39.286 Verbose/MediaHelper: j.a@199: Media should not use subtitles: Song - audio/mpeg
2018-08-22 19:04:39.293 Verbose/FirebaseManager: a.i@413: Result: T999
2018-08-22 19:04:39.316 Verbose/KodiLogger: --> [221] HEAD http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3
2018-08-22 19:04:39.328 Verbose/MusicPlayer: g.a@474: onLoadingChanged: true
2018-08-22 19:04:39.356 Verbose/KodiLogger: <-- [221] 200 OK http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3 (35ms, 0-by
te body)
2018-08-22 19:04:39.357 Verbose/KodiLogger: <-- [221] END HTTP (No body, response code 200)
2018-08-22 19:04:39.359 Verbose/KodiLogger: --> [576] GET http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3
2018-08-22 19:04:39.454 Verbose/KodiLogger: <-- [576] HTTP FAILED: java.net.ProtocolException: Unexpected status line:
2018-08-22 19:04:39.456 Verbose/RemoteMediaItemDataSource: j.b@48: Closing item: http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3
2018-08-22 19:04:39.466 Verbose/RemoteMediaItemDataSource: j.a@31: Preparing item: http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3
2018-08-22 19:04:39.468 Verbose/MediaHelper: j.a@199: Media should not use subtitles: Song - audio/mpeg
2018-08-22 19:04:39.474 Verbose/KodiLogger: --> [844] HEAD http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3
2018-08-22 19:04:39.485 Verbose/KodiLogger: <-- [844] 200 OK http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3 (8ms, 0-byte body)
2018-08-22 19:04:39.486 Verbose/KodiLogger: <-- [844] END HTTP (No body, response code 200)
2018-08-22 19:04:39.489 Verbose/KodiLogger: --> [340] GET http://192.168.0.51:8080/vfs/%2Fsrv%2FMusic%2FSonics%2FBoom%2FCinderella.mp3