AppWatcher - Track the price of apps and their in-app purchases

I’ve run into an error today mentioning a line & column. Looking at the JSON file, it’s an item saved that’s been there for a while. Does that mean that Apple has changed something recently?

I’ve no issues. Can you please copy the error into here?

It can be that the app was removed from the AppStore… can you find it manually?

I’m not exactly sure if this is in the js script file or the json file.

2020-03-09 14:43:16: launchMode: undefined
2020-03-09 14:43:16: retrieving prices
2020-03-09 14:43:16: getting app details
2020-03-09 14:43:16: getting in-app purchases
2020-03-09 14:43:16: Error on line 251:24: Expected value of type string but got value of type undefined.

Thank you!

Can you please change the code there from

	log("getting in-app purchases");
	let inApp = await(Promise.all(json.map(i => {
		let req = new Request(i.trackViewUrl);
		log("trackViewUrl: " + req.url);

to

	log("getting in-app purchases");
	let inApp = await(Promise.all(json.map(i => {
		log("trackViewUrl: " + i.trackViewUrl);
		let req = new Request(i.trackViewUrl);

and try again and post the log? Thank you

Thank you for taking the time to help! The below is what I got after editing the script.


2020-03-09 16:06:40: launchMode: undefined
2020-03-09 16:06:40: retrieving prices
2020-03-09 16:06:40: getting app details
2020-03-09 16:06:40: getting in-app purchases
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/taskade-manage-anything/id1264713923?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/exist/id986201088?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/tiny-invoice-estimate-maker/id679572722?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/kodex/id1038574481?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/moshi-twilight-sleep-stories/id1306719339?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/movielist-track-your-movies/id1422653344?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/lego-friends-heartlake-rush/id1280277415?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/jayson/id1447750768?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/invoice-app/id1381107874?mt=12&uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/mailbutler-email-in-no-time/id1461320466?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/touch-portal/id1410172542?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/paste-clipboard-manager/id967805235?mt=12&uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/ease-fax/id1484537415?mt=12&uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/date-time-calculator-9-in-1/id536930649?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/quickness-add-voice-contacts/id1449776813?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/widget-calendar/id922436277?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/wipr/id1030595027?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/gaget-google-analytics-for-iphone/id716442061?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/slow-shutter-cam/id357404131?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/foldify-create-print-fold/id1010882968?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/impossible-road/id608707318?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/block-distracting-websites/id1189844594?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/busy-shapes-2/id1133265328?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/numberblocks-hide-and-seek/id1328950963?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/numberblocks-card-fun/id1481195453?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/numpad/id297623436?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/holedown/id1297270249?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/reading-raven-hd/id496586135?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/altos-odyssey/id1182456409?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/pixelmator/id924695435?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/kpressor/id1266619677?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/homecam-for-homekit/id1292995895?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/reeder-4/id1449412357?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/remote-unlock/id1439015487?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/elegant-converter-video/id1479676588?mt=12&uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/streaks-habit-tracker/id1493327990?mt=12&uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/yoink-improved-drag-and-drop/id1260915283?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/very-little-nightmares/id1435140819?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/goodnotes-5/id1444383602?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/reeder-4/id1449412482?mt=12&uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/photosweeper/id463362050?mt=12&uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/filebrowser-for-business/id854618029?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/tap-forms-organizer-5-database/id1084143351?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/things-3-for-ipad/id904244226?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/endless-reader-school-ed/id873347064?uo=4
2020-03-09 16:06:40: trackViewUrl: https://apps.apple.com/us/app/metagrid/id1098117609?uo=4
2020-03-09 16:06:40: trackViewUrl: undefined
2020-03-09 16:06:40: Error on line 252:32: Expected value of type string but got value of type undefined.

Thank you!

Well, I just want that it works for everybody :wink:

Looks really like a problem with your save file.

Let’s move this to PMs. Please send me your AppWatcher.json in the Scriptable iCloud Drive folder.

2 Likes

I’ve updated the script with a little check when adding apps so only apps can get added. This is because other things have to be handled differently than apps by the script.

Recently I got an error sometimes. The reason was that somehow the script exceeded the API limit for the in-app purchases. I’ve fixed it for now. When it reaches the limit, it will simply retry the failed request up to 3 times. If it still fails after the last time, it throws an error. Please report if you get the error!

I’ve updated the script with an option to disable the tracking of in-app purchases. I’ve also changed it to save more often, so you don’t loose any information at any time.

Awesome, thank you so much!

hi, i keep having this issue. Do you have any idea about what could go wrong and how to fix it ?

I’ve updated the script with some bug fixes. Thanks to @nicoboss for reporting one!

  • Fix some problems with urls
  • Create/copy settings file if it wasn’t found
  • Fix spelling
1 Like