question

rafaeladel avatar image
rafaeladel asked David Marginian Deactivated commented

Getting No token type: com.clover.account.token.app

Hello,
When I run this snippet

CloverAuth.AuthResult authResult = CloverAuth.authenticate(passedContext, mAccount, false, null, null);
I get
Bundle result returned from account manager:
CloverAuth: errorCode => -3
CloverAuth: errorMessage => No token type: com.clover.account.token.app, for package: com.example.clovertargetsdk
clover_log: No token type: com.clover.account.token.app, for package: com.example.clovertargetsdk
I'm using Clover Flex emulator and entered the correct email and password at the beginning.
Any help ?
Clover FlexAPI TokenEmulator
2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

javichaques avatar image javichaques commented ·
Hi,

I have the same error, @rafaeladel how u resolved it?

Thanks
0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega commented ·
Lower your SDK version to 25 max.

In Android Oreo (8) there's a big difference in obtaining the Account, my suggestion is to keep the old SDK until further notice (I believe SDK 27 works too).
0 Likes 0 ·

1 Answer

Frank Faustino avatar image
Frank Faustino Deactivated answered David Marginian Deactivated commented
There's a couple of things that might be at play here:

  1. Something went wrong during the setup of your Flex emulator. Follow the steps outlined in our documentation to create a new Flex emulator: https://docs.clover.com/clover-platform/docs/setting-up-an-android-emulator
  2. Make sure you either set the target SDK of your app to 22 (API level 23 introduces grant at runtime permissions and Clover devices follow the grant at install app permission model). If your app requires target SDK level 23, 24 or 25, then make sure you implement grant at runtime model to have your app run correctly on the emulator: https://developer.android.com/training/permissions/requesting.html
6 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

wsadiq avatar image wsadiq commented ·

Hello,


I am getting the same error but I am not using an emulator. I am getting this error in Clover Station 2018 Dev Kit. I started getting this recently. My target SDK version is 25.


0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega wsadiq commented ·

Share code sample please & log

0 Likes 0 ·
wsadiq avatar image wsadiq Bryanne Vega commented ·

Please see the following snippets.


Code: https://bitbucket.org/snippets/kikkle/qnz56x/cloverapputiljava

line 68 shows the account object being obtained and line 159 shows attempt to obtain the auth token.


logcat: https://bitbucket.org/snippets/kikkle/EbGxjx/logcattxt

line 277 shows the relevant messages.


There are a few things to note. This app is in production. The last release was built in January 2019 and is being successful used by many clients. New accounts are also being created as recently as yesterday.


I have taken the same code from github and rebuilt and deployed it on my Clover Station 2018 DevKit and it does not run anymore. I have tried to build with clover android sdk build 228.3 as well as latest release with same result.


I am very puzzled as to what has changed.


One thing I do notice is a special character in the email name in the obtained account. I have not changed any of my account settings in years so not sure if that is significant or not.


Any help or insight would be greatly appreciated.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community