question

mtt avatar image
mtt asked mtt commented

remote-pay-cloud unable to connect to device

I've been having some issues using the remote-pay-cloud JavaScript SDK

I'm unable to connect to my DevKit Mini. I've tried the examples provided in remote-pay-cloud, clover-cloud-connector-unit-examples, and clover-cloud-connector-example. I've also tried using the RC1, RC2, and BETA versions of the SDK. I've tried on the mini and genymotion emulator mini. Both the physical and emulated mini give me the same errors.

Getting the same thing from all of them.

Chrome console:

klass {cloverConnectorListeners: Array[0], configuration: Object, deviceSupportsAckMessages: false, debugConfiguration: Object, device: WebSocketDevice…}
debug Server responded with information on how to contact device. Opening communication channel...
debug contacting device
debug Contacting url - wss://apisandbox.dev.clover.com/support/remote_pay/cs?token=************&friendlyId=10SSB9D5FVS7G&forceConnect=true
debug this.deviceSocket = [object WebSocket]
debug deviceSocket.onopen
debug Event {isTrusted: true, type: "open", target: WebSocket, currentTarget: WebSocket, eventPhase: 2…}
debug sendMessage klass {id: "s0", type: "COMMAND", packageName: "com.clover.remote.protocol.websocket", method: "DISCOVERY_REQUEST", payload: "{"method":"DISCOVERY_REQUEST","version":0}"…}
remote.js:138175
debug Connection appears to be dead...no response in 10930 milliseconds
debug Connection appears to be dead...no response in 12500 milliseconds
debug Connection appears to be dead...no response in 12501 milliseconds
debug Connection appears to be dead...no response in 12499 milliseconds

Config:

var connector = new clover.CloverConnectorFactory().createICloverConnector({
    "merchantId": "**********",
    "clientId": "**********",
    "deviceSerialId": "**********",
    "allowOvertakeConnection": true,
    "domain": "https://sandbox.dev.clover.com/"
});

Seems to be stuck on the DISCOVERY_REQUEST/pings.

Any suggestions? Let me know if you need more info

10 |2000

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

james-cha avatar image
james-cha Deactivated answered mtt commented

Did you make sure you gave yourself all the permissions for the app that you are using for the clientId?

5 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.

mtt avatar image mtt commented ·

If you are referring to the app's "Clover Permission Set".. Yes, I checked all of the permissions.

0 Likes 0 ·
georgeono avatar image georgeono commented ·

After setting up the permissions, did you uninstall and reinstall the app for the merchant?

0 Likes 0 ·
mtt avatar image mtt commented ·

Yes I did.

0 Likes 0 ·
hammer avatar image hammer ♦ commented ·

I am seeing some odd information on the device C030UQ53150122 (UpdatePromise - Test 2). This is yours, correct?

0 Likes 0 ·
mtt avatar image mtt commented ·

Yes, that's mine. Can you please elaborate?

0 Likes 0 ·
hammer avatar image
hammer answered mtt commented

Your merchant appears to be missing the "Cloud Pay Display" application, which is required (and Free).

Please install this application from the app market and retry.

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.

mtt avatar image mtt commented ·

Yes!! That worked. Thank you.

Had to install from the developer dashboard, it was not available on the physical device.

0 Likes 0 ·
hammer avatar image hammer ♦ commented ·

Not available on the device? How odd. I will look into that. Glad this helped.

0 Likes 0 ·

Welcome to the
Clover Developer Community