amzn / amzn/fire-app-builder

IAP Causes Splash Freeze

Open
#78 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
201
Forks
255
PR merge metrics
No merged PRs in 30d

Description

I am using the Amazon Fire App Builder to create a streaming app. It works great when testing. Submitted fine to Amazon, no issues.

However, when I enable IAP and follow the steps to add my subscription IAPs, it freezes on the splash screen. If I disable IAP it loads again. Seems to be an issue in the actual purchasing component?

```
E/SplashActivity: Failed to put data in cache for recipe

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object com.amazon.android.module.Module.getImpl(boolean)' on a null object reference

at com.amazon.android.contentbrowser.helper.PurchaseHelper.initializePurchaseSystem(PurchaseHelper.java:145)

at com.amazon.android.contentbrowser.helper.PurchaseHelper.(PurchaseHelper.java:131)

at com.amazon.android.contentbrowser.ContentBrowser.onAllModulesLoaded(ContentBrowser.java:758)

at com.amazon.android.tv.tenfoot.ui.activities.SplashActivity$1.doInBackground(SplashActivity.java:119)

at com.amazon.android.tv.tenfoot.ui.activities.SplashActivity$1.doInBackground(SplashActivity.java:109)

at android.os.AsyncTask$2.call(AsyncTask.java:305)

at java.util.concurrent.FutureTask.run(FutureTask.java:237)

at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)

at java.lang.Thread.run(Thread.java:761)
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the freeze with IAP enabled and compare it with the working configuration where IAP is disabled. Start at PurchaseHelper.initializePurchaseSystem in PurchaseHelper.java:145 and trace its call from ContentBrowser.onAllModulesLoaded; done means the app completes SplashActivity initialization without the reported NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.