question

jtpdev avatar image
jtpdev asked

JSON file not found for SDK Tester app on Android Kitkat Nexus 7

I have updated my Nexus 7 to Android Kitkat 4.4. Now trying to run my app (in test) it's not getting any of the product from the JSON file, and checking the logs I can see: 12-09 08:36:16.823: E/Amazon MAA(28766): Product database JSON file doesn't exist. Exception: /storage/emulated/0/amazon.sdktester.product.json: open failed: EACCES (Permission denied) And then checking the path logged, the JSON file is not there (no surprise). The correct location seems to be: /mnt/shell/emulated/0/amazon.sdktester.product.json Is there a proper way to fix the SDK Tester app to use the proper path? Or did I miss something in the config?
mobile associates
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi, Did you mean that you have json file in the below path /mnt/sdcard/amazon.sdktester.json And, still its not read by IAP SDK?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jtpdev avatar image
jtpdev answered
No the log from the Amazon Tester app show the following: [i]12-10 07:08:49.666: ERROR/Amazon MAA(28766): Product database JSON file doesn't exist. Exception: [b]/storage/emulated/0/amazon.sdktester.product.json[/b]: open failed: EACCES (Permission denied)[/i] But there is no JSON file at that location, the JSON file as you can see in the screenshot is in a different location, it almost looks like the code trying to locate the JSON is not resolving the symlink correctly and instead manipulate some existing path an end up computing a wrong path. See the overall file system layout in the attached screenshot. I am running Amazon App Tester version 1.0.0.27 which seems to be the latest one. Before upgrading to Android Kitkat everything was working fine, so I am not sure if that upgrade broke the system or the way the App Tester compute the path for the JSON file is messed up when running on 4.4
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jtpdev avatar image
jtpdev answered
And even trying to create a new symlink or folder in the location that the log is referring to is not working since that part of the filesystem is mounted in read only mode… even through ADB I can't create the proper file/folder/symlink. Anyone else experiencing the problem ??
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jtpdev avatar image
jtpdev answered
Kind of answering my own question: I just tried the same code for my app but on my brand new Kindle Fire HDX, and with the JSON file in the right location, the app is working fine. So my guts feeling is that on Android 4.4 the way the Amazon App Tester compute the path for the JSON file is wrong and it doesn't find it :-( But I would love to get someone from Amazon to confirm the issue and if this is the case, if there is some kind of workaround… I don't mind testing/developing on my HDX but I need to be able to test on non Amazon platform too.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Venkat@Amazon avatar image
Venkat@Amazon answered
We are aware of this issue and a new version of App Tester will be released to support Android KitKat soon.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jtpdev avatar image
jtpdev answered
Venkat, thank you for acknowledging the issue. I will continue my testing on my HDX, could you please reply to this thread when the updated App Tester with the fix is released. Thank!!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
We would update this thread once the issue is fixed in SDK tester. Thanks for pointing this out.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Elmo avatar image
Elmo answered
Happy new year, any update on this? Thanks!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jtpdev avatar image
jtpdev answered
Ping!! Any update? Or at least an ETA on a fix?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi, We can not commit on ETA officially. But I will update the thread once its fixed and released.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.