1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    6
    Answers
    2
    Vote Rating
    0
    JessyL is on a distinguished road

      0  

    Default Answered: Refused to set unsafe header "User-Agent"

    Answered: Refused to set unsafe header "User-Agent"


    Hello Sencha community!

    First, i have to apologize my english, excuse me, i'm french, we can't be perfect

    I have a problem with sencha Touch 2 at building, my application is working perfectly when i use sdk/microloader/development.js

    But since i release my custom build via "sencha build", and use "sdk/sencha-touch.js", "all-classes.js" and "app.js" instead of the microloader, my app throw an error in the chrome debug console.

    The error is "Refused to set unsafe header "User-Agent"', i searched the web to figure out where is the problem, but still don't have a solution.

    The problem is, that the model is correctly loaded via store and proxy, and appear in my Ext.Panel, but not in my Ext.List (dataview).

    I tried to unlink the dataview and the store, and load the list via myList.setRecord(myrecords), it works in development mode, but not in the production build.

    Does anybody have an idea? I don't use specific headers to the jsonp request, just use the Sencha Touch MVC structure like in the documentation.

    Details on the application:
    In my controller i try to find the user's geolocation, if i have it, i give it to my proxy, loading geo-located products around the user location, in my callback i set the records to all relatives views (blocks) in the current viewport

    Thanks for your help!

    .Jessy

  2. I found a solution, but not a really good one.

    When i load sdk/sencha-touch-all.js instead of sencha-touch.js it works.

    That mean my all-classes.js didn't contains all the classes in need. Unfortunately the debugger don't tell me wich one.

  3. #2
    Sencha User
    Join Date
    Jun 2012
    Posts
    6
    Answers
    2
    Vote Rating
    0
    JessyL is on a distinguished road

      0  

    Default


    Edit:

    I commented all other views and other loads, my code now only update the dataview.List, i don't have the "header" error again, but the list still don't show up my products.


    I'll try to edit the post title to be more explicit.

  4. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    6
    Answers
    2
    Vote Rating
    0
    JessyL is on a distinguished road

      0  

    Default


    I found a solution, but not a really good one.

    When i load sdk/sencha-touch-all.js instead of sencha-touch.js it works.

    That mean my all-classes.js didn't contains all the classes in need. Unfortunately the debugger don't tell me wich one.