Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESICharacterSheet esi issue #300

Open
wvdvegt opened this issue Oct 26, 2021 · 30 comments · May be fixed by #303
Open

ESICharacterSheet esi issue #300

wvdvegt opened this issue Oct 26, 2021 · 30 comments · May be fixed by #303

Comments

@wvdvegt
Copy link

wvdvegt commented Oct 26, 2021

The route /v4/characters/ seems to have been superceeded by a v5 one.

So in NetworkCOnstants.resx the ESICharacterSheet entry should look as:

  <data name="ESICharacterSheet" xml:space="preserve">
    <value>/v5/characters/{0:D}/</value>
    <comment>3600</comment>
  </data>
@nlowell
Copy link

nlowell commented Oct 26, 2021

is that why all my pilots are (cached) with a 404 not found error on esi?

EVEMon 4.0.20.4986

EVEMon.Common.Net.HttpWebClientServiceException: A request to esi.evetech.net failed with status: 404 (Not Found). ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at EVEMon.Common.Net.HttpClientServiceRequest.EnsureSuccessStatusCode(HttpResponseMessage response)
at EVEMon.Common.Net.HttpClientServiceRequest.d__8.MoveNext()
--- End of inner exception stack trace ---
at EVEMon.Common.Net.HttpClientServiceRequest.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at EVEMon.Common.Net.HttpWebClientService.d__11`1.MoveNext()

@wvdvegt
Copy link
Author

wvdvegt commented Oct 26, 2021

I think yes. The /v4/ route returns the 404 (deprecated probably).

@ajaxify
Copy link

ajaxify commented Oct 26, 2021

Came here to report the same thing. Characters started going (cached) for me yesterday, and this corresponds to when they deprecated the endpoint as I had to update my pathfinder install as well.

@gokeefe
Copy link

gokeefe commented Oct 27, 2021

This worked perfectly, thanks

@ruiterrinha
Copy link

How can we implement this fix?

@wvdvegt
Copy link
Author

wvdvegt commented Oct 27, 2021

Just search the solution for the text

<value>/v4/characters/{0:D}/</value>

and replace it by

<value>/v5/characters/{0:D}/</value>

And recompile evemon.

@nlowell
Copy link

nlowell commented Oct 27, 2021

Is there a .21 version in the offing?

I'm selfishly hoping that there's an update available that I don't have to try to do myself.

@Andf
Copy link

Andf commented Oct 27, 2021

Ehm... can anyone please publish a fix? I'm afraid I'm unable to compile... :(

Many thanks!

@ajaxify
Copy link

ajaxify commented Oct 28, 2021

I forked the repo and followed the the OP to make a fix. Took a little wrestling to get it to build correctly, but after reading the docs on the old wiki for how to setup VS Code, and moving to a path without a space in it, I was able to get it to build.

My fork: 4.0.20.1-esi-v5-characters.

Use at your own risk, obviously. The only changes I've made were to fix the ESI path and update the version string. If you're concerned you should be able to build it pretty easily yourself. The installer will be found in src\EVEMon\bin\Installbuilder\Installer after you build the project.

@ajaxify ajaxify linked a pull request Oct 28, 2021 that will close this issue
@wvdvegt
Copy link
Author

wvdvegt commented Oct 28, 2021

Did you also update the static data?

@Andf
Copy link

Andf commented Oct 28, 2021

New fork seems to be working, many thanks!

@ajaxify
Copy link

ajaxify commented Oct 28, 2021

Did you also update the static data?

I did not. I would be happy to do so if I knew how.

@wvdvegt
Copy link
Author

wvdvegt commented Oct 28, 2021

If you have applied the improvements i made it's a matter of running the tools\XmlGenerator project
You might have to delete the sqlite-latest.* files (if present) before running to force the tool to redownload of the latest version.
It will save files into the evemon project and your %appdata%\evemon folder (where the Evemon installer puts them too). So running the installer afterwards should include the new zipped static data.

acosoi added a commit to acosoi/evemon that referenced this issue Nov 4, 2021
@dephekt
Copy link

dephekt commented Nov 7, 2021

FYI @ajaxify there are several places this endpoint needs updated, not just the ESICharacterSheet:

diff --git a/src/EVEMon.Common/Constants/NetworkConstants.resx b/src/EVEMon.Common/Constants/NetworkConstants.resx
index 03a622a3..ecf35a1c 100644
--- a/src/EVEMon.Common/Constants/NetworkConstants.resx
+++ b/src/EVEMon.Common/Constants/NetworkConstants.resx
@@ -182,7 +182,7 @@
     <comment>600</comment>
   </data>
   <data name="ESICharacterSheet" xml:space="preserve">
-    <value>/v4/characters/{0:D}/</value>
+    <value>/v5/characters/{0:D}/</value>
     <comment>3600</comment>
   </data>
   <data name="ESIStandings" xml:space="preserve">
@@ -468,11 +468,11 @@
     <comment>3600</comment>
   </data>
   <data name="ESIClones" xml:space="preserve">
-    <value>/v4/characters/{0:D}/clones/</value>
+    <value>/v5/characters/{0:D}/clones/</value>
     <comment>120</comment>
   </data>
   <data name="ESISkills" xml:space="preserve">
-    <value>/v4/characters/{0:D}/skills/</value>
+    <value>/v5/characters/{0:D}/skills/</value>
     <comment>120</comment>
   </data>
   <data name="ESICorporationBookmarks" xml:space="preserve">
@@ -524,7 +524,7 @@
     <value>grant_type=refresh_token&amp;refresh_token={0}</value>
   </data>
   <data name="ESIUpcomingCalendarEventDetails" xml:space="preserve">
-    <value>/v4/characters/{0:D}/calendar/{1:D}/</value>
+    <value>/v5/characters/{0:D}/calendar/{1:D}/</value>
     <comment>5</comment>
   </data>
   <data name="ESIFactionWars" xml:space="preserve">
@@ -610,4 +610,4 @@
   <data name="FuzzworksMarketUrl" xml:space="preserve">
     <value>https://market.fuzzwork.co.uk/aggregates/?region=10000002&amp;types=</value>
   </data>
-</root>
\ No newline at end of file
+</root>

@dephekt
Copy link

dephekt commented Nov 7, 2021

@wvdvegt I'm trying to update the static data and could use some help if you've gotten it working before: I've built the project and run the exe and it's throwing a SQL error no such table: agtAgents:

C:\Users\dan\evemon\tools\XmlGenerator\bin\Release>EVEMonXmlGenerator.exe
Connection to SQL Server: Successful

Loading data from 'main' database... 0%
Unhandled Exception: System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SQLite.SQLiteException: SQL logic error
no such table: agtAgents
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   --- End of inner exception stack trace ---
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
   at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
   at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
   at EVEMon.XmlGenerator.Providers.Database.Agents() in C:\Users\dan\evemon\tools\XmlGenerator\Providers\Database.cs:line 460
   at EVEMon.XmlGenerator.Providers.Database.CreateTables() in C:\Users\dan\evemon\tools\XmlGenerator\Providers\Database.cs:line 369
   at EVEMon.XmlGenerator.Program.Main() in C:\Users\dan\evemon\tools\XmlGenerator\Program.cs:line 29

I end up with a 0 byte sqlite-latest.sqlite file. I'm not a C# developer (just Python) so I'm not sure what the deal is here. It is expecting that the file already exists and is populated with data already? Do I actually need to have MSSQL Server installed and import the CCP static data dump first for this to work (like described here)?

@wvdvegt
Copy link
Author

wvdvegt commented Nov 7, 2021

The .sqlite is just the uncompressed sqlite-latest.sqlite.bz2 (you could try to manually decompress it with a tool as winrar). The unzip takes quite some time btw.

To force a re-download from fuzzworks you have to delete the two sqlite-latest version before the xml tool is started.

If the .sqlite file is 0 bytes in size, the file is corrupt and tables do not exists. So the error message fits the .sqlite file size.

@dephekt
Copy link

dephekt commented Nov 7, 2021

The .sqlite is just the uncompressed sqlite-latest.sqlite.bz2 (you could try to manually decompress it with a tool as winrar). The unzip takes quite some time btw.

To force a re-download from fuzzworks you have to delete the two sqlite-latest version before the xml tool is started.

If the .sqlite file is 0 bytes in size, the file is corrupt and tables do not exists. So the error message fits the .sqlite file size.

There's no sqlite-latest.sqlite in the repo before I run the tool. I ran the tool, which then threw the errors at which point I end up with the 0 byte sqlite file.

@wvdvegt
Copy link
Author

wvdvegt commented Nov 7, 2021

It's the sqlite-latest.sqlite.bz2 you have to delete too (that is the zipped archive containing sqlite-latest.sqlite)

I just checked my XmlGenerator project and it downloaded, unzipped & generated the files just fine.

@wvdvegt
Copy link
Author

wvdvegt commented Nov 7, 2021

The bz2 file is located at https://www.fuzzwork.co.uk/dump/sqlite-latest.sqlite.bz2

@wvdvegt
Copy link
Author

wvdvegt commented Nov 7, 2021

It's correct there is no sqlite file in the project before running the tool as the tool downloads and unzips the bz2 archive. (this was a manual operation in the original version).

@dephekt
Copy link

dephekt commented Nov 7, 2021

It's weird. I don't have any sqlite-latest.sqlite.bz2 or sqlite-latest.sqlite before running the tool. It's like it's not downloading/unzipping the file from fuzzwork.

@wvdvegt
Copy link
Author

wvdvegt commented Nov 7, 2021

Then i think you have the version without my patch. You will need to manually download and unzip the bz2 file from fuzzworks then.

@dephekt
Copy link

dephekt commented Nov 7, 2021

Ah, my bad. I didn't know you had a patch somewhere for the XmlGenerator. I'm just working off the main branch on this repo.

@dephekt
Copy link

dephekt commented Nov 7, 2021

OK, that worked fine. Data files are updated and I rebuilt the installer so everything is sweet now. In case someone wants a version with all the v4 endpoints fixed and the latest static data, here's an installer:

https://github.com/dephekt/evemon/releases/tag/v4.0.20-dephekt

If you want to keep the latest static data, you need to ignore the "Data Update Available" notification as it will download the old data from the March 2021 release if you choose to update.

@gokeefe
Copy link

gokeefe commented Nov 7, 2021

FYI @ajaxify there are several places this endpoint needs updated, not just the ESICharacterSheet:

I'm not sure this is accurate. Only the character sheet was updated to v5, the rest (skills, clones, etc) are still v4 according to the ESI reference page?

https://esi.evetech.net/ui/#/Skills/get_characters_character_id_skills

I only updated the character sheet version in my copy and it works just fine

@ajaxify
Copy link

ajaxify commented Nov 7, 2021

Thanks for the info on the XMLGenerator, I was also running into the same problem but hadn't had a chance to ask for help here yet. I will try to reproduce and update my fork as well.

@wvdvegt would you mind linking to the patch you're talking about? Thanks!

@wvdvegt
Copy link
Author

wvdvegt commented Nov 7, 2021

See #294 for the patch.

@dephekt
Copy link

dephekt commented Nov 9, 2021

FYI @ajaxify there are several places this endpoint needs updated, not just the ESICharacterSheet:

I'm not sure this is accurate. Only the character sheet was updated to v5, the rest (skills, clones, etc) are still v4 according to the ESI reference page?

https://esi.evetech.net/ui/#/Skills/get_characters_character_id_skills

I only updated the character sheet version in my copy and it works just fine

Yeah, you're right. The first read of the forum post and the issue CCP made about this I understood it as anything under /v4/characters/{id} and saw references elsewhere to /v5/characters/{id}/clones for example. If you tested the other functionality still using the /v4/characters route and things still worked then I guess this isn't necessary.

In fact, later I did this on my own copy and at first noticed no issues. Then after adding a few new characters I saw weird behavior, like some skills in the character sheet not showing up (but others do), which is probably related to changing these other URLs to v5. I never looked into the raw response data to see what is actually going on though.

Sorry for the confusion.

@wvdvegt
Copy link
Author

wvdvegt commented Nov 9, 2021 via email

@erlendur-ccp
Copy link

erlendur-ccp commented Feb 3, 2022

According to https://github.com/esi/esi-issues/blob/master/changelog.md then the change was

REMOVAL /v4/characters/{character_id} (legacy)
    The only difference between v4 and v5 is the fact that v4 contains as an optional field ancestry_id.

It was scheduled and postponed multiple times but eventually the removal was deployed on 2021-10-25.

Is there a plan to get EVEMon correspondingly fixed and the clients in the field updated?

There is a need to get these older clients updated:

  • EVEMon/4.0.17.4966
  • EVEMon/4.0.18.4979
  • EVEMon/4.0.19.4983
  • EVEMon/4.0.20.4986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants