java.lang.NullPointerException: Attempt to invoke virtual method 'int android.accounts.Account.hashCode()' on a null object reference
at android.os.Parcel.readException(Parcel.java:1615)
at android.os.Parcel.readException(Parcel.java:1558)
at android.content.IContentService$Stub$Proxy.setSyncAutomaticallyAsUser(IContentService.java:1010)
at android.content.ContentResolver.setSyncAutomaticallyAsUser(ContentResolver.java:2020)
at android.content.ContentResolver.setSyncAutomatically(ContentResolver.java:2010)
at com.nextgis.forestinspector.MainApplication.onAddAccount(MainApplication.java:428)
at com.nextgis.maplibui.fragment.NGWLoginFragment.onTokenReceived(NGWLoginFragment.java:255)
at com.nextgis.forestinspector.fragment.LoginFragment.onTokenReceived(LoginFragment.java:104)
at com.nextgis.maplibui.fragment.NGWLoginFragment.onLoadFinished(NGWLoginFragment.java:231)
at com.nextgis.maplibui.fragment.NGWLoginFragment.onLoadFinished(NGWLoginFragment.java:49)
at android.support.v4.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:476)
at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:444)
at android.support.v4.content.Loader.deliverResult(Loader.java:126)
at com.nextgis.maplibui.service.HTTPLoader.deliverResult(HTTPLoader.java:89)
at com.nextgis.maplibui.service.HTTPLoader.deliverResult(HTTPLoader.java:37)
at android.support.v4.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:249)
at android.support.v4.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:77)
at android.support.v4.content.ModernAsyncTask.finish(ModernAsyncTask.java:466)
at android.support.v4.content.ModernAsyncTask.access$400(ModernAsyncTask.java:48)
at android.support.v4.content.ModernAsyncTask$InternalHandler.handleMessage(ModernAsyncTask.java:483)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:5514)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Android 6