Issue with windows universal IAP

Bugs will be moved here once resolved.

Post » Thu May 01, 2014 8:50 pm

Problem Description
When I use universal export for windows, the IAP works fine for windows phone but if I use trial mode Yes, with windows 8.1 the program crashes and gives this error:

Unhandled exception at line 4, column 205 in ms-appx://my-app-ID/Amazon-Web-App-API-tester.min.js
0x800c0005 - JavaScript runtime error: The system cannot locate the resource specified.

The line in question is:
localStorage},_getMockItems:function(){if("undefined"!==typeof window){for(var a=["amazon.sdktester.json","/amazon.sdktester.json","/static/amazon.sdktester.json"],c=new XMLHttpRequest,b=0;b<a.length;b++)if(c.open("GET",a[b],!1),c.send(),200==c.status)return JSON.parse(c.responseText);return null}},getCloudSyncData:function(){return this._loadAsJSON(this._CLOUD_SYNC_DATA_KEY)},setCloudSyncData:function(a){this._saveAsJSON(this._CLOUD_SYNC_DATA_KEY,a)},clearCloudSyncData:function(){this._storage.removeItem(this._CLOUD_SYNC_DATA_KEY);


I only get the error when trial mode is ON for IAP.

I have no errors if i use the Windows IAP plugin vs. IAP.
Since I am using universal export I would like an all in 1 solution, otherwise I need to create some extra code in order to use windows 8.1 and windows phone 8.1. Ideally I want to use IAP for both, it seems to half work.
B
43
S
18
G
8
Posts: 500
Reputation: 8,445

Post » Fri May 02, 2014 2:36 pm

Closing, please follow the bug report guidelines and attach a .capx with complete reproduction steps. The error message is to do with Amazon IAP so this report doesn't make much sense as it stands.
Scirra Founder
B
397
S
236
G
88
Posts: 24,420
Reputation: 194,549

Post » Sun May 11, 2014 2:02 pm

It does not make sense which is why I am confused lol

here is a small test capx.

Export the capx to windows 8.1 universal.
Setup the test cert in visual studio.
Hit debug on local machine

you should get an error right away something like

SCRIPT5: Unhandled exception at line 4, column 205 in ms-appx://*****/Amazon-Web-App-API-tester.min.js
0x800c0005 - JavaScript runtime error: The system cannot locate the resource specified.
File: Amazon-Web-App-API-tester.min.js, Line: 4, Column: 205

Now, if you have both IAP and windows 8 set to test mode, you get an error due to 2 message windows trying to open
aka this line in the code
this.currentApp = (this.isTestMode ? winStore["CurrentAppSimulator"] : winStore["CurrentApp"]);
if (this.isTestMode)
{
//new Windows["UI"]["Popups"]["MessageDialog"]("Note: this Windows 8 app is in Test Mode, designed for testing purchases. Before publishing, be sure to set Test Mode to 'No' in the Windows 8 object's properties.")["showAsync"]();
}

You can see the error by take the file in visual studio, "amazon-web-app-API-tester.min.js" and removing it from shared and adding it to windows 8.1 phone.
You do not have the required permissions to view the files attached to this post.
B
43
S
18
G
8
Posts: 500
Reputation: 8,445


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 6 guests