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
988 stars 155 forks source link

"CodexEntry had emtpy string"-message in main window #1481

Closed poinck closed 2 years ago

poinck commented 2 years ago

Relevant logs:

2022-02-19 19:26:08.193 UTC - ERROR - 1566134:139987059709760:1566134 plug.notify_dashboard_entry:318: Plugin "Canonn" failed
Traceback (most recent call last):
  File "/home/user/gits/EDMarketConnector/plug.py", line 315, in notify_dashboard_entry
    newerror = status(cmdr, is_beta, dict(entry))
  File "/home/user/.local/share/EDMarketConnector/plugins/EDMC-Canonn/load.py", line 338, in dashboard_entry
    return dashboard_entry_wrapper(cmdr, is_beta, entry)
  File "/home/user/.local/share/EDMarketConnector/plugins/EDMC-Canonn/load.py", line 343, in dashboard_entry_wrapper
    this.codexcontrol.updatePlanetData(
  File "/home/user/.local/share/EDMarketConnector/plugins/EDMC-Canonn/canonn/codex.py", line 2804, in updatePlanetData
    if (not self.planetlist_show) or (self.planetlist_body != body.replace(self.system+" ", '')):
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Bug description: I am getting the message "CodexEntry had emtpy string. PLEASE CONTACT THE EDMC DEVELOPERS" on the main window (noticed after last game session), see screenshot. From the log file, the bug seems to come from the Cannon-plugin, but the message irritated me. I will contact them on discord, too.

Steps to reproduce the behavior:

  1. Have EMDC running for days
  2. Notice message in main window
  3. Experience no obvious other problems despite this message.

Expected behavior No message "CodexEntry had emtpy string. PLEASE CONTACT THE EDMC DEVELOPERS".

Screenshots: Screenshot from 2022-02-20 11-31-48

Additional context Steam and ED are running in a sandboxed environment and EDMC is accessing journals from outside. This has never been a problem.

A-UNDERSCORE-D commented 2 years ago

This is a game bug that we've been trying to track down for a few months -- please can you provide us with your EDMC logs and relevant journal files?

Athanasius commented 2 years ago

We need the relevant Journal file (that points to advice about running ED on a different machine, but contains the relevant information about where the Journal files are) in order to see if this is a game bug, or at least have the example Journal event to run through the code and see where our bug is.

Use the timestamp you have above to find the right one. Thanks.

poinck commented 2 years ago

The timestamp is leading me nowhere, because the error message repeats itself over the last game session. I have attached my complete journal of the same game session.

Journal.220219183208.01.log

For the next game session I will set EMDC logging to debug and look out if it happens again.

NoFoolLikeOne commented 2 years ago

So this is suggesting that system is null.

poinck commented 2 years ago

Here is a EDMC-debug log from today (it starts somewhere in the middle of today's session, had my terminal buffer set too low):

2022-02-20edmc-debug.log

And for completeness, after restart of EMDC without running the game, debug-log looks like that:

2022-02-20edmc_restart-debug.log

NoFoolLikeOne commented 2 years ago

Hmm this is very odd. System in CodexEntry is set. Can't see anything in the other events that might suggest that system is blank.

I wonder if anything could be setting it blank? Can a plugin change the contents of a variable it is passed in through journal_entry?

norohind commented 2 years ago

It seems the problem is NearestDestination in CodexEntry event is empty string. I think EDMC just should allow this field to be empty string when sends over EDDN or just remove this field before send.

Athanasius commented 2 years ago

It seems the problem is NearestDestination in CodexEntry event is empty string. I think EDMC just should allow this field to be empty string when sends over EDDN or just remove this field before send.

Yes, this is a red herring. What we're trying to find is why the EDDN schema validation is saying "you sent an empty string that has to be at least one character long". Unfortunately that check is now causing it to not send the messages with empty NearestDestination. We'll adjust the check.

Athanasius commented 2 years ago

Hmm this is very odd. System in CodexEntry is set. Can't see anything in the other events that might suggest that system is blank.

I wonder if anything could be setting it blank? Can a plugin change the contents of a variable it is passed in through journal_entry?

It can change its copy of the variable, absolutely. But we do an explicit copy of the state passed to plugins before passing it into each one. So plugins can't interfere with each other or the 'core' version (unless they actually reach into monitor.py in this case and start fucking with things).

mearmortal commented 2 years ago

Hi there I've had the same issue about an hr ago, heres the info: Journal.220220134255.01.log The screenshot is the list of object that may have been in system, the ones ticked are the ones I actually found. Check out the one that said 'Not Predicted' that's written by Elite Observatory not me. Screenshot 2022-02-20 182729 Hope this helps.

Athanasius commented 2 years ago

@poinck and @mearmortal both of your Journal files only show the "NearestDestination": "" case, which is a red herring with respect to what we were looking for. 5.3.1 will change things so the message doesn't trigger in this case (indeed it will only trigger for the strings we know the schema requires to be a non-empty string).

mearmortal commented 2 years ago

OK Thanks, shame we couldn't help.

poinck commented 2 years ago

Ok, if I see "CodexEntry had empty string"-message again after the 5.3.1 release, I'll provide another debug-log, if that helps.

Athanasius commented 2 years ago

https://github.com/EDCD/EDMarketConnector/releases/tag/Release%2F5.3.1 has addressed this, auto-updates being enabled Soon[tm].