AppBuilder app getting [object,object] on simulator Refresh but not on Reload

2 posts, 0 answers
  1. Carlos
    Carlos avatar
    69 posts
    Member since:
    Jun 2011

    Posted 09 Jul 2015 Link to this post

    We are having issues with our app giving us an [object, object] in our application. It is happening on both the device LiveSync and the simulator LiveSync.  It seems that one of our views is not getting rendered. We consoled out our output to make sure we are hitting the function that is supposed to navigate to our view, but when we make a code change and save the LiveSync does a refresh and we get an [object, object] showing on our View and the console is giving us a 404 (Not Found) error.  It is doing this on the Device too. So it is not only the simulator.  It seems to be something with a 'Refresh' vs a 'Reload'.

    BUT if we hit the 'Reload' on the simulator, the app View comes back.  I have attached an image of the simulator.

     It is really frustrating and annoying and we can't figure out why the navigate is not working on a refresh vs a reload.

    Our code on how we are doing our view shows is below.

    home.html

     

    <div id="homeViewDefault" data-role="view" data-layout="offline" data-title="Home" data-after-show="OnHomePageInit">
     LOADING HOMEPAGE
    </div>
     

    <!--THIS DOES NOT TRIGGER THE 'data-show' ON homeViewOnline ON REFRESH BUT DOES ON RELOAD IN APPBUILDER SIMULATOR -->

    <div id="homeViewOnline" data-role="view" data-layout="main" data-model="app.MemberInfo" data-title="Home" data-show="OnHomePageOnlineShow">
        <div id="MemberCardHeaderOnline">
            <div id="memberCardOnline">
            <div data-template="memberTemplate" data-bind="source: MyMemberInfo">
                 
                <!--Member card x-kendo-template id="memberTemplate" renders here-->
                 
            </div>
            <div id="BarcodeOnline">Barcode no rendered</div>
             <img src="Images/ASTCLogo.png"/>
           </div>
        </div>
         
        <!--Home page button list-->
        <div id="homeNavigationOnline">
           <ul data-role="listview">
               <li> <a href="views/mymembership.html" data-role="touch" >My Membership</a></li>
               <li> <a href="views/catalyst.html" data-role="touch" >Catalyst</a></li>
                   <!--Only need to show this if they have tickets redeemed-->
               <li> <a href="views/mytickets.html" data-role="touch">My Tickets</a> </li>
           </ul>
        </div>
    </div>

     

    home.js

    var app = app || {};
     
    function OnHomePageInit() {
        if (app.helper.isNetworkPresent()) {
            console.log('network is present. On HomePageInit');
            if (app.helper.getSettings("MemLevel") === "AddOn") {
                app.mobileApp.navigate("#homeViewAddOn");
            } else {
                app.mobileApp.navigate("#homeViewOnline");
                console.log("navigate to #homeViewOnline");
            }
        } else {
            console.log('network is NOT present');
            app.mobileApp.navigate("#homeViewOffline");
        }
    };
     
    //***THIS DOES NOT RUN AGAIN ON REFRESH BUT DOES ON RELOAD OF APPBUILDER SIMULATOR****//
    function OnHomePageOnlineShow() {
       // app.mobileApp.showLoader();
        //runs when Homepage View shows or is navigated to
        console.log('showing online View');
    };

     

    We just don't want this to happen when we release the app to our users.  

    Anyone a Telerik help us. You can take a look at our project to if you need to, to reproduce it.

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 14 Jul 2015 Link to this post

    Hello Carlos,

    I tried to replicate the error using the code snippet you provided but I was unable to. My only suggestion would be to make sure that the navigation occurs after the deviceready event is fired and the Kendo UI Mobile application is fully initialized.

    I would gladly take a look at your app and provide more to-the-point feedback but I would need its name. Note that as this is a public forum, it might be better to submit a support tickets where you can safely share the name of your app or any other more sensitive information,a s the support tickets are private and confidential. Further, a support ticket will ensure a prompter response time for your questions.

    I am looking forward to your reply.

    Regards,
    Tina Stancheva
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top