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

Chrome in iOS8 GM crashes after clicking file chooser button #1283

Closed
rnicholus opened this Issue Sep 10, 2014 · 9 comments

Comments

Projects
None yet
2 participants
@rnicholus
Member

rnicholus commented Sep 10, 2014

The following is the content of bug reports I filed with Apple and Google. A workaround for Fine Uploader is to set the multiple option to true for iOS. If your app has existing validation values that prevent videos from being selected, this option will be set to false for you already, and this is not configurable unfortunately.

If you do set the multiple option to true then video uploads will not work due to the existing iOS issue with the multiple attribute, described in #990.

Summary:
If a simple file input element is included on the page, Chrome will crash after clicking the button.

Steps to Reproduce:

  1. Click on the element in Chrome - iOS8 GM
  2. Select either "Choose Existing" or "Choose Photo or Video"

Expected Results:
File chooser dialog appears.

Actual Results:
Chrome crashes

Version:
8.0 (12A365)

Notes:

Configuration:
iPad

@rnicholus

This comment has been minimized.

Show comment
Hide comment
@rnicholus

rnicholus Sep 11, 2014

Member

Here's the Chrome issue I filed: https://code.google.com/p/chromium/issues/detail?id=412847.

Unfortunately, Apple doesn't expose issue links, or allow anyone outside of Apple to see issues filed, other than the filer. So, I can't provide a link to the iOS bug I filed with Apple.

Member

rnicholus commented Sep 11, 2014

Here's the Chrome issue I filed: https://code.google.com/p/chromium/issues/detail?id=412847.

Unfortunately, Apple doesn't expose issue links, or allow anyone outside of Apple to see issues filed, other than the filer. So, I can't provide a link to the iOS bug I filed with Apple.

@rnicholus

This comment has been minimized.

Show comment
Hide comment
@rnicholus

rnicholus Sep 14, 2014

Member

A new release of Chrome that addresses this issue before iOS8 launches on Wednesday seems like a longshot at this point.

We should probably work around this issue, since a browser crash is a significant problem for users. The only way to prevent this is to force the multiple option to false in iOS8 Chrome. The side effect here is that we will need to disable another workaround (described in #1039), so videos will be uploaded as empty files due to another outstanding bug in iOS, described in #990. Still, this is better than a browser crash. Once this issue is fixed, we can release a new hotfix that disables this workaround.

Member

rnicholus commented Sep 14, 2014

A new release of Chrome that addresses this issue before iOS8 launches on Wednesday seems like a longshot at this point.

We should probably work around this issue, since a browser crash is a significant problem for users. The only way to prevent this is to force the multiple option to false in iOS8 Chrome. The side effect here is that we will need to disable another workaround (described in #1039), so videos will be uploaded as empty files due to another outstanding bug in iOS, described in #990. Still, this is better than a browser crash. Once this issue is fixed, we can release a new hotfix that disables this workaround.

@rnicholus

This comment has been minimized.

Show comment
Hide comment
@rnicholus

rnicholus Sep 15, 2014

Member

Sounds like this will be fixed in Chrome 38 based on the changes to the issue I filed. I'm not sure yet if this will release before iOS8.

Member

rnicholus commented Sep 15, 2014

Sounds like this will be fixed in Chrome 38 based on the changes to the issue I filed. I'm not sure yet if this will release before iOS8.

@rnicholus rnicholus added 3 - Doing and removed 2 - Do labels Sep 16, 2014

@rnicholus

This comment has been minimized.

Show comment
Hide comment
@rnicholus

rnicholus Sep 16, 2014

Member

Since the Chromium team won't give a release date, we'll have to code a workaround into Fine Uploader 5.0.5, forcing a multiple attribute on the underlying <input type="file"> element. This means that videos will upload 0-sized, but there's not much we can do about that. At least users will be able to upload images in one iOS browser.

Member

rnicholus commented Sep 16, 2014

Since the Chromium team won't give a release date, we'll have to code a workaround into Fine Uploader 5.0.5, forcing a multiple attribute on the underlying <input type="file"> element. This means that videos will upload 0-sized, but there's not much we can do about that. At least users will be able to upload images in one iOS browser.

rnicholus pushed a commit that referenced this issue Sep 16, 2014

@rnicholus rnicholus added 5 - Done and removed 3 - Doing labels Sep 16, 2014

@rnicholus

This comment has been minimized.

Show comment
Hide comment
@rnicholus

rnicholus Sep 16, 2014

Member

Workaround added to 5.0.5-7 pre-release.

Member

rnicholus commented Sep 16, 2014

Workaround added to 5.0.5-7 pre-release.

@ChaplinWang

This comment has been minimized.

Show comment
Hide comment
@ChaplinWang

ChaplinWang Dec 29, 2014

Hi rnicholus,

This issue seems no longer valid in newer ios 8 version, IOS 8.1+ etc, I have found this fix is introducing new problems for later versions,

In my phonegap app, having multiple in my input field is preventing accessing camera on ios 8+

Cheers,
Chaplin

ChaplinWang commented Dec 29, 2014

Hi rnicholus,

This issue seems no longer valid in newer ios 8 version, IOS 8.1+ etc, I have found this fix is introducing new problems for later versions,

In my phonegap app, having multiple in my input field is preventing accessing camera on ios 8+

Cheers,
Chaplin

@rnicholus

This comment has been minimized.

Show comment
Hide comment
@rnicholus

rnicholus Dec 29, 2014

Member

@ChaplinWang That is expected behavior for iOS and is unrelated to any Fine Uploader code. iOS will not permit access to the camera when the underlying file input element contains the multiple attribute.

Member

rnicholus commented Dec 29, 2014

@ChaplinWang That is expected behavior for iOS and is unrelated to any Fine Uploader code. iOS will not permit access to the camera when the underlying file input element contains the multiple attribute.

@ChaplinWang

This comment has been minimized.

Show comment
Hide comment
@ChaplinWang

ChaplinWang Dec 29, 2014

Thanks @rnicholus for quick response,

should the ios8BrowserCrashWorkaround, only be applied to ios 8.0.0 rather than all ios 8 versions? since apple has already fixed the crash issue on later versions.

        // Temporary workaround for bug in in iOS8 UIWebView that causes the browser to crash
        // before the file chooser appears if the file input doesn't contain a multiple attribute.
        // See #1283.
        if (options.ios8BrowserCrashWorkaround && qq.ios8() && (qq.iosChrome() || qq.iosSafariWebView())) {
            input.setAttribute("multiple", "");
        }

setting ios8BrowserCrashWorkaround to true in my case disable ios 8.1.2 from using camera, but setting it to false will almost gurantee it to crash on ios 8.0.0.

maybe it should be :

     if (options.ios8BrowserCrashWorkaround && qq.ios800() && (qq.iosChrome() || qq.iosSafariWebView())) {
            input.setAttribute("multiple", "");
     }

Cheers,
Chaplin

ChaplinWang commented Dec 29, 2014

Thanks @rnicholus for quick response,

should the ios8BrowserCrashWorkaround, only be applied to ios 8.0.0 rather than all ios 8 versions? since apple has already fixed the crash issue on later versions.

        // Temporary workaround for bug in in iOS8 UIWebView that causes the browser to crash
        // before the file chooser appears if the file input doesn't contain a multiple attribute.
        // See #1283.
        if (options.ios8BrowserCrashWorkaround && qq.ios8() && (qq.iosChrome() || qq.iosSafariWebView())) {
            input.setAttribute("multiple", "");
        }

setting ios8BrowserCrashWorkaround to true in my case disable ios 8.1.2 from using camera, but setting it to false will almost gurantee it to crash on ios 8.0.0.

maybe it should be :

     if (options.ios8BrowserCrashWorkaround && qq.ios800() && (qq.iosChrome() || qq.iosSafariWebView())) {
            input.setAttribute("multiple", "");
     }

Cheers,
Chaplin

@rnicholus

This comment has been minimized.

Show comment
Hide comment
@rnicholus

rnicholus Dec 29, 2014

Member

The logic in place in Fine Uploader appears to be correct to me. The crash issue is specific to Chrome or any app that launches UIWebView, and may occur in any version of iOS8, depending on the installed version of Chrome or the version of the app using UIWebView.

You can disable this workaround if you are certain your users are using a current version of Chrome or a current version of your app in iOS8 that was compiled using the iOS8 SDK.

Member

rnicholus commented Dec 29, 2014

The logic in place in Fine Uploader appears to be correct to me. The crash issue is specific to Chrome or any app that launches UIWebView, and may occur in any version of iOS8, depending on the installed version of Chrome or the version of the app using UIWebView.

You can disable this workaround if you are certain your users are using a current version of Chrome or a current version of your app in iOS8 that was compiled using the iOS8 SDK.

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