Closed kazuhitoyokoi closed 4 years ago
Also have this on my instance.
Appears to fail to load all model types -
[error] [posenet:3a103bd8.2c7214] TypeError: response.arrayBuffer is not a function
This might be related to multiple node modules trying their own method to load tensorflow - if you have more than one module trying its own method to load it might be conflicting.
This module appears to load its own tensorflow where other modules such as node-red-contrib-post-object-detection are loading @tensorflow/tfjs-node
I think this might have been why mine was erroring out - though I have not tested this as I am trying to get the GPU accelerated version of @tensorflow/tfjs-node .
@Aterfax Thank you for your information. Do I need to just add information about the conflict to the README.md document?
I think that would be a great idea - just a reminder for people in case they are testing out different modules that there can be conflicts in terms of the backend method of loading tensorflow between different modules.
This is mentioned in the node-red-contrib-post-object-detection module :
Putting TensorFlow.js as the dependency of a custom Node-RED node may cause the situation where multiple custom nodes each install their own tfjs-node module as a dependency. This causes an attempt at loading multiple TensorFlow shared libraries in the same process, which subsequently causes the process to abort with a protobuf assertion error.
This said, it might be an idea that these modules for nodered load tensorflow in the same way with the user manually installing their chosen @tensorflow/tfjs-node or @tensorflow/tfjs-node-gpu that way they are aware of the choice in hardware acceleration but also to avoid this issue.
To add to this conversation: I was getting the same issues, after upgrading the node in place. Here is how I fixed my issue (YMMV):
I try to use but it shows the error as below. Please help. Thank you.
When trying to use cocossd node you get the following error
TypeError: response.arrayBuffer is not a function
When you deploy after adding the node to the flow you get the following
7 Jul 09:19:38 - [error] [cocossd:4652ace5.1a4934] TypeError: response.arrayBuffer is not a function 7 Jul 09:19:38 - [error] [cocossd:4652ace5.1a4934] TypeError: response.arrayBuffer is not a function (node:16) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'detect' of undefined at /data/node_modules/node-red-contrib-tensorflow/tensorflow.js:49:34 at process._tickCallback (internal/process/next_tick.js:68:7) (node:16) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
HTH
Originally posted by @ozmule in https://github.com/kazuhitoyokoi/node-red-contrib-tensorflow/issues/2#issuecomment-654509799