How to clear client side browser cache for Excel 2016 Task Pane add-in on Mac? - excel

This is a follow-up to a previous question where the answer to "How do I ensure I see the latest JS code in my Task Pane add-in" involved controlling the client side caching behavior via server-added meta/no-cache tags (or versioning the server resources).
However, I am looking for a manual way, on the client, for the end-user to clear out the client side cache that appears to be storing JavaScript files and preventing an updated JS file on the server from being used by the Task Pane add-in. During development, I'll be updating the JS resources frequently on the server and I am looking for a client side solution that allows those updated files to be used.
Environment: Desktop version of Excel 2016 running on Mac (OSX 10.11.5)
Task Pane add-in using v1.2 of the Excel/Office.js.
Scenario: deploy add-in artifacts to web server, run add-in on Mac. Then update code in foo.js in add-in, re-deploy to web server. Run add-in and see old (pre-update) behavior from foo.js.
What I have tried:
On the same Mac, loaded foo.js directly from the web app in Safari. I can see the changes in the js code that I expect to be in the updated version.
Cleared the Safari cache (Privacy > Remove All Website Data) (I suspected that this would not work based on #1 - Safari does not appear to share a cache with Excel but worth a shot) - did not change anything.
Poked around under ~/Library/Containers/com.microsoft.Excel trying
to find a cache - deleted ~/Library/Containers/com.microsoft.Excel/Data/Library/Caches/com.microsoft.Excel - no help.
Used the Reload menu item from the Task Pane's context menu (looks
like [i] on the Mac) - no difference: still seeing old foo.js.
Where are the JavaScript files referenced by an Excel (desktop) 2016 Task Pane add-in stored? (on the Mac) and how can the end user remove them?

I stumbled upon com.Microsoft.OsfWebHost while poking around using the "defaults" command from a Terminal on the Mac. Some googling turned up this article which basically provided the answer. In a slight refinement to what is instructed there, this is what I did:
ensured that I had quit Excel
in Finder, navigated to
~/Library/Containers/com.Microsoft.OsfWebHost/Data/Library/Caches
renamed (or deleted) the folder named "com.Microsoft.OsfWebHost" there
opened my workbook in Excel (it already has the add-in Inserted)
nothing seemed to be loading, so I used the Reload command from the context menu in the Task Pane
Now I could see that my updated version of the java script file has been loaded.
This is based on empirical evidence only, no corroboration from Microsoft or Apple doc, so your mileage may vary.
BTW, there are some interesting "defaults" properties for the com.Microsoft.OsfWebHost:
defaults read com.Microsoft.OsfWebHost
{
WebKitCacheModelPreferenceKey = 1;
WebKitDebugFullPageZoomPreferenceKey = 1;
WebKitPluginsEnabled = 0;
WebKitUsesPageCachePreferenceKey = 0;
}
Googling for WebKitCacheModelPreferenceKey did not turn up any official documentation, but there seem to be suggestions that setting it to 0 might suppress caching.

Related

Excel TFS Add-In Crashes Connecting to TFS

We frequently use Excel to perform bulk updates of data in TFS. Up until very recently, the Team Foundation Add-In has worked very well. However, it has started failing in several ways:
It will connect to the server, but attempting to connect to any
project causes Excel to crash, producing a Watson report in the
Windows Application Event Log.
If I restart Excel, it reports that it is running into problems with
both the shim and the add-in, and offers to disable it. If I do not
disable it, I still can't connect to a project.
Eventually, the add-in refuses to load at all, until I use the
Options dialog to manually add the COM add-in back into the
application. Doing so produces the same results (Excel crashes when
attempting to load a project).
I have taken the following steps in an attempt to resolve the issue:
Removed and completely reinstalled Office.
Re-registered the add-in component.
Uninstalled and reinstalled Team Foundation Office Integration.
None of these have produced a fix to the issue.
Does anyone know how to resolve this issue?
P.S. If this is not the correct "stack" for this question, kindly point me to the correct one on the exchange. Thank you.
If you are reading the accepted answer and it still isn't working, here's an additional tip. I had the EXACT same problem and saw that same link to clear the cache from numerous sites, bit it didn't work.
Here's the thing. I don't think that article lists ALL of the places that cache can be hiding on your machine. I deleted the cache folder in two different places on my machine and had given up on that as a solution.
Then I searched my entire hard drive for any folder with "Team Foundation" in the name and found a couple more buried in other hierarchies. Deleting these FINALLY solved the problem.
Here are some folders to look for, but like I said, check the entire drive
c:\users\yourlogin\AppData\Local\Microsoft\Team Foundation
c:\Program Files\Common Files\Microsoft shared\Team Foundation Server\
c:\users\yourlogin\AppData\Local\Temp\Microsoft\Team Foundation
The actual cache folder will be nested another level deep under a numbered folder named with something like "7.0" or "8.0" delete the cache folder from every one you find under every number.
In general cleaning the caches on your client machine will resolve such problems, including the TFS and VS caches...
To clean the caches, please see How to clear the TFS cache on client machines

Stop node-debug from opening a new browser window

The command:
node-debug sls offline
opens a new browser window every time it is run.
How do we stop it from opening a new window every time? I want to reuse the existing window!
This is a known issue with node inspector. Take a look here.
Since 0.9.0 we use https://github.com/benderjs/browser-launcher2 to
start the browser, and make sure it's Chrome/Chromium/Opera (i.e. the
browsers that can properly render node inspector; we detect installed
browsers in the system and choose the most appropriate one; earlier we
used opener module which just delegated opening the browser to the OS,
which would open the defaul browser, which could have been e.g.
Firefox) and this could be the reason why the behavior has changed.
browser-launcher2 actually does a bit more than just launching a
browser, for instance it creates a new profile for Chrome in a
subfolder of ~/ - this is probably the issue that #CalvinScott
reported (i.e. Chrome that was opened was the new profile created by
browser-launcher, not your original profile; you should be able to
open your original profile of Chrome normally)
Also, you may consider this:
Since version 6.3, Node.js provides a buit-in DevTools-based debugger
which mostly deprecates Node Inspector, see e.g. this blog post to get
started. The built-in debugger is developed directly by the
V8/Chromium team and provides certain advanced features (e.g.
long/async stack traces) that are too difficult to implement in Node
Inspector.

Internal system error when opening Lotus Notes XPages database

I have downloaded sample XPages database http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/SurveyToolSample
and deployed it to server. I can open it without problem with my Lotus Notes 8.5.3, but my colleague cannot open it on his Lotus Notes 8.5.2 Standard Configuration.
He gets the following error:
**This Page Cannot Be Displayed**
Internal system error when processing the request for the page ( http://127.0.0.1/xsp/JHGNES!!Major %5CSurvey.nsf/HomePage.xsp?OpenXPage&xspRunningContext=Notes ).
Please retry this request.
Enforced by host JHGMELWEB01
If this condition persists, please contact your corporate network administrator and provide the code shown below.
Notification codes: (1, INTERNAL_ERROR, http://127.0.0.1/xsp/JHGNES!!Major %5CSurvey.nsf/HomePage.xsp?OpenXPage&xspRunningContext=Notes)
I have Recompiled all lotusScript in the database using my 8.5.3 client.
Any ideas what can be the problem?
Recompiling all Lotusscript does not re-compile XPages.
Try doing a clean of the project by opening the database in Domino Designer and then use Project - Clean in the menu. Clean removes all built code and then re-builds the code.
In your 853 Designer, try recompiling the app to support 852 as the minimum release?
Launch the Application Properties in Designer, go to the XPages tab, then under 'Minimum Supported Release' select to compile this application to run on 'Release 8.5.2'.
For the vast majority of cases, apps built or compiles on current releases will work fine on previous releases without needing to do this step. Though in some cases, changes in the new release, like a new property for example, may cause failures in previous releases. This is what I'm guessing what is happening in your case.
Thanks for your quick responses. I have done more testing after I tried suggested solutions and it seems like the problem is not in the database itself but in this colleague's PC configuration, as it works on 5 other PCs running 8.5.2 and 8.5.2FP2.
Actually when you change "Minimum supported Release" on the xpages tab of app properties it prompts you to rebuild all the code.
The problem was in the location settings of that particular machine. After we removed contents of "Proxy configuration" it worked like a charm.

UMLModeler.closeModel(modelObj) is not closing the EMX File in Editor RSA 6.0.1

I am working on a project where we are using RSA 6.0.1.
I have to run the some set of tasks programmatically. I have open the emx file using UMLModeler.openModel(absoluteModelPath); Then do some editing and save through UMLModeler.getEditingDomain().run( new ResourceSetModifyOperation("Update Operation") {},Monitor); Then I refreshed the project through sourceProject.refreshLocal(IProject.DEPTH_INFINITE,monitor); till now things goes fine and finally when I am closing the model through UMLModeler.closeModel(objUMLModel); It is running this code but not closing the EMX file in the editor.
There is no error , no exception. Can any one please suggest me what can I do to close this emx file.
First, I would upgrade to 7.5.4 as the model concept goes away, in fact the method you are using is deprecated.
From the API documentation:
closeModel(Model model)
Deprecated. Since 7.5, use the closeModelResource(Element) method, instead
Using the newer methods might resolve you problems. Additionally, do you try refreshing the workspace? Either manually by right clicking on the project and selecting refresh or doing it with code.
Finally the most likely issues is that there are multiple 'handles' to the model. Closing yours does not close the editor or project explorer handle. I do not work for IBM so I cannot know this for sure. You could test this by opening it in the project explorer, open it with your code, then close it in the explorer manually, and only then try running your transaction on the model and then closing it. What does the explorer look like when it closes?
Or post more details and maybe I can code my own example. I would try the debugging first and also post this on the IBM developer works site. They are likely going to tell you to upgrade though. :)

Launching a web page in a different process

I want to launch the browser in a different process when a particular link is clicked on the page. When I checked the net I found the following tip: http://www.dslreports.com/faq/3849 . But there we have to change the registry. Is there any simple way of doing this without touching the registry?
If you use the Google Chrome browser, each new window or tab runs in a separate process. Internet Explorer version 8 will do the same (it's currently in the second beta round).
Earlier versions of IE will run a new window in a separate process if it is launched from, say, the Start menu or the command line, or a link in an email (but not by clicking a link within IE). I imagine you could create a proxy that the client would run through, which would intercept the links you care about and launch them by running a command line request. That seems like more trouble than mucking with the registry though (assuming that registry change still works -- looks like your link is from 2002).
I don't believe this is possible unless you change the client computer setup or software it's running.
Why do you want to do this?

Resources