Results 1 to 4 of 4

Thread: bootstrap.json 404 (Not Found) on Sencha CMD 5.0.3 GA

  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    36

    Default bootstrap.json 404 (Not Found) on Sencha CMD 5.0.3 GA

    I have an app structured as Like so
    Code:
    [WebApp_ROOT]
    --Index.html
    --[EXTJS_APP_ROOT]
       ----bootstrap.js
       ----bootstrap.json
       ----app.json
       ----app\...
    ....
    My Index.html looks like
    PHP Code:
    <!DOCTYPE HTML>
    <
    html>
    <
    head>
        <
    meta charset="UTF-8">
        <
    meta http-equiv="X-UA-Compatible" content="IE=edge">
        <
    title>My APP </title>
        <
    script id="microloader" type="text/javascript" src="extjs-_app_root/bootstrap.js"></script>
    </head>
    <body></body>
    </html> 
    In My app.json, I have updated the "indexHtmlPath" as to reflect the structure above as follows
    PHP Code:
    "indexHtmlPath""../index.html"
    However when I build my app (issuing command "sencha app upgrade" and "sencha app build") and I refresh my index.html, I get the error
    Code:
    http://localhost:53752/WebApp_ROOT/bootstrap.json 404 (Not Found) bootstrap.js:580
    This was working in Sencha CMD 5.0.2 because I only started getting this problem when I upgraded to 5.0.3 GA

    I know that is caused because the micrloader is looking for bootstrap.json at /WebApp_ROOT/bootstrap.json instead of /WebApp_ROOT/EXTJS_APP_ROOT/bootstrap.json

    I have looked at the microloader code and it seems that the problem is caused in Microloader Object's run function (i.e. located at [WebApp_APP_ROOT]\.sencha\app\Microloader.js)code (line 67 ). It seems that url to obtain bootstrap.json is not set properly in the Microloader (i.e. it does not prepend the base url)

    To get the mircoloader working properly, I changed the code to
    PHP Code:
    //THE URL SHOULD BE AMENDED TO PREPEND THE BASE URL LIKE BELOW
    url Boot.baseUrl url;
    Boot.fetch(url, function(result){
                  
    manifest Ext.manifest JSON.parse(result.content);
                  
    Microloader.load(manifest);
    }); 
    If this is correct, then I hop that its changed for the next release and it also helps someone out

  2. #2
    Sencha User
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165

    Default

    Currently moving the index page above the application directory causes issues with pathing the bootstrap files. There will be some relief for that in Cmd 5.1.x once it's released.

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    36

    Default

    Hi @slemmon ,

    Thanks for your reply. Hopefully, this will be resolved in 5.1

    Thanks

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2014
    Posts
    17

    Default

    Was there ever any updates in 5.1 to make this process easier?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •