Code Monkey home page Code Monkey logo

Comments (7)

holgerbrandl avatar holgerbrandl commented on August 30, 2024

I think the implementation is correct in the library. When trying the same I get an

Exception in thread "main" ResponseStatus{code=30, message=Invalid username and/or password: You did not provide a valid login.}

which is the expected result.

I guess the problem is in your android code. Make sure not to do the login from the main thread because Android disallows that.

from themoviedbapi.

Cese93 avatar Cese93 commented on August 30, 2024

I put all code into a task but the problem persit... Have i to create the login form or i have to use a WebView?

from themoviedbapi.

holgerbrandl avatar holgerbrandl commented on August 30, 2024

It does not need to be a webview. Could you try the latest github version?

Is it working in general (when using your apikey)?

from themoviedbapi.

Cese93 avatar Cese93 commented on August 30, 2024

Ok latest version work better and now Response Status is not empty, but the error still exist.

The library working in general fine with my api key for now.

FATAL EXCEPTION: AsyncTask #2
                                                                             Process: com.example.erik_.tvmanager, PID: 25138
                                                                             java.lang.RuntimeException: An error occurred while executing doInBackground()
                                                                                 at android.os.AsyncTask$3.done(AsyncTask.java:309)
                                                                                 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:234)
                                                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                 at java.lang.Thread.run(Thread.java:818)
                                                                              Caused by: ResponseStatus{code=30, message=Invalid username and/or password: You did not provide a valid login.}
                                                                                 at info.movito.themoviedbapi.AbstractTmdbApi.mapJsonResult(AbstractTmdbApi.java:78)
                                                                                 at info.movito.themoviedbapi.AbstractTmdbApi.mapJsonResult(AbstractTmdbApi.java:45)
                                                                                 at info.movito.themoviedbapi.AbstractTmdbApi.mapJsonResult(AbstractTmdbApi.java:40)
                                                                                 at info.movito.themoviedbapi.TmdbAuthentication.getLoginToken(TmdbAuthentication.java:73)
                                                                                 at info.movito.themoviedbapi.TmdbAuthentication.getSessionLogin(TmdbAuthentication.java:99)
                                                                                 at com.example.erik_.tvmanager.LoginActivity$LoginTask.doInBackground(LoginActivity.java:102)
                                                                                 at com.example.erik_.tvmanager.LoginActivity$LoginTask.doInBackground(LoginActivity.java:95)
                                                                                 at android.os.AsyncTask$2.call(AsyncTask.java:295)
                                                                                 at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                                 at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 
                                                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
                                                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                                                                                 at java.lang.Thread.run(Thread.java:818) 

from themoviedbapi.

holgerbrandl avatar holgerbrandl commented on August 30, 2024

check that pw and user are fine by logging into
https://www.themoviedb.org/login

from themoviedbapi.

Cese93 avatar Cese93 commented on August 30, 2024

If user and pass are fine, all works. But if i put invalid username or password (or both) my application fall down.

from themoviedbapi.

holgerbrandl avatar holgerbrandl commented on August 30, 2024

you need to catch the ResponseStatusException with try catch

from themoviedbapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.