Cannot upload images with Safari

I can confirm with certainty that this did not begin when I updated Safari to v15.5. That happened on May 18, 2022. I first documented the problem on June 14, 2022. I am a moderator of a forum on the Discourse platform and typically upload a minimum of 2 - 3 images per day. I can document from work records on that Discourse-hosted forum that I uploaded graphics after updating Safari but before first noticing the problem.

2 Likes

For the record, I just updated to Safari v15.6. That had no effect on this problem.

1 Like

Yeah we are going to sort this out, bear with us, so sorry it is taking so long.

It is very hard to feature detect this problem we have a few options at hand

  1. Instead of putting a placeholder of uploading ... we swap our placeholder to use …

  2. Use a “regex” replace that is not sensitive to this

  3. Disable execCommand as the mechanism for inserting text in this instance (it is pointless anyway, given pasting the image will corrupt undo stack anyway)

  4. Just have execCommand stuff behind a site setting, disabled by default

or a combination of some of these.

It is on Davids list, and we are tracking.

4 Likes

(2) is the easiest to swing, so I’ve gone with that for now. If this turns out to be a wider problem then we can look at more radical changes like 3 / 4. Here’s a PR:

7 Likes

@tut that fix is now live here on Meta, and on your site. Please could you give it a try and let us know if things are any better?

5 Likes

The problem seems to be resolved. Here is an screen shot I just took of your prior post, uploaded in Safari v15.6 (not a quote):

Screen Shot 2022-07-26 at 7.15.12 PM

6 Likes

The problem with uploading images from Safari has reappeared. Symptoms are exactly the same as described in Cannot upload images with Safari, with one exception. The problem is now intermittent. I have observed the following:

  • I estimate the overall success rate to be about 90%.
  • Stalled uploads can occur in the midst of the same login session in which numerous other images of various formats were successfully uploaded.
  • Occasionally, an upload will be successful after several tries.
  • Sometimes an image will not upload, but if a similar graphic image (the image itself, not the code for it) from another Discourse post is immediately copied and pasted, the image appears in the new post. (I have never seen that workaround fail, though not does not mean it will never happen.)
  • Occasionally, a specific image will not upload, yet another in the same format will. Usually, however, if one will not upload, none will, and the post must be finished in another browser.
  • I have mostly, but not exclusively, noticed this with relatively small images. But I have insufficient experience to determine if there is a size threshold involved. That observation could well be coincidence.
2 Likes

Is it getting stuck with a placeholder like this again? Or is it a slightly different behaviour?

Are there any errors/warnings in the browser console?

The behavior seems identical.

I just checked the console and it was cleared (through no action of mine)—maybe by the act of starting a new session? If the behavior repeats, I’ll capture the console log.

1 Like

Well, it took almost 2 weeks and hundreds of successful uploads, but the problem finally manifested again. This time, a second upload attempt was immediately successful. The last two lines in the developer’s console log seem to point clearly to network connectivity as the culprit:

[Warning] [PLUGIN discourse-adplugin] (vendor-3525a44c5f1c281745e16fd0c569078e0ad263d863a3e3d95fe3a8ca080d252b.br.js, line 4586)
"Deprecation notice: \"message-bus:main\" is deprecated, use \"service:message-bus\" instead (deprecated since Discourse 2.9.0.beta7) (removal in Discourse 3.0.0)"
[Warning] [PLUGIN discourse-cakeday] (vendor-3525a44c5f1c281745e16fd0c569078e0ad263d863a3e3d95fe3a8ca080d252b.br.js, line 4586)
"Deprecation notice: \"site-settings:main\" is deprecated, use \"service:site-settings\" instead (deprecated since Discourse 2.9.0.beta7) (removal in Discourse 3.0.0)"
[Warning] [PLUGIN discourse-canned-replies] (vendor-3525a44c5f1c281745e16fd0c569078e0ad263d863a3e3d95fe3a8ca080d252b.br.js, line 4586)
"Deprecation notice: \"current-user:main\" is deprecated, use \"service:current-user\" instead (deprecated since Discourse 2.9.0.beta7) (removal in Discourse 3.0.0)"
[Warning] [PLUGIN hosted-site] (vendor-3525a44c5f1c281745e16fd0c569078e0ad263d863a3e3d95fe3a8ca080d252b.br.js, line 4586)
"Deprecation notice: \"site:main\" is deprecated, use \"service:site\" instead (deprecated since Discourse 2.9.0.beta7) (removal in Discourse 3.0.0)"
[Error] Failed to load resource: The network connection was lost. (poll, line 0)
[Error] Failed to load resource: The Internet connection appears to be offline. (poll, line 0)

Unless this problem repeats with different symptoms, I think we should consider it resolved. I am puzzled, though, that the console log did not display similar errors following problems after the first fix.

5 Likes