Share charm error on SuperCacheManager class not registered


I added a share option to config.json, but when I click on the Share charm when running my Windows 8.1 app, I get a JavaScript runtime error: Class not registered. It is referring to the SuperCacheManager. Any idea how to register this class? Thanks.
"wat_share": {
        "enabled": true,
        "showButton": true,
        "buttonText": "Share",
        "buttonSection": "global",
        "title": "WAT Documentation",
        "url": "{currentURL}",
        "screenshot": true,
        "message": "{url} shared with {appLink} for Windows Phone and Windows 8 Store apps."
Exception is about to be caught by JavaScript library code at line 155, column 13 in ms-appx://mglwatdemo/template/js/share.js

0x80040154 - JavaScript runtime error: Class not registered

If there is a handler for this exception, the program may be safely continued.

On line 155, share.js:
sharePage = function (dataReq, deferral, imageFile) {
        var msg = WAT.config.share.message,
            shareUrl = WatExtensions.SuperCacheManager.resolveTargetUri(WAT.options.webView.src),

If I change the code to remove the SuperCacheManager, then the sharing works fine.
            shareUrl = WAT.options.webView.src,

file attachments


mscherotter wrote Dec 10, 2014 at 2:33 PM

I am seeing that issue as well.

lgrosland wrote Dec 21, 2014 at 10:18 PM

I'm having this problem with sharing and also with secondary pinning. When I change line 219 of tile.js to WAT.options.webView.src then it works correctly. Problem with resolveTargetUri?

boyofgreen wrote Jan 7, 2015 at 4:50 PM

I guys,
Looks like this is a bug on our part. We'll get this fixed in the next release , version 2.3


alexjota wrote Feb 26, 2015 at 9:05 AM

Hi everyone!

This issue is caused because the entries for the WatExtensions classes are missing in the app manifest for the application. As Jeff pointed out, this issue will be fixed in version 2.3 of the Universal Template. As a workaround until then, you can manually edit the file package.appxmanifest for your application, and add the following section at the end (before the <Package> closing element):
    <Extension Category="windows.activatableClass.inProcessServer">
        <ActivatableClass ActivatableClassId="AppPromo.RateReminder" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="AppPromo.RateReminderResult" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="AppPromo.RateHelper" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WatExtensions.SuperCache.PreloadScript" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WatExtensions.SuperCache.NavigatingEventArgs" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WatExtensions.SuperCache.Config.SuperCacheConfig" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WatExtensions.SuperCache.UriExtensions" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WatExtensions.SuperCacheManager" ThreadingModel="both" />
You will need to apply this fix both in the Windows and the Windows Phone projects.

If you have any issues please let me know.