{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-uamqp-c/issues/269","repository_url":"https://api.github.com/repos/Azure/azure-uamqp-c","labels_url":"https://api.github.com/repos/Azure/azure-uamqp-c/issues/269/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-uamqp-c/issues/269/comments","events_url":"https://api.github.com/repos/Azure/azure-uamqp-c/issues/269/events","html_url":"https://github.com/Azure/azure-uamqp-c/issues/269","id":372730657,"node_id":"MDU6SXNzdWUzNzI3MzA2NTc=","number":269,"title":"Array encoding difficulties","user":{"login":"annatisch","id":8689453,"node_id":"MDQ6VXNlcjg2ODk0NTM=","avatar_url":"https://avatars2.githubusercontent.com/u/8689453?v=4","gravatar_id":"","url":"https://api.github.com/users/annatisch","html_url":"https://github.com/annatisch","followers_url":"https://api.github.com/users/annatisch/followers","following_url":"https://api.github.com/users/annatisch/following{/other_user}","gists_url":"https://api.github.com/users/annatisch/gists{/gist_id}","starred_url":"https://api.github.com/users/annatisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annatisch/subscriptions","organizations_url":"https://api.github.com/users/annatisch/orgs","repos_url":"https://api.github.com/users/annatisch/repos","events_url":"https://api.github.com/users/annatisch/events{/privacy}","received_events_url":"https://api.github.com/users/annatisch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-22T22:45:26Z","updated_at":"2018-10-24T16:29:21Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Hi @dcristoloveanu - I'm at a bit of a loss and hoping you can help me out here.\r\n\r\nSo I'm looking at implementing two commands for service bus - both of which deal in arrays.\r\n\r\nThe first - [Schedule messages](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-request-response#schedule-message) and [cancel scheduled messages](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-request-response#cancel-scheduled-message).\r\n\r\nThe data flow, in short, is that the response body for the schedule operation will be an AMQP Array of Longs. This is then fed directly into the cancel operation.\r\n\r\nHowever, when I send an Array containing a single long to the service - the service seems to decode it as a different value than that which I sent:\r\n```\r\nAMQP array of sequence numbers to cancel: [69805794325242792]\r\nError from service: Messages not found. Missing sequence numbers: 101000104\r\n\r\nArray as encoded by Service Bus: e00a018100f80000060523a8\r\nArray as encoded by client: e00a018100f80000060523a8\r\n```\r\n\r\nIf I try the operation using two or more values in the array I get a decode error:\r\n```\r\nAMQP array of sequence numbers to cancel: [40250921740623951, 36028797089964112]\r\nError from service: The format code '0x50' at frame buffer offset '179' is invalid or unexpected\r\n\r\nArray as encoded by Service Bus: e0130281008f0000043b604f8100800000043b6050\r\nArray as encoded by client: e0130281008f0000043b604f8100800000043b6050\r\n```\r\n\r\n\r\nThe second operation is [renew message lock](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-request-response#message-renew-lock).\r\n\r\nThe data flow in this case is one-way, sending an Array of UUIDs.\r\nWeidly, if I attempt to renew a single lock token, it works:\r\n```\r\nAMQP array of UUID: [ebe26a2f-7c6a-4987-9943-fa04da810029]\r\nResponse from the service: {'expirations': [1540248072441]}\r\n\r\nArray as encoded by client: e0120198ebe26a2f7c6a49879943fa04da810029\r\n```\r\n\r\nBut if I attempt to renew 2 or more values in the array, again the decode error:\r\n```\r\nAMQP array of UUID: [4e8c1d72-5b09-4a65-a57c-554edc7a0029, 46fca782-d8cc-439c-a7e9-7d3d0b0d0037]\r\nError from the service: The format code '0x37' at frame buffer offset '175' is invalid or unexpected\r\n\r\nArray as encoded by client: e02302984e8c1d725b094a65a57c554edc7a00299846fca782d8cc439ca7e97d3d0b0d0037\r\n```\r\n\r\nI feel that this must be related Array encoding somehow - but the actual byte comparison looks okay. Are there any other areas you can think of that might result in this behaviour? For example the message encoded size calculation?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/azure-uamqp-c/issues/comments/432730119","html_url":"https://github.com/Azure/azure-uamqp-c/issues/269#issuecomment-432730119","issue_url":"https://api.github.com/repos/Azure/azure-uamqp-c/issues/269","id":432730119,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjczMDExOQ==","user":{"login":"annatisch","id":8689453,"node_id":"MDQ6VXNlcjg2ODk0NTM=","avatar_url":"https://avatars2.githubusercontent.com/u/8689453?v=4","gravatar_id":"","url":"https://api.github.com/users/annatisch","html_url":"https://github.com/annatisch","followers_url":"https://api.github.com/users/annatisch/followers","following_url":"https://api.github.com/users/annatisch/following{/other_user}","gists_url":"https://api.github.com/users/annatisch/gists{/gist_id}","starred_url":"https://api.github.com/users/annatisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annatisch/subscriptions","organizations_url":"https://api.github.com/users/annatisch/orgs","repos_url":"https://api.github.com/users/annatisch/repos","events_url":"https://api.github.com/users/annatisch/events{/privacy}","received_events_url":"https://api.github.com/users/annatisch/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T16:29:21Z","updated_at":"2018-10-24T16:29:21Z","author_association":"CONTRIBUTOR","body":"Hi @dcristoloveanu - any thoughts on how I could further debug this?\r\nI've tried comparing each incoming byte of a decoded array to the encoded bytes I'm sending out and can't see anything incriminating....\r\n\r\nAny pointers you could give me would be appreciated :)"}}
{"actor":{"display_login":"annatisch"}}