Amazon CognitoUserPool getUser Exception -


i created user pool object follow:

cognitouserpool userpool= new cognitouserpool(context, userpoolid, clientid, clientsecret, cipclient); 

with object , valid user name, can create cognito user follow:

cognitouser user = userpool.getuser(username); 

this works fine, , can data transfer , on. after few days, got exception:

java.lang.nullpointerexception: attempt invoke virtual method 'com.amazonaws.mobileconnectors.cognitoidentityprovider.cognitouser com.amazonaws.mobileconnectors.cognitoidentityprovider.cognitouserpool.getuser(java.lang.string)' on null object reference

can 1 explain me why got exception , how fix it.

note: never release cognitouserpool object. don't understand why have null object reference!


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -