Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on CSR response handling #47

Open
dima91 opened this issue Jun 10, 2021 · 0 comments
Open

Error on CSR response handling #47

dima91 opened this issue Jun 10, 2021 · 0 comments

Comments

@dima91
Copy link

dima91 commented Jun 10, 2021

I encountered a problem performing a request to a remote CSE from a local platform.
After having registered correctly the remote platform via MCC interface, I performed a discovery request to such platform.
Target platform receives and handle well the request but, when the response arrives to the local platform, it crashes with this error:

mobius_1      | /home/node/Mobius/app.js:2598
mobius_1      |                                 var res = JSON.parse(JSON.stringify(_res));
mobius_1      |                                                           ^
mobius_1      | 
mobius_1      | TypeError: Converting circular structure to JSON
mobius_1      |     --> starting at object with constructor 'Socket'
mobius_1      |     |     property '_httpMessage' -> object with constructor 'ClientRequest'
mobius_1      |     --- property 'socket' closes the circle
mobius_1      |     at JSON.stringify (<anonymous>)
mobius_1      |     at /home/node/Mobius/app.js:2598:59
mobius_1      |     at IncomingMessage.<anonymous> (/home/node/Mobius/app.js:2725:13)
mobius_1      |     at IncomingMessage.emit (events.js:326:22)
mobius_1      |     at endReadableNT (_stream_readable.js:1252:12)
mobius_1      |     at processTicksAndRejections (internal/process/task_queues.js:80:21)
db_1          | 2021-06-10T07:56:13.296323Z 4 [Note] Aborted connection 4 to db: 'mobiusdb' user: 'root' host: '127.0.0.1' (Got an error reading communication packets)

By changing this line of app.js from

var res = JSON.parse(JSON.stringify(_res));

to

var res = _res;

the problem disappear.
Could you please patch this problem? I have not enough rights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant