none
Office App real-offline debugging impossible RRS feed

  • Question

  • In http://social.msdn.microsoft.com/Forums/officeapps/en-US/ba36beab-e65f-4903-8ed9-7c0ea090e20a
    is stated that offline debugging is possible.

    I don't find this quite accurate. If a disconnect internet access, the App Engine only loads the
    Apps HTML-page. All other referenced resources are not loaded.

    Setting:
    Catalog is on network share has an entry ExcelAppWorkOut, which is an Excel Content App.
    I deploy all required resources locally. They are loaded from local (127.0.0.1) HTTP-server in this order:

        ExcelAppWorkOut.html
        Office.css
        MicrosoftAjax.js
        Office.js
        ExcelAppWorkOut.js
        en-us/office_strings.js
        excel-15.js

    But only if online, WIFI connected. If I disconnect WIFI, then the App Engine only loads

    ExcelAppWorkOut.html


    This makes offline debugging impossible (unless ExcelAppWorkOut.js is incorporated in the HTML-file,
    which is bad style).

    Note: The App is running all right, so I assume the resources are taken from the HTTP-cache by the
    App Engine. Of course this is not helpful for debugging purposes. And I find this somewhat
    fishy as all resources are served with the Cache-Control: no-cache header.

    Monday, February 17, 2014 11:45 PM

Answers

  • Hi Jeffrey,

    yes, I deploy manually for Node.js with a different structure. Following your suggestion, I did change the directory layout. This is what I get after 

    1. Refresh catalog
    2. Insert App
    3. Go Offline
    4. Reload App
    [2014-02-19T12:51:08.473Z] GET 1.1 D:\ExcelAppWorkOut\App\Home\Home.html
    [2014-02-19T12:51:08.521Z] GET 1.1 D:\ExcelAppWorkOut\Content\Office.css
    [2014-02-19T12:51:08.527Z] GET 1.1 D:\ExcelAppWorkOut\Scripts\Office\MicrosoftAjax.js
    [2014-02-19T12:51:08.532Z] GET 1.1 D:\ExcelAppWorkOut\Scripts\Office\1.0\Office.js
    [2014-02-19T12:51:08.534Z] GET 1.1 D:\ExcelAppWorkOut\App\Home\Home.js
    [2014-02-19T12:51:08.535Z] GET 1.1 D:\ExcelAppWorkOut\App\App.js
    [2014-02-19T12:51:09.331Z] GET 1.1 D:\ExcelAppWorkOut\scripts\office\1.0\en-us\office_strings.js
    [2014-02-19T12:51:09.504Z] GET 1.1 D:\ExcelAppWorkOut\scripts\office\1.0\excel-15.js
    [2014-02-19T12:51:27.898Z] GET 1.1 D:\ExcelAppWorkOut\App\Home\Home.html

    Going offline is at 12:51:20, after that only the HTML-file is loaded. So your workaround did not work for me.

    Btw, I noticed that it says Cannot connect to catalog while being offline, although the catalog is local. 

    My guess is that the App Engine doesn't really like to be offline, for whatever reason.

    Workaround so far for working offline: Put all App-code (i.e. Home.js) inside the HTML-file, never clear the cache, do not change the manifest. 

    Wednesday, February 19, 2014 12:55 PM

All replies

  • Hi Amadeus,

    Welcome to MSDN forum.

    I made a test for you under Windows 8, VS 2012 and Office 2013, after following up the thread you provided, the app should work for offline debugging.

    >> This makes offline debugging impossible (unless ExcelAppWorkOut.js is incorporated in the HTML-file, <<

    How is it impossible? Could you please give us a figure or a reproducible sample to trouble shoot?

    Is there any message popped-up while debugging?

    Where do you reference ExcelAppWorkOut.js when you find offline debugging impossible?

    Can you access ExcelAppWorkOut.js through Windows file explorer If you disconnect WIFI?

    Is there any Internet resource referenced in ExcelAppWorkOut.js?

    If yes, you need to download them then add them to the application and add reference pointing to local path.

    In addition, offline debugging was explained both in the Home.html and Basic concepts for using Visual Studio to develop and debug apps for Office - Develop the contents of your app. We only need to comment the default Internet reference and uncomment local reference for MicrosoftAjax.js and office.js.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 18, 2014 10:42 AM
    Moderator
  • Is there a misunderstanding about offline? Offline for me means that there is no internet access, the plug is pulled, the router is switched off.

    Offline does not simply mean that the resources are local, which they are, of course.

    If the App Engine only loads the HTML-file when offline, then no changes to the JS-file are visible when you reload the app.

    With this I mean that debugging is not possible.

    If you clear the internet-cache, then the app stops working ('Office not defined' error message).

    • I guess in your test case you did not really get offline: Did you pull the plug?
    • Did you verify that the resources were accessed from your local server?
    • Did you clear the internet cache and checked that the app still works?

    Note: Using wireshark I see some LLMNR followed by some NBNS packets while online and reloading the app. I guess this is an indicator why the App Engine refuses to access the local server while offline.

    Tuesday, February 18, 2014 5:10 PM
  • Hi amadeus Decatur,

    According to your description, I suspect this issue is caused by resources file path. Did you put all files (*.html, *.css, *.js) in the same folder? If so, I’m afraid it’s the reason why only the html file is loaded. By default, the *.css files are under “Content” folder and *.js files are under “Scripts” folder.

    The recommended way is using Visual Studio to publish your web app to local IIS.

    If you want to deploy the web app manually, please ensure you’ve copied all file and keep folder structure exactly:

    Hope it will help.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 19, 2014 3:46 AM
    Moderator
  • Hi Jeffrey,

    yes, I deploy manually for Node.js with a different structure. Following your suggestion, I did change the directory layout. This is what I get after 

    1. Refresh catalog
    2. Insert App
    3. Go Offline
    4. Reload App
    [2014-02-19T12:51:08.473Z] GET 1.1 D:\ExcelAppWorkOut\App\Home\Home.html
    [2014-02-19T12:51:08.521Z] GET 1.1 D:\ExcelAppWorkOut\Content\Office.css
    [2014-02-19T12:51:08.527Z] GET 1.1 D:\ExcelAppWorkOut\Scripts\Office\MicrosoftAjax.js
    [2014-02-19T12:51:08.532Z] GET 1.1 D:\ExcelAppWorkOut\Scripts\Office\1.0\Office.js
    [2014-02-19T12:51:08.534Z] GET 1.1 D:\ExcelAppWorkOut\App\Home\Home.js
    [2014-02-19T12:51:08.535Z] GET 1.1 D:\ExcelAppWorkOut\App\App.js
    [2014-02-19T12:51:09.331Z] GET 1.1 D:\ExcelAppWorkOut\scripts\office\1.0\en-us\office_strings.js
    [2014-02-19T12:51:09.504Z] GET 1.1 D:\ExcelAppWorkOut\scripts\office\1.0\excel-15.js
    [2014-02-19T12:51:27.898Z] GET 1.1 D:\ExcelAppWorkOut\App\Home\Home.html

    Going offline is at 12:51:20, after that only the HTML-file is loaded. So your workaround did not work for me.

    Btw, I noticed that it says Cannot connect to catalog while being offline, although the catalog is local. 

    My guess is that the App Engine doesn't really like to be offline, for whatever reason.

    Workaround so far for working offline: Put all App-code (i.e. Home.js) inside the HTML-file, never clear the cache, do not change the manifest. 

    Wednesday, February 19, 2014 12:55 PM