Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL EXCEPTION in MovieRepository #15

Open
Sinarahimi opened this issue Jan 24, 2018 · 1 comment
Open

FATAL EXCEPTION in MovieRepository #15

Sinarahimi opened this issue Jan 24, 2018 · 1 comment

Comments

@Sinarahimi
Copy link

FATAL EXCEPTION: AsyncTask #1 Process: iammert.com.androidarchitecture, PID: 7318 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:325) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) 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) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List iammert.com.androidarchitecture.data.remote.model.MoviesResponse.getResults()' on a null object reference at iammert.com.androidarchitecture.data.MovieRepository$1.saveCallResult(MovieRepository.java:36) at iammert.com.androidarchitecture.data.MovieRepository$1.saveCallResult(MovieRepository.java:32) at iammert.com.androidarchitecture.data.NetworkBoundResource$2.doInBackground(NetworkBoundResource.java:71) at iammert.com.androidarchitecture.data.NetworkBoundResource$2.doInBackground(NetworkBoundResource.java:67)

@zackygaurav
Copy link

zackygaurav commented Mar 13, 2018

It is because this App requires API Key to access data from themoviedb.org.

You should grab an API key from https://www.themoviedb.org/settings/api
Then add the API Key to ApiConstants.java

This will fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants