omz/AppSales-Mobile

Duplicate Apps/Corrupt data as of 10/27?

taberrr opened this issue · 18 comments

Is it just me or did something change with the data being pulled down today?

After refreshing this morning, the app is giving incorrect sales amounts for the past several days, different amounts than before I refreshed. The "All Apps" button seems to be a reasonable amount, but it doesn't match the amount on the column in the bar graph. The app seems to have also reset/lost my color settings.

Same here. Not had a chance to look at what's happened. I was going to reinstall from scratch and see what gives.

I think I got the same issue. For me all apps and IAPs are duplicated, so I got 2 times more data. For some reason AppSales added all apps again.

I was going to give re-installing a try too. I remember back in March there were some issues with CurrencyManager, maybe something changed there.

@Morpheus2002 you're right, it looks like the graph columns are almost double the button amounts, give or take a few. And I have duplicates of every app except the IAPs. :o

@taberrr if you got to Account -> Manage Apps you will see, that all apps are duplicated.
If I try to hide in dashboard one duplicate, the other app becomes hidden too.

@Morpheus2002 Ah yeah, I'm seeing that too.

Deleting the account and re-adding doesn't seem to fix.

omz commented

Same here. Looking at the CSV, it looks like today's report contains new product type identifiers – I see "3F" and "3T", which haven't been in any previous report, as far as I can see. Not sure what those mean.

It looks like the same app is listed with multiple different product type identifiers, which is likely the reason duplicate products are added... If I remember correctly, AppSales uses the product type identifier for uniquing (might not be such a good idea, should probably use the SKU instead).

Btw, you can view the original file of a report by tapping its bar in the chart, and then selecting "CSV" at the bottom.

@omz wow I never realized the CSV button was there, thanks for that! No idea what those type identifiers mean either, but I'm guessing it has something to do with AppleTV approaching release.

omz commented

Yeah, probably something to do with that. The new product type identifiers aren't listed here yet: http://help.apple.com/itc/appssalesandtrends/#/itc0c699d615

I suppose the new product types are for tvOS apps coming this Friday.

omz commented

Hmm, but why would they show up in my reports? I don't have any tvOS apps...

I don't think they are tvOS related as I have lots of them with developer proceeds and there's no way my apps would be on the tvOS App Store.

Ok. How do we fix this issue? It breaks all the stats. 😞

We wait until we find out what exactly 3F and 3T is meant to be.

I have a workaround. Although the meaning of 3F and 3T codes are presently unknown, they are not the cause of the duplication.

For some reason the productSKU sometimes has a trailing space but before the tab delimiter. This is used as a primary key into the list of products, so causes a duplicate product to be created during the import process. However it has the same productID so it assumes the full purchase history, causing a doubling of perceived revenue. My fix - I am no git hub expert so won't be doing a fork an pull request... but here is how to fix, if you fancy editing the code.

First do a full export of your reports in case something goes wrong, and pull off the ZIP via iTunes.

in Report.m method +insertNewReportWithCSV:inAccount: where productSKU is extracted. Strip the trailing space. And if you can find a product with the productSKU with a space delete it (this does not delete the history, as the proper product is still referencing the productID history.

// existing lines
    NSString *productSKU = [rowDictionary objectForKey:kReportColumnSKU];
    if (!productSKU) productSKU = [rowDictionary objectForKey:kReportColumnSKU2];
// extra lines
    if ([productSKU hasSuffix:@" "])
    { // bug in 26th October reports, sku has trailing space
        // first delete 'productSKU plus space' duplicate and clean up the mess
        Product *product = [productsBySKU objectForKey:productSKU];
        if (product)
            [moc deleteObject:product];
        // now fix the SKU so it does not happen again
        int len = (int)productSKU.length;
        productSKU = [productSKU substringToIndex:len-1];
    }
// end of fix

Now run the app and delete 26th, long press on the 26th oct, then tap delete., then check for new reports to re-import 26th. repeat for 27th, 28th etc until all your duplicated apps are gone, leaving you with you original correct apps, and correct colours.
You can then remove the if product mic delete lines - they have done their job (i have not removed them yet as they have no side adverse side effect other than speed, i was just happy this app was working again.)

Regards,
Paul.

Awesome Paul! You're the man. I created a PR with your fix: #277

omz commented

Thanks!

And today we have definitions for the codes:

3
Redownload
Redownload (iOS and tvOS), excluding iPad-only
3F
Redownload
Universal (iOS), excluding tvOS
3T
Redownload
iPad-only app
F3
Redownload
Mac app