Open
Description
Hi. I am trying to use Py3AMF to communicate with an AMF gateway, and I'm getting a bunch of errors in the process, due to poor understanding of the gateway on the remote end (completely because of me). However, I am unable to use pyamf.remoting.decode()
to parse the resulting error messages from the server, despite them being valid AMF. I get the following error:
AttributeError: Static attributes {'destination', 'headers', 'rootCause', 'timeToLive', 'timestamp', 'extendedData', 'clientId', 'body', 'messageId'} expected when decoding <class 'pyamf.flex.messaging.ErrorMessage'>
Below is the full hex dump of one such responses that the library refuses to parse, with some data redacted with '#':
00 00 00 01 00 12 41 70 70 65 6E 64 54 6F 47 61 74 65 77 61 79 55 72 6C 00 00 00 00 28 02 00 25 3F 50 48 50 53 45 53 53 49 44 3D 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 5D 00 01 00 0B 2F 31 2F 6F 6E 53 74 61 74 75 73 00 04 6E 75 6C 6C 00 00 01 1F 11 0A 0B 49 66 6C 65 78 2E 6D 65 73 73 61 67 69 6E 67 2E 6D 65 73 73 61 67 65 73 2E 45 72 72 6F 72 4D 65 73 73 61 67 65 1B 63 6F 72 72 65 6C 61 74 69 6F 6E 49 64 01 13 66 61 75 6C 74 43 6F 64 65 06 29 41 4D 46 50 48 50 5F 52 55 4E 54 49 4D 45 5F 45 52 52 4F 52 17 66 61 75 6C 74 44 65 74 61 69 6C 06 81 7F 43 3A 5C 50 72 6F 67 72 61 6D 20 46 69 6C 65 73 20 28 78 38 36 29 5C 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 5C 61 6D 66 70 68 70 5C 73 65 72 76 69 63 65 73 5C 23 23 23 23 23 23 23 23 2E 70 68 70 20 6F 6E 20 6C 69 6E 65 20 33 30 32 17 66 61 75 6C 74 53 74 72 69 6E 67 06 57 4D 69 73 73 69 6E 67 20 61 72 67 75 6D 65 6E 74 20 31 20 66 6F 72 20 47 65 74 23 23 23 23 23 3A 3A 74 65 73 74 23 23 23 23 28 29 01
Am I doing it wrong, or is there something wrong with the module? How can I handle error messages gracefully? Right now I am catching AttributeError, but I'm missing out on the error message data.
Metadata
Metadata
Assignees
Labels
No labels