[r228] Win10 PubCenter not working without WinJS

0 favourites
  • 8 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Problem Description

    Hi. With the latest update I get this error when I try to preview in Visual Studio:

    Unhandled exception at line 5, column 2 in ms-appx://microsoft.advertising.javascript/ad.js

    0x800a1391 - JavaScript runtime error: 'WinJS' is undefined

    The changelog says "Windows 10 apps: now no longer depends on WinJS library, which makes apps a bit smaller and more efficient". Does this require an update to PubCenter plugin to work again? Or add WinJS back?

    Attach a Capx

    http://www.playbird.at/sites/Bl4ckSh33p ... WinJS.capx

    Description of Capx

    just export for Win10 and preview in Visual Studio

    Steps to Reproduce Bug

    • export for Win10
    • add reference for Win10 Ad SDK
    • preview in Visual Studio

    Observed Result

    App not running (error)

    [quote:2jovqsu8]Unhandled exception at line 5, column 2 in ms-appx://microsoft.advertising.javascript/ad.js

    0x800a1391 - JavaScript runtime error: 'WinJS' is undefined

    Operating System and Service Pack

    Win10 64Bit

    Construct 2 Version ID

    228

  • Hi. Does anyone know a "quick fix" for this? I cant update my app and if I remove steam beta I cant open the project with the old version anymore.

    I hope a new beta build with a fix is coming soon.

  • I just renamed the .capx to .zip and changed the saved version number to 22700 but I cant open it to publish it with the old version and working ads.

    This error shows up:

    [quote:1z1sae3f]---------------------------

    Unable to load project

    ---------------------------

    Could not open project 'C:\Users\mail\Documents\Construct 2\Projekte\Overwatch Companion\Overwatch Companion zip\Overwatch Companion.caproj':

    Cannot find action with the ID 16 in the plugin 'Windows 8' (win8). This is usually caused by a third-party plugin developer removing the action from the plugin in an update (instead they should set the deprecated flag on it which does not break existing projects), or reinstalling an older version of the plugin that does not have an action used in this project.

    ---------------------------

    OK

    ---------------------------

    Any idea how to fix this?

  • So we really want to drop WinJS if possible - it means shipping a few megabytes of extra resources with the C2 installer and this overhead gets bundled with every Win10 app, which increases file size, memory use and startup time. It also creates a bit of a distribution headache because technically we should keep our bundled WinJS updated with the official version, which we hadn't bothered to do previously (so there is the risk of bugs/unsupported versions as well).

    I think pubCenter/Microsoft Ad SDK is the last thing relying on WinJS. I didn't find this while testing the changes in r228 since WinJS is not directly used by the pubCenter plugin, it's an indirect dependency. I've got in touch with Microsoft and they say the Microsoft Ad SDK is going to publish an update in the near future which drops the WinJS dependency, which should then fix the pubCenter plugin in C2 as it is. I think I would rather wait for this to happen rather than re-bundle WinJS, which adds overhead to every game. The Ad SDK update should happen before the next stable update (or if it's close we will delay the stable release for it).

    There are two workarounds for the time being:

    1) roll back to r227 stable. Note we have always advised that beta releases are just for testing, so you should not upgrade important projects without making backups and having a rollback plan in case there is a problem with the beta release. We cannot promise that problems only occuring on beta releases will be fixed any time sooner than by the next stable release (if indeed we decide it needs fixing). The hack-your-project-backwards trick only works if you don't use any features that were added in the intervening releases, which it looks like you did do, so it won't backport until you delete those changes. It looks like you started using the new "Set back button visible" action which was new in r228, which is why it won't backport to r227.

    2) add WinJS back yourself. Start a new blank WinJS project in Visual Studio, then copy-paste the WinJS library stuff to your existing project including the referencing tags in index.html. That is basically what C2 does when it bundles WinJS, so adding it back yourself will get the Ad SDK working again.

    I'll leave this report open as a reminder to others (and to me to test it works again before the next stable release after the MS Ad SDK updates).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you for your reply and explanation!

    I totally forgot about the back button. I disabled the line but kept it in. I try to remove it and hope it works again in 227 then. I did not use anything else new, just added lots of text and images for a content update.

    I usually keep always backups for each release (capx) but this time I messed up and saved to the original file. I think I will stop to use the betas for a while but I love testing new stuff and report bugs when I find them.

    I asked in the other topic about it: is it possible/allowed to install the beta as "standalone" version when I own the Steam version of C2 Personal?

  • I just tried it again (renaming .capx to .zip, extracting, changing saved version in caproj file to 22700 and opening it) and I was worried because the Windows 8 Plugin was called Windows Store but it seems to work. I could load it in 227 and preview and edit things. I save it as single capx again and hope nothing is broken.

  • Ashley

    Hi, any comments from Microsoft?

  • This bug report is nearly 2 years old and so I assume it is no longer relevant. By now Microsoft should have updated their library. Please file a new issue if you still have trouble.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)