question

geomichel avatar image
geomichel asked hmoralesluis published

remote-pay-cloud-nodejs-example

remote-pay-cloud-nodejs-example example throwing

error An unexpected websocket error has occurred.

Trace

at Logger.toConsole (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\remote\client\util\Logger.js:46:29)

at Logger.emit (events.js:376:20)

at CloverWebSocketClient.onUnexpectedError (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\remote\client\transport\websocket\CloverWebSocketClient.js:88:21)

at C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\websocket\CloverWebSocketInterface.js:78:30

at Array.forEach (<anonymous>)

at CloverWebSocketInterface.notifyOnError (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\websocket\CloverWebSocketInterface.js:70:24)

at WebSocket.<anonymous> (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\websocket\CloverWebSocketInterface.js:35:86)

at WebSocket.onError (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\ws\lib\event-target.js:128:16)

at WebSocket.emit (events.js:376:20)

at abortHandshake (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\ws\lib\websocket.js:718:15)

> Device Disconnected!

error An unexpected websocket error has occurred.

Trace

at Logger.toConsole (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\remote\client\util\Logger.js:46:29)

at Logger.emit (events.js:376:20)

at CloverWebSocketClient.onUnexpectedError (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\remote\client\transport\websocket\CloverWebSocketClient.js:88:21)

at C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\websocket\CloverWebSocketInterface.js:78:30

at Array.forEach (<anonymous>)

at CloverWebSocketInterface.notifyOnError (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\websocket\CloverWebSocketInterface.js:70:24)

at WebSocket.<anonymous> (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\remote-pay-cloud\dist\com\clover\websocket\CloverWebSocketInterface.js:35:86)

at WebSocket.onError (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\ws\lib\event-target.js:128:16)

at WebSocket.emit (events.js:376:20)

at abortHandshake (C:\LocalRep\RemoteCloudpay\remote-pay-cloud-nodejs-example\node_modules\ws\lib\websocket.js:718:15)

> Device Disconnected!


How to solve?

Remote Pay Cloud
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered

Hard to say, what options are you selecting in the app?

10 |2000

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

geomichel avatar image
geomichel answered David Marginian Deactivated edited

Sale option


1 comment
10 |2000

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

David Marginian avatar image David Marginian ♦♦ commented ·

We don't have enough context to help you. You will need to provide the complete list of options that you are passing (your answer to each prompt) and the state of the Clover device. Do you have SNPD running, etc.

0 Likes 0 ·
geomichel avatar image
geomichel answered


Here is the option I have chosen

Enter your Remote Application Id: Application Id

? Which web socket library would you like to use? ws (https://www.npmjs.com/package/ws) or nodejs-websocket (https://www.npmjs.com/package/nodejs-websocket)? ws

? Which connector would you like to use? Cloud

? Enter the location of your clover server: https://sandbox.dev.clover.com/

? Enter your merchant id (e.g. 59RECDKBW11G6):merchant id

? Enter your device id, with or without hyphens (e.g. c368b68c4175f5971af6d0359054d109): device id

? Enter your access token: accesstoken

? Enter your friendly id (an identifier for the specific POS connected to this device): Register_1

? What action would you like to take? 1. Sale

10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

I assume you are not actually entering "device id", "merchant id" and "accesstoken", correct? Because "merchant id" isn't a valid Clover merchant id. Please do not share your accesstoken on this forum.

10 |2000

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

geomichel avatar image
geomichel answered David Marginian Deactivated commented

I didn't share any access token ,merchant id, device id with this .But I am giving correct information. It was connected first few times.one time I discard the payment from clover payment device. After that I am getting this message

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

David Marginian avatar image David Marginian ♦♦ commented ·

I would try 4-finger existing from Cloud Pay Display (toucher upper left, upper right, lower right, lower left) to close it and see if that helps. If it doesn't you will need to provide the information you are using to connect ("merchant id" is not a valid Clover merchant id, do not provide the access token) and the steps you have taken to reproduce the issue if you would like assistance.

0 Likes 0 ·
geomichel avatar image geomichel David Marginian ♦♦ commented ·
I have restarted the clover device already. Can I send these details to clover support team email?Can you provide any email to send these details?


0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ geomichel commented ·
You can post them here in a moderator's only comment (do not post access token though). Select "Vieable by all users" under the submit button.
0 Likes 0 ·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

Please pull the latest from the example repo and try again. The NodeJS example needed a minor change for the latest SDK.

10 |2000

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

geomichel avatar image
geomichel answered hmoralesluis published

Hello Thank you for answering my questions but I actually managed to solve this issue.

Thank you for the help.

1 comment
10 |2000

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

hmoralesluis avatar image hmoralesluis commented ·
Hi, any clue, Im facing the same issue
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community