You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Stefan Kendall (JIRA)" <ji...@apache.org> on 2012/07/20 19:13:33 UTC

[jira] [Created] (CB-1103) window.requestFileSystem is undefined on ICS TouchWiz devices.

Stefan Kendall created CB-1103:
----------------------------------

             Summary: window.requestFileSystem is undefined on ICS TouchWiz devices.
                 Key: CB-1103
                 URL: https://issues.apache.org/jira/browse/CB-1103
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 1.9.0
         Environment: Any android devices running ICS and TouchWiz.
            Reporter: Stefan Kendall
            Assignee: Joe Bowser


window.requestFileSystem is undefined after phonegap has loaded, which makes reading and writing files impossible.

window.webkitRequestFileSystem *is* defined, but attempting to use this method causes a singal 11 application crash.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1103) window.requestFileSystem is undefined on ICS TouchWiz devices.

Posted by "Stefan Kendall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419521#comment-13419521 ] 

Stefan Kendall commented on CB-1103:
------------------------------------

Source attached. I was getting crashes since I fallback on webkitRequestFileSystem to do browser testing.

That is, var requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; Since window.requestFileSystem was undefined (the real issue), I saw crashing.
                
> window.requestFileSystem is undefined on ICS TouchWiz devices.
> --------------------------------------------------------------
>
>                 Key: CB-1103
>                 URL: https://issues.apache.org/jira/browse/CB-1103
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>         Environment: Any android devices running ICS and TouchWiz.
>            Reporter: Stefan Kendall
>            Assignee: Joe Bowser
>         Attachments: Archive.zip
>
>
> window.requestFileSystem is undefined after phonegap has loaded, which makes reading and writing files impossible.
> window.webkitRequestFileSystem *is* defined, but attempting to use this method causes a singal 11 application crash.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1103) window.requestFileSystem is undefined on ICS TouchWiz devices.

Posted by "Stefan Kendall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419720#comment-13419720 ] 

Stefan Kendall commented on CB-1103:
------------------------------------

It's undefined in the callback to the deviceready event. I don't see how I can make that point more clear.
                
> window.requestFileSystem is undefined on ICS TouchWiz devices.
> --------------------------------------------------------------
>
>                 Key: CB-1103
>                 URL: https://issues.apache.org/jira/browse/CB-1103
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>         Environment: Any android devices running ICS and TouchWiz.
>            Reporter: Stefan Kendall
>            Assignee: Joe Bowser
>         Attachments: Archive.zip
>
>
> window.requestFileSystem is undefined after phonegap has loaded, which makes reading and writing files impossible.
> window.webkitRequestFileSystem *is* defined, but attempting to use this method causes a singal 11 application crash.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1103) window.requestFileSystem is undefined on ICS TouchWiz devices.

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419512#comment-13419512 ] 

Simon MacDonald commented on CB-1103:
-------------------------------------

Can I see some code? I'm running a Samsung Galaxy Note Android 4.0.4 and it works just fine. Don't use window.webkitRequestFileSystem.
                
> window.requestFileSystem is undefined on ICS TouchWiz devices.
> --------------------------------------------------------------
>
>                 Key: CB-1103
>                 URL: https://issues.apache.org/jira/browse/CB-1103
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>         Environment: Any android devices running ICS and TouchWiz.
>            Reporter: Stefan Kendall
>            Assignee: Joe Bowser
>
> window.requestFileSystem is undefined after phonegap has loaded, which makes reading and writing files impossible.
> window.webkitRequestFileSystem *is* defined, but attempting to use this method causes a singal 11 application crash.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-1103) window.requestFileSystem is undefined on ICS TouchWiz devices.

Posted by "Stefan Kendall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Kendall updated CB-1103:
-------------------------------

    Attachment: Archive.zip
    
> window.requestFileSystem is undefined on ICS TouchWiz devices.
> --------------------------------------------------------------
>
>                 Key: CB-1103
>                 URL: https://issues.apache.org/jira/browse/CB-1103
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>         Environment: Any android devices running ICS and TouchWiz.
>            Reporter: Stefan Kendall
>            Assignee: Joe Bowser
>         Attachments: Archive.zip
>
>
> window.requestFileSystem is undefined after phonegap has loaded, which makes reading and writing files impossible.
> window.webkitRequestFileSystem *is* defined, but attempting to use this method causes a singal 11 application crash.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1103) window.requestFileSystem is undefined on ICS TouchWiz devices.

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420091#comment-13420091 ] 

Simon MacDonald commented on CB-1103:
-------------------------------------

Hey Stefan, 

The problem is actually in your code. Yes, you don't make a call to "utils.file.write()" until you've received the "deviceready" event but the root cause of your issue is that you've already parsed the files.js JavaScript and in doing so the variable util.files.requestFileSystem is created and inside that function is where you do:

var requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;

so at the point that files.js is parsed window.requestFileSystem has not been created by PhoneGap yet which is why it gets set to window.webkitRequestFileSystem. You may want to hook the creation of your utils class until "deviceready" is fired. 
                
> window.requestFileSystem is undefined on ICS TouchWiz devices.
> --------------------------------------------------------------
>
>                 Key: CB-1103
>                 URL: https://issues.apache.org/jira/browse/CB-1103
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>         Environment: Any android devices running ICS and TouchWiz.
>            Reporter: Stefan Kendall
>            Assignee: Joe Bowser
>         Attachments: Archive.zip
>
>
> window.requestFileSystem is undefined after phonegap has loaded, which makes reading and writing files impossible.
> window.webkitRequestFileSystem *is* defined, but attempting to use this method causes a singal 11 application crash.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-1103) window.requestFileSystem is undefined on ICS TouchWiz devices.

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser resolved CB-1103.
----------------------------

    Resolution: Cannot Reproduce

Please do not open duplicate bugs!  There is a specific mobile-spec test case that disproves this bug (File API). window.requestFileSystem is not defined until we define it.  If you wish to use it, use it after the deviceready event fires.
                
> window.requestFileSystem is undefined on ICS TouchWiz devices.
> --------------------------------------------------------------
>
>                 Key: CB-1103
>                 URL: https://issues.apache.org/jira/browse/CB-1103
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>         Environment: Any android devices running ICS and TouchWiz.
>            Reporter: Stefan Kendall
>            Assignee: Joe Bowser
>         Attachments: Archive.zip
>
>
> window.requestFileSystem is undefined after phonegap has loaded, which makes reading and writing files impossible.
> window.webkitRequestFileSystem *is* defined, but attempting to use this method causes a singal 11 application crash.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira