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

response.body.on is not a function #3666

Open
calr0x opened this issue Jan 1, 2025 · 7 comments
Open

response.body.on is not a function #3666

calr0x opened this issue Jan 1, 2025 · 7 comments

Comments

@calr0x
Copy link
Contributor

calr0x commented Jan 1, 2025

The following issue is occurring on FACEMELT but not LOAFCAT:

Thanks all!

Issue description

[2025-01-01 18:48:28] ERROR: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Command error (StoreAssertionError): response.body.on is not a function
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Marking operation id 6685857e-46d6-42bb-93ff-82eaf633f48b as failed
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Removing operation id: 6685857e-46d6-42bb-93ff-82eaf633f48b cached data
[2025-01-01 18:48:28] TRACE: [readCachedPublishDataCommand] (Command ID: 00135465-07bd-4c39-9dca-2f0929fb013d) Removing file at path: /root/ot-node/data/operation_id_cache/6685857e-46d6-42bb-93ff-82eaf633f48b
[2025-01-01 18:48:28] ERROR: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Command error (StoreAssertionError): response.body.on is not a function
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Marking operation id 990e0eec-8c14-4f88-bf01-37bafed7a5ce as failed
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Removing operation id: 990e0eec-8c14-4f88-bf01-37bafed7a5ce cached data
[2025-01-01 18:48:28] TRACE: [readCachedPublishDataCommand] (Command ID: 00135465-07bd-4c39-9dca-2f0929fb013d) Removing file at path: /root/ot-node/data/operation_id_cache/990e0eec-8c14-4f88-bf01-37bafed7a5ce
[2025-01-01 18:48:28] DEBUG: [readCachedPublishDataCommand] (Command ID: 00135465-07bd-4c39-9dca-2f0929fb013d) File not found at path: /root/ot-node/data/operation_id_cache/6685857e-46d6-42bb-93ff-82eaf633f48b
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Removing operation id: 6685857e-46d6-42bb-93ff-82eaf633f48b cached data from memory
[2025-01-01 18:48:28] DEBUG: [readCachedPublishDataCommand] (Command ID: 00135465-07bd-4c39-9dca-2f0929fb013d) File not found at path: /root/ot-node/data/operation_id_cache/990e0eec-8c14-4f88-bf01-37bafed7a5ce
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Removing operation id: 990e0eec-8c14-4f88-bf01-37bafed7a5ce cached data from memory
[2025-01-01 18:48:28] ERROR: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Command error (StoreAssertionError): response.body.on is not a function
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Marking operation id 4e25d3a1-2148-4759-b721-e5751f4feeae as failed
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Removing operation id: 4e25d3a1-2148-4759-b721-e5751f4feeae cached data
[2025-01-01 18:48:28] TRACE: [readCachedPublishDataCommand] (Command ID: 00135465-07bd-4c39-9dca-2f0929fb013d) Removing file at path: /root/ot-node/data/operation_id_cache/4e25d3a1-2148-4759-b721-e5751f4feeae
[2025-01-01 18:48:28] DEBUG: [readCachedPublishDataCommand] (Command ID: 00135465-07bd-4c39-9dca-2f0929fb013d) File not found at path: /root/ot-node/data/operation_id_cache/4e25d3a1-2148-4759-b721-e5751f4feeae
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Removing operation id: 4e25d3a1-2148-4759-b721-e5751f4feeae cached data from memory
[2025-01-01 18:48:28] ERROR: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Command error (StoreAssertionError): response.body.on is not a function
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Marking operation id 10f156f0-3b72-48d7-a58b-16842666d839 as failed
[2025-01-01 18:48:28] DEBUG: {Operation ID: 10f156f0-3b72-48d7-a58b-16842666d839} [storeAssertionCommand] (Command ID: 8fb0eb37-22a1-4585-83bd-a4889229e167) Removing operation id: 10f156f0-3b72-48d7-a58b-16842666d839 cached data
Error

Expected behavior

Actual behavior

Steps to reproduce the problem

  1. Run node.
  2. Observe error.

Specifications

  • Node version: v8.4
  • Platform: Ubuntu 22.04.5 LTS
  • Node wallet:
  • Node libp2p identity:

Contact details

  • Email:

Error logs

Disclaimer

Please be aware that the issue reported on a public repository allows everyone to see your node logs, node details, and contact details. If you have any sensitive information, feel free to share it by sending an email to [email protected].

@alien2108
Copy link

I have same issue now on 8.0.1 fix 5 I think after node upgrade to 20?

2025-01-28 09:55:29] USERLVL: {Operation ID: 2ffc18c3-b782-4582-bc6a-d6c9236a9004} [storeAssertionCommand] (Command ID: 6418bf7e-fffd-4c77-a195-8441984f66eb) level-change
[2025-01-28 09:55:29] INFO: {Operation ID: 2ffc18c3-b782-4582-bc6a-d6c9236a9004} [storeAssertionCommand] (Command ID: 6418bf7e-fffd-4c77-a195-8441984f66eb) Inserting Knowledge Collection with the UAL: did:dkg:base:8453/0xc28f310
a87f7621a087a603e2ce41c22523f11d7/32734 to the Triple Store's dkg repository.
[2025-01-28 09:55:29] ERROR: {Operation ID: 2ffc18c3-b782-4582-bc6a-d6c9236a9004} [storeAssertionCommand] (Command ID: 6418bf7e-fffd-4c77-a195-8441984f66eb) Command error (StoreAssertionError): response.body.on is not a function
[2025-01-28 09:55:29] DEBUG: {Operation ID: 2ffc18c3-b782-4582-bc6a-d6c9236a9004} [storeAssertionCommand] (Command ID: 6418bf7e-fffd-4c77-a195-8441984f66eb) Marking operation id d8c97e5f-f0d2-4826-9b00-2c43e0e2fda9 as failed
[2025-01-28 09:55:29] DEBUG: {Operation ID: 2ffc18c3-b782-4582-bc6a-d6c9236a9004} [storeAssertionCommand] (Command ID: 6418bf7e-fffd-4c77-a195-8441984f66eb) Removing operation id: d8c97e5f-f0d2-4826-9b00-2c43e0e2fda9 cached data
[2025-01-28 09:55:29] TRACE: [readCachedPublishDataCommand] (Command ID: 33a64df5-e828-4903-8b84-abd21e366604) Removing file at path: /root/ot-node/data/operation_id_cache/d8c97e5f-f0d2-4826-9b00-2c43e0e2fda9

@kaas
Copy link

kaas commented Feb 10, 2025

I have the same issue. Not sure why (I run NodeJS 20.18.2 on Ubuntu Noble?), but it seems to originate in:

node_modules/@comunica/actor-http-fetch/lib/ActorHttpFetch.js

and you can 'fix' it there through something like:

if (typeof response.body?.on === "function") {
  response.body.on('close', () => { clearTimeout(requestTimeout); });
} else {
  clearTimeout(requestTimeout);
}

However, why is ot-node using a two year old version of @comunica/query-sparql?

Incidentally, it may look harmless, but it's not. While you have this error, no knowledge assets are being inserted in to the local Blazegraph database.

@alien2108
Copy link

Did you try the above code change kaas? Comunica is on v4 it seems, yet we get installed version v2 with ot-node

@kaas
Copy link

kaas commented Feb 11, 2025

Yes, the above code will lead to knowledge assets being inserted in to the database again. I am not sure about any side effects though.

@alien2108
Copy link

You patched this part of code?

        if (response.body && !response.body.cancel) {
            response.body.cancel = async (error) => {
                response.body.destroy(error);
                if (requestTimeout !== undefined) {
                    // We make sure to remove the timeout if it is still enabled
                    clearTimeout(requestTimeout);
                }
            };
        }

@kaas
Copy link

kaas commented Feb 11, 2025

You need to replace this code on lines 129 - 131:

response.body.on('close', () => {
  clearTimeout(requestTimeout);
});

@kaas
Copy link

kaas commented Feb 15, 2025

It seems to have been fixed with an upgrade of @comunica/query-sparql in ot-node 8.0.0+hotfix.7.

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

3 participants