Shaka Player demo (http://shaka-player-demo.appspot.com/demo/) on Firefox (50.0) WIndows 7 machine is getting Network.BAD_HTTP_STATUS for DASH playlist of 2s and 6s segment

I can't reproduce, but it looks like a time sync issue. The demo app has a default clock sync configuration that should keep your client synchronized with a known-good time source.
Can you reproduce the error on any other browser on that machine? Are there any other errors or any failed network requests showing in the JavaScript console?
It works fine on same machine on Chrome. It also fails on Firefox Developer Edition 52.0a2 (2016-11-26) (32-bit)
Here are some console logs
http://vm2.dashif.org/livesim/utc_head/testpic_6s/A48/246672239.m4s [HTTP/1.1 404 Not Found 117ms]
GET
XHR
http://vm2.dashif.org/livesim/utc_head/testpic_6s/V300/246672239.m4s [HTTP/1.1 404 Not Found 236ms]
GET
XHR
http://vm2.dashif.org/livesim/utc_head/testpic_6s/V300/246672239.m4s [HTTP/1.1 404 Not Found 152ms]
Player error Object { category: 1, code: 1001, data: Array[3], message: "Shaka Error NETWORK.BAD_HTTP_STATUS…", stack: "shaka.util.Error@http://shaka-playe…" } main.js:190:3
shakaDemo.onError_ http://shaka-player-demo.appspot.com/demo/main.js:190:3
shakaDemo.onErrorEvent_ http://shaka-player-demo.appspot.com/demo/main.js:181:3
shaka.util.FakeEventTarget.prototype.dispatchEvent http://shaka-player-demo.appspot.com/lib/util/fake_event_target.js:114:9
shaka.cast.CastProxy.prototype.playerProxyLocalEvent_ http://shaka-player-demo.appspot.com/lib/cast/cast_proxy.js:517:3
shaka.util.FakeEventTarget.prototype.dispatchEvent http://shaka-player-demo.appspot.com/lib/util/fake_event_target.js:114:9
shaka.Player.prototype.onError_ http://shaka-player-demo.appspot.com/lib/player.js:1671:3
shaka.media.StreamingEngine.prototype.handleNetworkError_ http://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1170:5
shaka.media.StreamingEngine.prototype.fetchAndAppend_/< http://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1144:7
(video:3) Network error. Retrying... streaming_engine.js:1172:5
GET
XHR
http://vm2.dashif.org/livesim/utc_head/testpic_6s/A48/246672239.m4s [HTTP/1.1 404 Not Found 267ms]
Player error Object { category: 1, code: 1001, data: Array[3], message: "Shaka Error NETWORK.BAD_HTTP_STATUS…", stack: "shaka.util.Error@http://shaka-playe…" } main.js:190:3
(audio:1) Network error. Retrying... streaming_engine.js:1172:5
GET
XHR
http://vm2.dashif.org/livesim/utc_head/testpic_6s/V300/246672239.m4s [HTTP/1.1 404 Not Found 198ms]
GET
XHR
http://vm2.dashif.org/livesim/utc_head/testpic_6s/A48/246672239.m4s [HTTP/1.1 404 Not Found 228ms]
GET
XHR
http://vm2.dashif.org/livesim/utc_head/testpic_6s/V300/246672239.m4s [HTTP/1.1 404 Not Found 222ms]
Player error Object { category: 1, code: 1001, data: Array[3], message: "Shaka Error NETWORK.BAD_HTTP_STATUS…", stack: "shaka.util.Error@http://shaka-playe…" } main.js:190:3
(video:3) Network error. Retrying... streaming_engine.js:1172:5
GET
XHR
http://vm2.dashif.org/livesim/utc_head/testpic_6s/A48/246672239.m4s [HTTP/1.1 404 Not Found 207ms]
Player error Object { category: 1, code: 1001, data: Array[3], message: "Shaka Error NETWORK.BAD_HTTP_STATUS…", stack: "shaka.util.Error@http://shaka-playe…" } main.js:190:3
(audio:1) Network error. Retrying... streaming_engine.js:1172:5
GET
XHR
http://vm2.dashif.org/livesim/utc_head/testpic_6s/V300/246672239.m4s [HTTP/1.1 404 Not Found 220ms]
GET
XHR
http://vm2.dashif.org/livesim/utc_head/testpic_6s/A48/246672239.m4s [HTTP/1.1 404 Not Found 236ms]
@cheersalam: did you see these network errors before Firefox 50? Do you have any Firefox extensions installed that might interfere with HTTP requests? Can you reproduce this problem in Firefox Safe Mode? (Open about:support and click the "Restart with Add-ons Disabled" button.)
I can't reproduce in Firefox 49.0 on Ubuntu. (Tried to check Firefox 50, but it didn't like my version of libavcodec and I had to give up.)
For Shaka Player to get a 404 on a live stream, it means we are either requesting a segment that does not exist yet, or a segment that no longer is available. That means that the client's clock is not correctly synchronized with the server.
@cheersalam, after starting the live sim streams, can you please check the value of shakaDemo.localPlayer_.manifest_.presentationTimeline.clockOffset_ in the JS console in both Chrome and Firefox? That will help confirm that this is related to clock sync.
Also, please do as Chris asked and try to repro in Safe Mode and in Firefox 49.
I just tested this on macbook pro (El capitan) and default firefox(dev) v52.0a2 and I also get a Shaka Error NETWORK.BAD_HTTP_STATUS (http://vm2.dashif.org/livesim/utc_head/testpic_2s/V300/740853105.m4s,404,Request for 740853105.m4s was 7400.4s too late )
I can reproduce on Firefox on Mac. The problem here is that Firefox is doing a full cache of the time request. Meaning it is not even sending the HEAD request, it is using the old response which gives us a bad clock offset. The time sync server used for this asset does not have cache control headers (see Dash-Industry-Forum/Test-Vectors/53).
Unfortunately since this is cache related, there is nothing Shaka Player can do about it. The only way to force the browser to not use a cache is by changing the URL, which we shouldn't do (since we don't know what query parameters a server might be using).
How can I prevent this from happening if I use Shaka Player as a library?
@alam-bline (note this only applies to live content) You need to make sure that you have correct clock sync setup. The manifest should use UTCTiming elements. The time server should serve content with the correct cache control headers to disable caching of the responses. Instead of UTCTiming elements in the manifest, you can also pass a time server in the player configuration:
player.configure({manifest: {dash: {clockSyncUri: '//example.com/time.txt'}}});
Got it. thanks
@jyavenard: @TheModMaker says above that Firefox is caching requests to the time sync server, causing playback clock problems. Is this something Firefox's MSE code is doing?
@cpeterso No. this has nothing to do with MSE. MSE never performs any networking access. MSE is all about buffer management.
@cpeterso When we load the stream, we use XMLHttpRequest to make a HEAD request. The response has a header that we use to determine the clock sync. This response is cached in Firefox and is causing problems (because the cached header contains an old time).
Yes, exactly. The HEAD request the player makes is for time sync based on the Date header. @TheModMaker filed https://github.com/Dash-Industry-Forum/Test-Vectors/issues/53 to get the server fixed so that the response headers say not to cache it.
The caching headers have been fixed on http://vm2.dashif.org/dash/time.txt. Thanks for finding the issue.
Thanks, @TobbeEdgeware!
@cheersalam, since this has been fixed on the server, I will close this issue. Please let us know if we can do anything else for you.
Thanks @joeyparrish working fine now on Firefox both on windows and Ubuntu