zowe / zlux

The top-level superproject for zLUX. zLUX includes the Zowe Desktop framework in addition to several built-in apps and an example server implementation.
Eclipse Public License 2.0
39 stars 42 forks source link

TN3270 X PROG 753 #1020

Open Martin-Zeithaml opened 5 months ago

Martin-Zeithaml commented 5 months ago

Entering this screen will cause:

image

Dev console:

logger.ts:322 2024-06-28 12:34:56.789
<ZWED:> charles WARN (org.zowe.terminal.core.protocol,:) Unexpected invaild attribute type=0x7f

Bonus: And the word invaild is realy invalid.

1000TurquoisePogs commented 5 months ago

If you can turn on more logging in the browser to see the protocol & network bytes, we can narrow down where this goes wrong. https://github.com/zowe/tn3270-ng2/wiki/Loggers#developingdebugging

Martin-Zeithaml commented 5 months ago

1) QWS3270 works fine - below the "ca logo" there are fields like USER/PASSWORD/COMMAND (partially visible in buffer). 2) The buffers seems to be the same as from TN3270 and QWS3270:

QWS buffer

+40404040 40404011 d2f24040 40404040 -        K2      
+40404040 40404040 40404040 40404040 -                 
+2842f140 40404083 83838383 83838383 - ˆâ1    ccccccccc
+83838383 402842f4 81818181 81818181 - cccc ˆâ4aaaaaaaa
+81818140 81818181 81404040 40404040 - aaa aaaaa       
+40404040 40404040 11d4c240 40404040 -         MB     
+40404040 40404040 40404040 40404040 -                 
+402842f1 40404040 40408383 83838383 -  ˆâ1      cccccc
+83838340 40404040 2842f481 81818181 - ccc     ˆâ4aaaaa
-81818140 40408181 81818128 427f4040 - aaa   aaaaaˆâ"
+40404040 40404040 4011d550 1df8c689 -          N&8Fi
+93934089 9540a896 a49940e4 e2c5d9c9 - ll in your USERI
+c4408195 8440d7c1 e2e2e6d6 d9c44081 - D and PASSWORD a
+95844097 9985a2a2 40c5d5e3 c5d91d70 - nd press ENTERř

TN3270 log

logger.ts:324 2024-06-28 14:35:50.866 <ZWED:> DEBUG (org.zowe.terminal.core.protocol,:) Set char attributes for positions=1324-1339 to <CharAttrs3270 std=0x0 color=0xf4 bgCol=0x0>
logger.ts:324 2024-06-28 14:35:50.866 <ZWED:> DEBUG (org.zowe.terminal.core.protocol,:) -- Order= {key: 40, 0x42: 127}
logger.ts:324 2024-06-28 14:35:50.866 <ZWED:> DEBUG (org.zowe.terminal.core.protocol,:) ---- Order buffer pos=1340
logger.ts:322 2024-06-28 14:35:50.866 <ZWED:> WARN (org.zowe.terminal.core.protocol,:) Unexpected invaild attribute type=0x7f

427f4040:

1000TurquoisePogs commented 5 months ago

Yup - I agree with the area of the code you found being the cause of the message. Thanks for the output. Now we need to check with the spec - what should happen?

https://archive.org/details/bitsavers_ibm3270GA2amProgrammersReference199206_26297005 may help. It says 0x7f is in the "other" color range, and handling of it should be to follow the rules of Query Reply (Color). Query reply happens early in the connection. Do you see that in the log?

It could be the server is sending something out of spec, or the doc I'm looking at is too old. Perhaps we can cross reference x3270 since it's also open source.

1000TurquoisePogs commented 4 months ago

It looks like x3270 is doing the same

image image

So.... I'm guessing 0x7f is actually just invalid, and the difference is our terminal does annoying things when an invalid byte is encountered.

1000TurquoisePogs commented 4 months ago

I guess this alert should be removed: https://github.com/TSTerminal/TSTerm/blob/2dff6deaf4789c237909f6687289385855b17f62/src/Model3270.ts#L3410 Seems like dev code left in that will annoy users.

Martin-Zeithaml commented 4 months ago

https://github.com/TSTerminal/TSTerm/pull/43

1000TurquoisePogs commented 4 months ago

TSTerm still is not used by the terminal, so I created another PR but I can't test. Can you? Its hard to edit that code so I don't know if I got the right alert()