EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
991 stars 155 forks source link

Inara plugin: Incorrect format of opponentName parameter or it is completely missing. #1732

Closed chennin closed 1 year ago

chennin commented 1 year ago

Please check the Known Issues in case this has already been reported.

Please also check if the issue is covered in our Troubleshooting Guide. It might be something with a known work around, or where a third party (such as EDSM) is causing logging that is harmless.

Please complete the following information:

Describe the bug

Interdiction by a Thargoid throws a WARNING

2022-11-30 18:15:48.310 UTC - WARNING - 13876:27056:27056 plugins.inara.send_data:1638: Inara   200 Incorrect format of opponentName parameter or it is completely missing.
2022-11-30 18:15:48.310 UTC - DEBUG - 13876:27056:27056 plugins.inara.send_data:1639: JSON data:
{"eventName": "addCommanderCombatInterdicted", "eventTimestamp": "2022-11-30T18:15:26Z", "eventData": {"starsystemName": "Matshiru", "isPlayer": false, "isSubmit": true, "opponentName": ""}}

Corresponding journal entry:

{ "timestamp":"2022-11-30T18:15:26Z", "event":"Interdicted", "Submitted":true, "IsPlayer":false, "Faction":"" }

Journal.2022-11-30T111811.01.log

Ultimately sounds like a game journal bug to me, but you might want to handle that and silence the warning?

Athanasius commented 1 year ago

Technically I think we're in compliance with the Inara API documentation for this.

So, over to @clonedArtie to comment as to if he wants to update the documentation to "only send non-empty strings", and just not send the event at all if we can't get a value for opponentName, or if he wants to start accepting that.

Athanasius commented 1 year ago

Artie has informed me that for required properties in Inara API messages "" should be treated as "not set"/"not available" and probably mean just not sending the message.

So I'll adjust EDMC code, for the 5.6.1 bugfix release coming soon, to add a check for that.

Athanasius commented 1 year ago

@chennin I've not played to know. Was that caused by an "in supercruise, not jumping" Thargoid interdiction? If so, was it an inevitable interdiction, or do you know for sure these can be escaped (i.e. win the mini-game) ?

Specifically I'm wondering if there can be an EscapeInterdiction journal event without an Interdiction property, or where it is an empty string.

chennin commented 1 year ago

It's supercruise, yes. The interdiction is very hard and I have not seen anyone win it yet, but I do not know if it is impossible.

Athanasius commented 1 year ago

OK, thanks for the info. I've implemented a paranoia check for that anyway.