Skip to content

EMSCRIPTEN_FETCH_STREAM_DATA fails on chrome #7090

Closed

Description

@sbc100

The following line is used to set the responseType:

xhr.responseType = fetchAttrStreamData ? 'moz-chunked-arraybuffer' : 'arraybuffer';

Since moz-chunked-arraybuffer is not supported on chrome this line ends up setting responceType to '' which then confuses the later code which expects it to be an arraybuffer.

The fix I have working is to only try to use moz-chunked-arraybuffer on firefox and on chrome fall back to arraybuffer. This result is that the data is not actually streamed but all arrives in the final onprogess callback.

The alternative would simply be to fail with some kind of unsupported error on non-firefox browsers when the user tries to use EMSCRIPTEN_FETCH_STREAM_DATA. I think I prefer the former fix.

Activity

  1. VirtualTim commented on May 16, 2019

    @VirtualTim
    Collaborator

    Just ran into this and it's a bit annoying. I've created a PR to update the documentation.
    Personally I think that whatever we decide to do with this we need to spit out a console warning to inform people that the data is not actually streaming, otherwise the behaviour will confuse people.

  2. stale commented on May 15, 2020

    @stale

    This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions