1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Browser Issue Upload a File not working in iOS 8

Discussion in 'Resolved Bug Reports' started by MegaWatty, Sep 11, 2014.

  1. MegaWatty

    MegaWatty New Member

    Whilst I know it's not officially released until next week, I thought I would flag an issue in the Gold Master.

    A lot of the time the choose file button isn't clickable and a few times that I have tried to upload a picture it has just hung with the progress bars continually just flashing.

    The issue doesn't seem to be across browsers as Chrome and Opera both work.
  2. Mike

    Mike XenForo Developer Staff Member

    I should note that nothing has changed here for a large number of versions. In particular:
    That is just a input[type=file] so any interaction would need to be driven by the browser itself. If the upload starts, then there is some amount of involvement with XF.

    Strangely though, Chrome and Opera on iOS both use the underlying Webkit provided by the OS (this differs from Android). If it doesn't work in Safari, it really shouldn't work in anything built on a UIWebView component. (There is a difference in JS optimization between Safari and UIWebView components, but that shouldn't interfere with clicking the file input, for example.)

    Can anyone else reproduce this?
  3. duderuud

    duderuud Active Member

    I'll try it tonight on my iPad mini with IOS8 GM.
  4. Chris D

    Chris D XenForo Developer Staff Member

    I've got iOS 8 GM now on my iPhone 5s.

    My first try it was a full size photo over wifi and in my opinion it took too long so I gave up.

    Second try I got the overlay but the choose file button wasn't responding. Then, in what I assume is a new iOS feature, the page crashed and reloaded... But you'll just have to believe me because I can't upload the screenshot of the error because it wouldn't upload that either

    I'm going to plug it in to the laptop later and see if Safari dev tools can tell me anything. Something not right though...
  5. Chris D

    Chris D XenForo Developer Staff Member

    And indeed it does work fine in Chrome. Safari does have a new JS engine if I remember correctly so that may explain the somewhat inconsistent performance between the browsers.

    Attached Files:

  6. Chris D

    Chris D XenForo Developer Staff Member

    I haven't found a solution, but it's pretty crazy.

    The blue line next to the button is the text input caret.


    Invariably when this happens, the button is completely unresponsive. But it isn't permanently unresponsive. I haven't conclusively worked out what the trigger is, yet, but sometimes the button will begin to function normally as a button.

    It appears as though it could be RTE related as if the RTE is disabled, the issue goes away.

    Also relevant is the text label for the button always works. So when it isn't working if you just aim a little higher, the button will get activated.

    Nothing out of the ordinary in the JS console. I messed around with some CSS but no joy.

    Almost maddening :)
  7. MegaWatty

    MegaWatty New Member

    I also suffered the page crash whilst trying. Glad I'm not alone here and glad that we have a week start on it.
    Lemminator likes this.
  8. Teapot

    Teapot Well-Known Member

    I thought this was my theme... I've found refreshing repeatedly can occasionally coax it into working for a while.
  9. Chris D

    Chris D XenForo Developer Staff Member

    I think the presence of a content editable div might have some bearing on this issue.

    I've observed other weirdness now too.

    I just made a post over at my forum and the completed post allowed me to place the caret inside it. Couldn't type anything but predictive text popped up above the keyboard.

    EDIT: Can't reproduce now.
  10. Chris D

    Chris D XenForo Developer Staff Member

    Well... Ok. After my previous edit I did get Some weirdness. The edit overlay closed and it for some reason thought the content editable div was there:


    I think the issue with the upload button can also be more frequently reproduced if the attachment overlay opens over the top of an editor too so may all be related.
  11. Mike

    Mike XenForo Developer Staff Member

    Mind trying this again here?

    I was testing with the simulator and could reproduce the clicking issues. It appears to be related to the auto focusing of the upload element. I have disabled that and everything seems to be working correctly for me (again, in the simulator).

    If you have still have problems, please confirm that whether the file input is being auto focused when the attachment overlay appears (it'll have a blueish background). Try seeing if you have issues on the avatar overlay.
  12. Chris D

    Chris D XenForo Developer Staff Member

    Definitely the button seems to be clickable all of the time now.

    But I think the actual upload of the files is still not working.

    Works fine in Chrome, but Safari it seems like the AJAX request begins and never completes.
  13. MegaWatty

    MegaWatty New Member

    This is the same as I am experiencing.
  14. Bionic Rooster

    Bionic Rooster Well-Known Member

    I just had a member try to upload a file to our forum 1.4.0 and there was no response to clicking the Upload a File button

    Edit : issue resolved when user updated Firefox from 31 to 32
    Last edited: Sep 14, 2014
  15. Chris D

    Chris D XenForo Developer Staff Member

    That has already been ascertained and fixed (here). The more important thing is that if the button does work (it will do sometimes) are they then able to upload a file?
  16. Bionic Rooster

    Bionic Rooster Well-Known Member

    Yes they are
  17. sonnb

    sonnb Well-Known Member

    I am also on iOS 8 beta 5, I am able to select a file but wait forever to get uploaded. (Safari).
  18. Chris D

    Chris D XenForo Developer Staff Member

    I have been somewhat intrigued by this issue and I have narrowed it down somewhat.

    The precise point of failure is the load event on the hidden iframe. From what I can gather so far it doesn't matter what that function contains, the process stops.
    MegaWatty likes this.
  19. Mike

    Mike XenForo Developer Staff Member

    Thanks to @Chris D for doing a bit more testing. We have now confirmed that this is a fundamental iOS8 bug where it simply doesn't send the file through to the server. This is affecting a number of other apps, including WordPress (https://core.trac.wordpress.org/ticket/29602). According to that, a bug has been reported to Apple.

    A workaround is likely to be impossible as the browser simply doesn't send the file data to the server (but it does appear to send other elements of the request). It will have to be fixed by an iOS update.
  20. rellect

    rellect Well-Known Member

    Just to note something, why the loading is still going?
    Isn't there some timeout or other way to alert the user that something seems to be wrong with the action?

Share This Page