question

litpro avatar image
litpro asked thedangler commented

App Updater fails on Emulator

Basically, the problem is that I can install the engine and updater APKs on my AVD emulator, but when I go to Add Account and log in with my sandbox account, Clover fails and sometimes crashes.

NOTE:

The updating problem appears pretty regularly on the forums, and my issue kind of resembles this recent one ( https://community.clover.com/questions/12291/clover-has-stopped-when-setting-up-emulator.html) but my logcat output is different and having engine version 1933 doesn't fix the problem for me.

DETAILS:

Per the developer documentation, I first create an AVD to emulate the Clover Station (2018). (Incidentally, this problem also happens if I use Andoid 4.2.2 to emulate the old Clover station.) My device is configured using the clover station specs. I'd include a screenshot of all the settings but I'm only allowed 2 images and not willing to stitch them together. =/


I start up the emulator, open chrome and browse to https://sandbox.dev.clover.com/developers/dev-apk... and download the engine (version 1933) and updater (version 1131). I install them.

Then I go to Settings > Add Account, choose Clover and log in using my sandbox developer account (Owner type).

The login is successful and I am shown a list of test merchant accounts. I select one.


If I select a merchant account, I get "logging in ..." and then the window disappears and nothing seems to happen. There are lots of exciting logcat messages, which I'm reluctant to post here because they contain account identifiers. But it appears that we aren't getting authenticated like we need:

06-15 22:17:14.399  5099  5141 I MerchantFactory: createMerchant(MerchantFactory.java:213): create merchant, unable to obtain merchant properties from clover settings, getting from server
06-15 22:17:14.401  5099  5141 W Analytics: unable to queue analytics: no account
06-15 22:17:14.401  5099  5141 E JsonHttpClient: isOkHttpFeatureFlagEnabled(JsonHttpClient.java:547): Fetching feature flag USE_OKHTTP failed
06-15 22:17:14.401  5099  5141 E JsonHttpClient: java.lang.IllegalArgumentException: must provide 'account_name' and 'account_type' query params
06-15 22:17:14.401  5099  5141 E JsonHttpClient: 	at com.clover.content.Provider.getActiveAccount(Provider.java:141)

... <stack trace, followed by lots of requests that get 401s> ...

06-15 22:17:16.845  5099  5378 I DeviceHttpClient: EngineApplication << HTTP/1.1 401 Unauthorized

I can provide more logcat content if needed.
Emulator
10 |2000

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

1 Answer

chanel avatar image
chanel Deactivated answered thedangler commented
First, thank you so much, for the level of information you have provided! This makes your issue much easier and faster to investigate.

You're seeing this issue because you are not "approved" to directly interact with your test merchant's information, despite having an account at the Developer account level. We're aware of this issue (along with the confusion that comes with it) and we're looking into it.

The current solution is to have your account owner, go into each test merchant and add you as an employee with the appropriate permissions (with the same email that you use to log in). Once this is done, you will be able to add devices and view test merchants with no problem.

Please let me know if you have any more questions!
4 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.

litpro avatar image litpro commented ·

Hi, Chanel, thank you for your response! I am actually using the owner account, and there is already an employee associated with that account. When I look at permissions, though, I don't see any "owner" role, just "admin, Employee and Manager". Do I need to have this set up differently?

0 Likes 0 ·
litpro avatar image litpro commented ·

Hi, Chanel, just bumping this issue. Any progress here? Any info you can give me about the nature of the problem so I might be able to work around it?

0 Likes 0 ·
litpro avatar image litpro commented ·

Hi, @Chanel, just checking to see if you received my logcat regarding this issue.

0 Likes 0 ·
thedangler avatar image thedangler commented ·

Hi, I'm in the same boat.
this is the error when the sales app tries to install when the updater app is running.
Failure [INSTALL_FAILED_DUPLICATE_PERMISSION perm=com.clover.permission.RECEIVE_CARD_INSERTED pkg=com.clover.engine]

I'm also having some issues with the orders app not being linked to my test merchant account and it crashes. (using kitkat)

All the other apps seems to work fine ie, all the test cash transactions ive done show in the developer center in the sandbox.

0 Likes 0 ·

Welcome to the
Clover Developer Community