noflo / noflo-ui

NoFlo Development Environment
https://app.flowhub.io
MIT License
768 stars 173 forks source link

Old graph:error messages reappears on successful commands #869

Open jonnor opened 6 years ago

jonnor commented 6 years ago

Cause an FBP protocol error to happen. In this case through an unparseable data as an IIP

FBP MICROFLO RECV: { protocol: 'graph',
  command: 'removeinitial',
  payload: 
   { src: { data: '440' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main',
     secret: '' } }
FBP MICROFLO SEND: { protocol: 'graph',
  command: 'removeinitial',
  payload: 
   { src: { data: '440' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main' } }
FBP MICROFLO RECV: { protocol: 'graph',
  command: 'addinitial',
  payload: 
   { src: { data: '!' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main',
     secret: '' } }
FBP MICROFLO SEND: { protocol: 'graph',
  command: 'error',
  payload: 
   { message: 'Unknown IIP data type for literal \'!\' :SyntaxError: Unexpected token ! in JSON at position 0' } }

This gives the error to user, which is good.

However, when doing other graph actions later that should succeed, the error appears again. Like changing the invalid value to a valid 1 and then a 2.

FBP MICROFLO RECV: { protocol: 'graph',
  command: 'removeinitial',
  payload: 
   { src: { data: '!' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main',
     secret: '' } }
FBP MICROFLO SEND: { protocol: 'graph',
  command: 'removeinitial',
  payload: 
   { src: { data: '!' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main' } }
FBP MICROFLO RECV: { protocol: 'graph',
  command: 'addinitial',
  payload: 
   { src: { data: '1' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main',
     secret: '' } }
queuing buf <Buffer 0d 02 00 07 01 00 00 00> 0 8 false
FBP MICROFLO SEND: { protocol: 'graph',
  command: 'addinitial',
  payload: 
   { src: { data: '1' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main' } }
MICROFLO SEND: 40 <Buffer 0d 02 00 07 01 00 00 00> null undefined false
MICROFLO RECV: 8 <Buffer 72 02 00 07 00 00 00 00>
FBP MICROFLO SEND: { protocol: 'runtime',
  command: 'packetsent',
  payload: 
   { port: 'sssss',
     event: 'data',
     type: 'any',
     graph: 'main',
     payload: {} } }

FBP MICROFLO RECV: { protocol: 'graph',
  command: 'removeinitial',
  payload: 
   { src: { data: '1' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main',
     secret: '' } }
FBP MICROFLO SEND: { protocol: 'graph',
  command: 'removeinitial',
  payload: 
   { src: { data: '1' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main' } }
FBP MICROFLO RECV: { protocol: 'graph',
  command: 'addinitial',
  payload: 
   { src: { data: '2' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main',
     secret: '' } }
queuing buf <Buffer 0d 02 00 07 02 00 00 00> 0 8 false
FBP MICROFLO SEND: { protocol: 'graph',
  command: 'addinitial',
  payload: 
   { src: { data: '2' },
     tgt: { node: 'Timer_jrwr3', port: 'interval' },
     graph: 'main' } }
MICROFLO SEND: 40 <Buffer 0d 02 00 07 02 00 00 00> null undefined false
MICROFLO RECV: 8 <Buffer 72 02 00 07 00 00 00 00>
FBP MICROFLO SEND: { protocol: 'runtime',
  command: 'packetsent',
  payload: 
   { port: 'sssss',
     event: 'data',
     type: 'any',
     graph: 'main',
     payload: {} } }
jonnor commented 6 years ago

Note, to reproduce as described need MicroFlo with https://github.com/microflo/microflo/pull/181