You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Alexandre Mathieu (Created) (JIRA)" <ji...@apache.org> on 2012/02/23 15:30:48 UTC

[jira] [Created] (CB-276) Cannot use $.getJSON on a local file

Cannot use $.getJSON on a local file
------------------------------------

                 Key: CB-276
                 URL: https://issues.apache.org/jira/browse/CB-276
             Project: Apache Callback
          Issue Type: Bug
          Components: WP7
    Affects Versions: 1.4.0
            Reporter: Alexandre Mathieu
            Assignee: Jesse MacFadyen


I have the following code in my JS:

$.getJSON('json/somefile.json').success(function(data) { ... });

Where somefile.json has been set to "Content".

The console gives me the following message:
Wrapped XHR received Error from FileAPI :: [object Object]

Where the object contains: {code: 1}

Any idea on the matter?

--
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-276) Cannot use $.getJSON on a local file

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

Alan Neveu commented on CB-276:
-------------------------------

Could this be the same root cause as what is behind CB-520? https://issues.apache.org/jira/browse/CB-520
                
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Jesse MacFadyen
>              Labels: ajax, javascript, json, xhr
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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-276) Cannot use $.getJSON on a local file

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

Jesse MacFadyen resolved CB-276.
--------------------------------

    Resolution: Fixed

https://github.com/purplecabbage/incubator-cordova-js/commit/18a6917fa6737ae498535999d0e0046b50670ff7
Will be available in 1.9.0, OR you can rebuild your cordova-js for WP7, and replace it.  No native changes.
                
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Jesse MacFadyen
>              Labels: ajax, javascript, json, xhr
>             Fix For: 1.9.0
>
>         Attachments: LondonWP7_simple.zip
>
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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-276) Cannot use $.getJSON on a local file

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

Jesse MacFadyen updated CB-276:
-------------------------------

    Fix Version/s: 1.8.0
    
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Jesse MacFadyen
>              Labels: ajax, javascript, json, xhr
>             Fix For: 1.8.0
>
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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-276) Cannot use $.getJSON on a local file

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

Jesse MacFadyen commented on CB-276:
------------------------------------

CB-519 has been closed as a duplicate of this issue, but still contains some valid info on the bug.
                
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Filip Maj
>              Labels: ajax, javascript, json, xhr
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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] [Assigned] (CB-276) Cannot use $.getJSON on a local file

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

Filip Maj reassigned CB-276:
----------------------------

    Assignee: Filip Maj  (was: Jesse MacFadyen)
    
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Filip Maj
>              Labels: ajax, javascript, json, xhr
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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-276) Cannot use $.getJSON on a local file

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

Jesus Bosch commented on CB-276:
--------------------------------

I've attached a full small project that reproduces the error
                
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Jesse MacFadyen
>              Labels: ajax, javascript, json, xhr
>             Fix For: 1.9.0
>
>         Attachments: LondonWP7_simple.zip
>
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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-276) Cannot use $.getJSON on a local file

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

Jesse MacFadyen updated CB-276:
-------------------------------

    Fix Version/s:     (was: 1.8.0)
                   1.9.0

Waiting for followup.
                
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Jesse MacFadyen
>              Labels: ajax, javascript, json, xhr
>             Fix For: 1.9.0
>
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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-276) Cannot use $.getJSON on a local file

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

Jesus Bosch updated CB-276:
---------------------------

    Attachment: LondonWP7_simple.zip

Full small project that reproduces the error
                
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Jesse MacFadyen
>              Labels: ajax, javascript, json, xhr
>             Fix For: 1.9.0
>
>         Attachments: LondonWP7_simple.zip
>
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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] [Issue Comment Edited] (CB-276) Cannot use $.getJSON on a local file

Posted by "Alan Neveu (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255053#comment-13255053 ] 

Alan Neveu edited comment on CB-276 at 4/16/12 9:08 PM:
--------------------------------------------------------

Could this be the same root cause as what is behind CB-519? https://issues.apache.org/jira/browse/CB-519
                
      was (Author: offshorewahoo):
    Could this be the same root cause as what is behind CB-520? https://issues.apache.org/jira/browse/CB-520
                  
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Jesse MacFadyen
>              Labels: ajax, javascript, json, xhr
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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] [Assigned] (CB-276) Cannot use $.getJSON on a local file

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

Jesse MacFadyen reassigned CB-276:
----------------------------------

    Assignee: Jesse MacFadyen  (was: Filip Maj)
    
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Jesse MacFadyen
>              Labels: ajax, javascript, json, xhr
>             Fix For: 1.8.0
>
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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-276) Cannot use $.getJSON on a local file

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

Filip Maj commented on CB-276:
------------------------------

@Alexandre: can you post your sample code for this issue? I am having trouble running jQuery 1.7.2 using the 1.6.1 build and am wondering how you got this working in the first place.
                
> Cannot use $.getJSON on a local file
> ------------------------------------
>
>                 Key: CB-276
>                 URL: https://issues.apache.org/jira/browse/CB-276
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.4.0
>            Reporter: Alexandre Mathieu
>            Assignee: Filip Maj
>              Labels: ajax, javascript, json, xhr
>
> I have the following code in my JS:
> $.getJSON('json/somefile.json').success(function(data) { ... });
> Where somefile.json has been set to "Content".
> The console gives me the following message:
> Wrapped XHR received Error from FileAPI :: [object Object]
> Where the object contains: {code: 1}
> Any idea on the matter?

--
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