lms icon indicating copy to clipboard operation
lms copied to clipboard

Http::ResponseContinuation: WebWriteEvent::Error

Open bmsleight opened this issue 3 years ago • 18 comments

iOS Plays less than 90s before going back to start of song. Android plays fine. Logs below but with IP address removed.

[2020-Nov-15 13:29:31.250] 23753 - [info] "Wt: session created (#sessions = 3)"
[2020-Nov-15 13:29:31.250] 23753 [/ H5Vz9FeKur0J1BAH] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15"
[2020-Nov-15 13:29:31.600] 23753 [/ H5Vz9FeKur0J1BAH] [info] - [UI] User 'colin' logged in from 'REMOVED.71', user agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
[2020-Nov-15 13:29:33.643] 23753 - [info] "Wt: session created (#sessions = 4)"
[2020-Nov-15 13:29:33.643] 23753 [/ GKPNCFgzU9hWgOT5] [info] "WEnvironment: UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15"
[2020-Nov-15 13:29:33.741] 23753 [/ GKPNCFgzU9hWgOT5] [info] - [UI] User 'colin' logged in from 'REMOVED.71', user agent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
[2020-Nov-15 13:29:33.742] 23753 [/ H5Vz9FeKur0J1BAH] [info] "WebController: Removing session H5Vz9FeKur0J1BAH"
[2020-Nov-15 13:29:33.744] 23753 [/ H5Vz9FeKur0J1BAH] [info] "Wt: session destroyed (#sessions = 3)"
[2020-Nov-15 13:29:34.575] 23753 [/ GKPNCFgzU9hWgOT5] [info] - [TRANSCODE] [1] - Transcoding file '/home/bms/CT_iTunes/iTunes/iTunes Music/Longview/Mercury/03 Falling For You.m4a'
[2020-Nov-15 13:29:35.929] 23753 [/ GKPNCFgzU9hWgOT5] [info] - [TRANSCODE] [2] - Transcoding file '/home/bms/CT_iTunes/iTunes/iTunes Music/Longview/Mercury/03 Falling For You.m4a'
[2020-Nov-15 13:29:36.577] 23753 - [error] "Http::ResponseContinuation: WebWriteEvent::Error"
[2020-Nov-15 13:29:43.208] 23753 - [error] "Http::ResponseContinuation: WebWriteEvent::Error"
[2020-Nov-15 13:29:44.380] 23753 [/ GKPNCFgzU9hWgOT5] [info] - [UI] Notifying message 'Added 1 track' of type 'info'
[2020-Nov-15 13:29:44.601] 23753 [/ GKPNCFgzU9hWgOT5] [info] - [TRANSCODE] [3] - Transcoding file '/home/bms/CT_iTunes/iTunes/iTunes Music/Guillemots/Through The Window Pane/02 Made Up Love Song #43.m4a'
[2020-Nov-15 13:29:45.565] 23753 [/ GKPNCFgzU9hWgOT5] [info] - [TRANSCODE] [4] - Transcoding file '/home/bms/CT_iTunes/iTunes/iTunes Music/Guillemots/Through The Window Pane/02 Made Up Love Song #43.m4a'
[2020-Nov-15 13:29:45.925] 23753 - [error] "Http::ResponseContinuation: WebWriteEvent::Error"
[2020-Nov-15 13:29:51.654] 23753 - [error] "Http::ResponseContinuation: WebWriteEvent::Error"
[2020-Nov-15 13:29:52.532] 23753 [/ GKPNCFgzU9hWgOT5] [info] - [TRANSCODE] [5] - Transcoding file '/home/bms/CT_iTunes/iTunes/iTunes Music/Guillemots/Through The Window Pane/02 Made Up Love Song #43.m4a'
[2020-Nov-15 13:29:57.156] 23753 - [error] "Http::ResponseContinuation: WebWriteEvent::Error"
[2020-Nov-15 13:31:04.793] 23753 [/ GKPNCFgzU9hWgOT5] [info] - [TRANSCODE] [6] - Transcoding file '/home/bms/CT_iTunes/iTunes/iTunes Music/Guillemots/Through The Window Pane/02 Made Up Love Song #43.m4a'
[2020-Nov-15 13:31:08.253] 23753 - [error] "Http::ResponseContinuation: WebWriteEvent::Error"
[2020-Nov-15 13:31:10.428] 23753 [/ GKPNCFgzU9hWgOT5] [info] - [TRANSCODE] [7] - Transcoding file '/home/bms/CT_iTunes/iTunes/iTunes Music/Guillemots/Through The Window Pane/02 Made Up Love Song #43.m4a'

LMS is running via behind a Reverse proxy - nginx. Setting for iOS as per No audio in Safari (macOS and iOS) #105 - Enable transcoding: Always, Transcode format: mp3

Playing on linux fine:- [2020-Nov-15 14:05:22.616] 23753 [/ rnAsL9BjOByDPJNs] [info] - [TRANSCODE] [54] - Transcoding file '/home/bms/CT_iTunes/iTunes/iTunes Music/Richard Ashcroft/Alone With Everybody/01 A Song For The Lovers.m4a'

Hint might be on length of transcodign shown https://i.imgur.com/z5ciQsA.png - iOS https://i.imgur.com/tbvQcme.png - Linux

bmsleight avatar Nov 15 '20 14:11 bmsleight

Hi! Thanks for reporting this. Unfortunately I don't have access to apple devices to test. Some questions:

  • per default, the player tries to play the original file (no transcoding) and fallback on the configured transcoding settings if it does not succeed to load the file. This would mean that safari can't read both m4a files and ogg/opus (the default transcode output format) ? Could you please tell me if reading a MP3 file with transcode set to off work?
  • what nginx proxy config do you use?
  • indeed the displayed duration is really suspicious. Is it starting from 0 when you play the song from the beginning?

epoupon avatar Nov 15 '20 14:11 epoupon

And by the way, how does it perform without nginx proxy?

epoupon avatar Nov 15 '20 14:11 epoupon

Unfortunately I don't have access to apple devices to test. Me too! I am resetting a iPad. I have knocking around. To see if I can test on my lan. (The person using iOS is remote). If I have no joy I will post the iPad mini to France

Could you please tell me if reading a MP3 file with transcode set to off work? Will do, waiting for end-use to be back online

nginx

server {
    listen 80;

    server_name colinsmusic.uk.to;

    access_log            /var/log/nginx/myserver.access.log;

    proxy_request_buffering off;
    proxy_buffering off;
    proxy_buffer_size 4k;

    location / {

      proxy_set_header        Host $host;
      proxy_set_header        X-Real-IP $remote_addr;
      proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header        X-Forwarded-Proto $scheme;

      proxy_pass          http://colinsmusic.lan:5082/;
      proxy_read_timeout  120;
    }
}

And by the way, how does it perform without nginx proxy? Also dont have iOS. Work find on all other devices, with and without proxy.

bmsleight avatar Nov 15 '20 16:11 bmsleight

Thanks for this first information! Tell me when you know more about the transcode settings.

epoupon avatar Nov 16 '20 08:11 epoupon

Sigh - have to wait until 27th Nov until Apple unlock the iPad mini [This is why I have all linux machines ;) ]

bmsleight avatar Nov 16 '20 22:11 bmsleight

Now have ipad locally. Any suggestions on logs to look at ?

bmsleight avatar Dec 05 '20 11:12 bmsleight

Same issue on Safari and Firefox on iPad

bmsleight avatar Dec 05 '20 11:12 bmsleight

Great! Maybe we could focus first on the most annoying issue: #105 (i.e. no sound with transcoding set to never) The most useful information would be to get the logs/errors of the browser (maybe you could do that with remote debugging tools or whatever if don't manage to get them locally. Well that's what I did before for chrome and android)

epoupon avatar Dec 05 '20 13:12 epoupon

By the way, for this issue, could you please tell me if something like "keepalive_timeout 10m;" solves the problem?

epoupon avatar Dec 12 '20 14:12 epoupon

On the Proxy ?

NB: Also having issue when not using Proxy.

On Sat, 12 Dec 2020, 14:13 Emeric POUPON, [email protected] wrote:

By the way, for this issue, could you please tell me if something like "keepalive_timeout=10m" solves the problem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/epoupon/lms/issues/106#issuecomment-743762139, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4VSNO6OXKNTXY632XZWQLSUN3ANANCNFSM4TWG5VVQ .

bmsleight avatar Dec 12 '20 14:12 bmsleight

Ah ok, I thought you had the issue only with the proxy

epoupon avatar Dec 12 '20 15:12 epoupon

I found these errors in my log as well, as I was experiencing many interruptions/song skips when playing through the Subsonic API (using the play:Sub app for iOS). It had worked fine and stable not too long ago. So after tweaking with various settings in app and other places, I gave up and downgraded to v3.22.0, and I no longer experience any problems.

mam avatar Jan 19 '21 00:01 mam

Ah, this is interesting since the transcoding part has changed in 3.23. @mam Do you use transcoding via the subsonic api?

epoupon avatar Jan 19 '21 05:01 epoupon

@epoupon Yes, I do use transcoding with Subsonic, with these options: Format: Ogg/Opus Transcode bitrate: 192

mam avatar Jan 19 '21 07:01 mam

Hmm this is strange, it works fine using these settings with DSub/Android. The whole file needs to be received so that the playback can start though. Do you use a reverse proxy?

epoupon avatar Jan 19 '21 07:01 epoupon

I do use Caddy for reverse proxying.

mam avatar Jan 19 '21 07:01 mam

@mam : as timings have changed, maybe raising timeouts in the proxy settings might help. I had issues too using the web interface in transcode mode, the web player was getting conn reset from the proxy. I raised all the timeouts I found in the proxy config it seems to solve (send_timeout, keepalive_timeout, etc.).

epoupon avatar Jan 20 '21 09:01 epoupon

@epoupon Thanks for the advice. I have raised the write_timeout in Caddy (defaults to no timeout) to 1 minute. Didn't change the other timeout options. So far I've been able to play some 5-6 songs without problems, so it seem to have done the trick. Thanks for your work, looking forward to coming releases :)

mam avatar Jan 20 '21 12:01 mam

See #310

epoupon avatar Dec 17 '23 17:12 epoupon