yamcs / yamcs-studio

Desktop TM/TC Client for Yamcs
https://docs.yamcs.org/yamcs-studio/
Eclipse Public License 2.0
27 stars 14 forks source link

Unable to set annotation from Yamcs-Studio (V1.3.3) #88

Closed oliverdlr closed 4 years ago

oliverdlr commented 4 years ago

When trying to set an annotation using Yamcs-Studio the following console output is generated:

Exception while executing job 'POST /api/archive/hp3/tags': Name is required

However, a capture with tcpdump shows that the name - along with other arguments - was specified. (See below: 'myName' )

0x0000:  4500 0118 0cdd 4000 8006 fb4b c0a8 3801  E.....@....K..8.
0x0010:  c0a8 3865 d8fb 1f9a 9ca0 3dfa 1d25 72a2  ..8e......=..%r.
0x0020:  5018 0100 85c7 0000 504f 5354 202f 6170  P.......POST./ap
0x0030:  692f 6172 6368 6976 652f 6870 332f 7461  i/archive/hp3/ta
0x0040:  6773 2048 5454 502f 312e 310d 0a68 6f73  gs.HTTP/1.1..hos
0x0050:  743a 2031 3932 2e31 3638 2e35 362e 3130  t:.192.168.56.10
0x0060:  310d 0a63 6f6e 6e65 6374 696f 6e3a 2063  1..connection:.c
0x0070:  6c6f 7365 0d0a 636f 6e74 656e 742d 7479  lose..content-ty
0x0080:  7065 3a20 6170 706c 6963 6174 696f 6e2f  pe:.application/
0x0090:  7072 6f74 6f62 7566 0d0a 6163 6365 7074  protobuf..accept
0x00a0:  3a20 6170 706c 6963 6174 696f 6e2f 7072  :.application/pr
0x00b0:  6f74 6f62 7566 0d0a 636f 6e74 656e 742d  otobuf..content-
0x00c0:  6c65 6e67 7468 3a20 3734 0d0a 0d0a 1206  length:.74......
0x00d0:  6d79 4e61 6d65 1a18 3230 3230 2d30 332d  myName..2020-03-
0x00e0:  3032 5430 303a 3030 3a30 302e 3030 305a  02T00:00:00.000Z
0x00f0:  2218 3230 3230 2d30 332d 3033 5430 303a  ".2020-03-03T00:
0x0100:  3030 3a30 302e 3030 305a 2a03 5442 4432  00:00.000Z*.TBD2
0x0110:  0723 6666 6338 3030                      .#ffc800

0x0000:  4500 00a6 ca73 4000 4006 7e27 c0a8 3865  E....s@.@.~'..8e
0x0010:  c0a8 3801 1f9a d8fb 1d25 72a2 9ca0 3eea  ..8......%r...>.
0x0020:  5018 00ed f24f 0000 4854 5450 2f31 2e31  P....O..HTTP/1.1
0x0030:  2034 3030 2042 6164 2052 6571 7565 7374  .400.Bad.Request
0x0040:  0d0a 636f 6e74 656e 742d 7479 7065 3a20  ..content-type:.
0x0050:  6170 706c 6963 6174 696f 6e2f 7072 6f74  application/prot
0x0060:  6f62 7566 0d0a 636f 6e74 656e 742d 6c65  obuf..content-le
0x0070:  6e67 7468 3a20 3432 0d0a 0d0a 0890 0312  ngth:.42........
0x0080:  1342 6164 5265 7175 6573 7445 7863 6570  .BadRequestExcep
0x0090:  7469 6f6e 1a10 4e61 6d65 2069 7320 7265  tion..Name.is.re
0x00a0:  7175 6972 6564                           quired

The server log contained the following lines:

16:18:23.529 _global [36] RouteHandler 199: Responding '400 Bad Request': Name is required 16:18:23.529 _global [36] HttpRequestHandler 377c3d9c POST /api/archive/hp3/tags 400

Yamcs-Studio: Windows V1.3.3 Yamcs: V4.10.8

During previous tests it already failed using Studio V1.3.2 and Server V4.10.5. (V1.3.3 would not connect to V4.10.5)

Is there anything else that needs to be configured in order to use annotations?

fqqb commented 4 years ago

Hi, thanks for the detailed report.

Due to an erroneous server-side refactoring a few releases back, the server is discarding the request body, hence this error message. I fixed it server-side in https://github.com/yamcs/yamcs/pull/387, together with other related fixups.

Meanwhile I noticed that when creating a new Tag/Annotation from Yamcs Studio, the tag does not become visible unless refreshing the view. A fix for this was pushed to master of this repo.

So both Yamcs and Yamcs Studio should support annotations properly again with their next releases.