Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploads/Downloads broken in upcoming browsers #9913

Closed
anoadragon453 opened this issue May 31, 2019 · 7 comments · Fixed by matrix-org/matrix-js-sdk#952
Closed

Uploads/Downloads broken in upcoming browsers #9913

anoadragon453 opened this issue May 31, 2019 · 7 comments · Fixed by matrix-org/matrix-js-sdk#952

Comments

@anoadragon453
Copy link
Member

anoadragon453 commented May 31, 2019

Description

Whenever a friend uploads a file, Riot will correct state the name and the correct filesize (1.84MB, 3.26MB, etc), but when anyone downloads any of them the contents of the file are just the following text:

function stream() { [native code] }

I don't believe it's a server problem as he's on my homeserver and neither I nor anyone else on it has the same issue, and it's not even limited to his account as one of his other computers does not exhibit the same behavior on the same account.

However, for him on one computer it's 100% reproducible.

Log: sent

Version information

  • Platform: web

For the web app:

  • Browser: Microsoft Edge Canary: Version 76.0.174.0 (Official build) canary (64-bit) (the chromium fork), Chrome Canary Version 76.0.3809.0 (Official Build) canary (64-bit)
  • OS: Windows 10
  • URL: riot.im/develop
@lampholder lampholder changed the title Downloading any file just gives a text file with "function stream() { [native code] }" On Microsoft Edge Canary (Chromium fork) - Downloading any file just gives a text file with "function stream() { [native code] }" May 31, 2019
@lampholder
Copy link
Member

I can reproduce this on Microsoft Edge Canary on macOS.

We can probably wait until Edge's Chromium-based fork is a little further along before worrying, though

@anoadragon453
Copy link
Member Author

Heads up that this is also happening on Chrome Canary itself, meaning it'll probably affect Chrome users at some point as well.

Chrome Canary Version 76.0.3809.0 (Official Build) canary (64-bit).

@turt2live
Copy link
Member

Closing in favour of #9922

@ghost
Copy link

ghost commented May 31, 2019

@turt2live This is not an issue exclusive to Edge. The same problem happens on Chrome Canary and Chrome Dev... Hence @anoadragon453's comment.

I would send the logs... but that has a bug too.

@turt2live
Copy link
Member

Why does everything have to be so awful :(

Have opened #9924 to track it, and will try and take a look.

@turt2live turt2live reopened this Jun 10, 2019
@turt2live turt2live changed the title On Microsoft Edge Canary (Chromium fork) - Downloading any file just gives a text file with "function stream() { [native code] }" Uploads/Downloads broken in upcoming browsers Jun 10, 2019
@jryans jryans self-assigned this Jun 10, 2019
@lnicola
Copy link

lnicola commented Jun 11, 2019

Also happens in Firefox Nightly.

@lnicola
Copy link

lnicola commented Jun 11, 2019

jryans added a commit to matrix-org/matrix-js-sdk that referenced this issue Jun 11, 2019
Modern browsers now expose a `stream` function on the Blob and File interfaces.
This conflicts with an older style of passing data to the `uploadContent` SDK
method, which supported supplying the data to upload in the `stream` property of
an object.

Since this old style is still in active use in the Matrix JS ecosystem, we
preserve the backwards compatibility for now by checking whether `stream` is a
function.

Fixes element-hq/element-web#9913
Fixes #949
jryans added a commit to matrix-org/matrix-js-sdk that referenced this issue Jun 11, 2019
Modern browsers now expose a `stream` function on the Blob and File interfaces.
This conflicts with an older style of passing data to the `uploadContent` SDK
method, which supported supplying the data to upload in the `stream` property of
an object.

Since this old style is still in active use in the Matrix JS ecosystem, we
preserve the backwards compatibility for now by checking whether `stream` is a
function.

This fix has been tested in Firefox Nightly (69), Firefox Release (67), Chrome
Canary (77), and Chrome Stable (75).

Fixes element-hq/element-web#9913
Fixes #949
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants