Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue with deploying to Windows phone 10

pleysjeNov 28 2016 — edited Nov 28 2016

I am trying to deploy an existing JET application to Windows phone 10 but I run into some errors.

The application was first made in JET v2.0.2 for the Android platform, it is currently in production at the client.

The client now wants ios and windows phone versions, so the application got migrated to JET 2.2.0 by following this guide.

After migrating the Android version still works like it is supposed to.

I went through the following steps to work on the windows phone version:

  1. First I added the windows platform with cordova

cordova add platform windows

  1. I changed the windows target version (guide)

<preference name="windows-target-version" value="10.0" />

  1. I installed visual studio 2015 and all the needed components by following the cordova guide

  2. I open the generated solution (.sln) file with visual studio 2015

open.png

  1. I change the startup project to the Windows 10 universal app and change the run target to a windows phone 10 emulator

target.png

  1. When running the application it gets deployed to the emulator, but as soon as it runs crashes with the following error message

windows phone err.png

Unhandled exception at line 1533, column 13 in ms-appx-web://workspace/www/cordova.js

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

I found this stackoverflow post which handles the same problem, like suggested I checked my index.html to see if the WinJS library is referenced before cordova.js which is the case.

<script type="text/javascript" src="/www/WinJS/js/base.js"></script>

<script src="cordova.js"></script>

When looking at the project structure I noticed that index.html is in the "www" folder.

solution.png

index.html references to the WinJS file like "/www/WinJS/js/base.js" so I tried referencing without the /www/ prefix. After changing the reference link I get a new error

windows phone err 2.png

Unhandled exception at line 7, column 175 in ms-appx-web://psa.mpet.containerapp/www/js/libs/require/require.js

0x800a139e - JavaScript runtime error: Mismatched anonymous define() module: function (WinJS) {

It is unclear to me why I am getting this error and how I can solve it.

Thanks in advance for your help.

Comments

Post Details

Added on Nov 28 2016
1 comment
214 views