Open tomtomau opened 3 years ago
@tomtomau Thanks for bringing this up. I did a change to sort out the default config file a little while ago. Let me double check that and see if it resolved this issue by happen stance. We'll see. I'll look at it and get back to you.
I ran goaws as the compiled binary without passing in any config file.
When I received a message using the aws-sdk for node.js i got a cryptic XML parsing error which I traced back to the XML that goaws was returning was missing a
<Value>
forSenderId
:I was super confused because when I used the AWS cli to interact with goaws per the examples at the bottom of the goaws README, the aws-cli would return a value for SenderId!:
A keen eye would notice that SenderId has the same value as ApproximateFirstReceiveTimestamp, so I assume that is a quirk of the XML => JSON process in the aws-cli.
Digging through the code, it appears as if there is an attempt to cover for this and set the AccountId to
"queue"
when not present in config.go. However, I think if you're not passing in any yaml file then this would not happen.Once I created a config file that defined the account id, everything worked as expected:
Looking through other issues, I suspect this issue was caused by the same setup as well - as the slightly cryptic XML parsing error look equivalent.
I recommend either making the
-config
flag mandatory or properly setting the AccountId when the config file is not set