Javascript Error when trying to upload profile image in Safari


When I try to upload an image file in account settings/profile image, I get the following error message in the console:

TypeError: this.refs.profileImageCanvas.toBlob is not a function. (In ‘this.refs.profileImageCanvas.toBlob(function(n){n.lastModifiedDate=new Date,“image.jpg”,t.props.imageCropChange(n),t.props.submit(e)},“image/jpeg”,.95)’, ‘this.refs.profileImageCanvas.toBlob’ is undefined)

I am using Safari 10.1. In Chrome it works as expected.

Am I the only one experiencing this problem? Can I investigate anything to solve this? Thanks you all!

Hi @Tilmn,

Thanks for your report!

I am not able to reproduce your issue on Safari. Could you share which version of Mattermost you are running? Also, are you using Safari on mobile or desktop?

Just checking that the format of the image you’re trying to upload matches this:
Upload a profile picture in BMP, JPG, JPEG or PNG format, at least 128px in width and 128px height?

I tried many images of different sizes and formats, the error is the same. When selected, the image is shown sized and cropped properly in the popup. But when I click save, I get the javascript error bar.

We are running the Mattermost Web end on Port :8065, because there is an Apache running on the same host on :80. Could this be involved?

It is Safari 10.1 and Mattermost E10. Here are two screenshots with the exact error messages and version info.

Thanks for your help! I really appreciate your fast response!

Thanks for your feedback @Tilmn,

I’ve posted a question to our devs about whether the port you are using might be causing the JavaScript error. As soon as I hear from them, I’ll post back here.

Also: We use the docker version.

Hi @Tilmn,

Unfortunately, it’s a known issue with Mattermost 3.8 that you’re unable to upload profile pictures on Safari (on the desktop or iOS). It’s been fixed with Mattermost 3.9 which should be coming out late next week.