Aireil / FFLogsViewer

Dalamud plugin to view FF Logs ranking percentiles in-game
47 stars 16 forks source link

[bug] Plugin hasn't worked since 6.1 (UI cannot open, right-click menu option does not exist) #18

Closed daria-mianne closed 2 years ago

daria-mianne commented 2 years ago

Obviously, when 6.1 launched, the plugin didn't immediately work because of the changes to underlying systems and was disabled as a result, but even since it was reenabled, it has not worked at all for me. The right-click menu option does not appear, /fflogs does nothing whether an argument is given or not, and /fflogsconfig only pops up an error window once per game open saying something went wrong and please contact the author / restart the game with no additional detail (after that first time, using the command again does nothing until restarting the game).

Please find below the lines from dalamud.log that appeared to be relevant.

2022-04-21 22:49:56.936 -07:00 [INF] [LOCALPLUGIN] Unloading FFLogsViewer.dll
2022-04-21 22:49:56.937 -07:00 [INF] [LOCALPLUGIN] Finished unloading FFLogsViewer.dll
2022-04-21 22:49:57.212 -07:00 [INF] [PLUGINM] Installed plugin FF Logs Viewer (testing=False)
2022-04-21 22:49:57.212 -07:00 [INF] [PLUGINM] Loading plugin FF Logs Viewer
2022-04-21 22:49:57.346 -07:00 [INF] [LOCALPLUGIN] Loading FFLogsViewer.dll
2022-04-21 22:49:57.362 -07:00 [INF] [LOCALPLUGIN] Finished loading FFLogsViewer.dll
2022-04-21 22:49:57.364 -07:00 [INF] [PLUGINM] Plugin update OK.
2022-04-21 22:49:57.450 -07:00 [ERR] [FFLogsViewer] FF Logs token couldn't be set.
2022-04-21 22:50:37.017 -07:00 [ERR] [FFLogsViewer] UiBuilder OnBuildUi caught exception
System.ArgumentNullException: Value cannot be null. (Parameter 'chars')
   at System.Text.UTF8Encoding.GetByteCount(String chars)
   at ImGuiNET.ImGui.InputText(String label, String& input, UInt32 maxLength, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, IntPtr user_data) in D:\a\Dalamud\Dalamud\lib\ImGuiScene\deps\ImGui.NET\src\ImGui.NET-472\ImGui.NET\ImGui.Manual.cs:line 112
   at FFLogsViewer.GUI.Config.MiscTab.Draw() in D:\a\FFLogsViewer\FFLogsViewer\FFLogsViewer\GUI\Config\MiscTab.cs:line 84
   at FFLogsViewer.GUI.Config.ConfigWindow.Draw() in D:\a\FFLogsViewer\FFLogsViewer\FFLogsViewer\GUI\Config\ConfigWindow.cs:line 24
   at Dalamud.Interface.Windowing.Window.DrawInternal() in C:\goatsoft\companysecrets\dalamud\Interface\Windowing\Window.cs:line 195
   at Dalamud.Interface.Windowing.WindowSystem.Draw() in C:\goatsoft\companysecrets\dalamud\Interface\Windowing\WindowSystem.cs:line 117
   at Dalamud.Interface.UiBuilder.OnDraw() in C:\goatsoft\companysecrets\dalamud\Interface\UiBuilder.cs:line 305
2022-04-21 22:59:34.242 -07:00 [ERR] [FFLogsViewer] FFLogs token not valid.
2022-04-21 22:59:34.247 -07:00 [ERR] [FFLogsViewer] rawData is null

There were also a few very long, encrypted lines (two beginning [INF] TROUBLESHOOTING after the "Finished loading" line and one beginning [INF] LASTEXCEPTION after the stack trace) that were near some of the lines included above, but I couldn't verify whether they would even pertain to this issue, let alone be helpful due to the encryption, so I excluded them. If they would help you, please let me know and I can add them.

I vaguely recall needing to input my fflogs token into the UI somewhere, and I could see it expiring as an explanation for the "FFLogs token not valid" line, but I can't get into the plugin's configuration in any way to set it, so that seems to be a secondary issue to the primary one of not being able to get into the UI.

Aireil commented 2 years ago

It looks like your config got corrupted somehow, hopefully just something from the old version. I added more checks in 2.0.2.1 to avoid it crashing, however, even with this bug, you should be able to see the main window with /fflogs. The right click menu not working is normal, as it has been disabled since 6.1.

If this new version doesn't fix the main window, with the plugin unloaded, delete your config located at %appdata%/XIVLauncher/pluginConfigs/FFLogsViewer.json. Before deleting the file, replace the ClientId and ClientSecret fields, then copy paste the content of the file here.

If it still doesn't work, close the game and delete the file %appdata%/XivLauncher/dalamudUI.ini. This will reset all position/size info on Dalamud windows.

If after all this, the main window is still not showing up, well... not sure. Something would have to be very wrong.

daria-mianne commented 2 years ago

Thanks for getting back to me so quick. Fun fact, I don't need to change the ClientId and ClientSecret fields because they're already null! That's probably an issue in itself...

{
  "$type": "FFLogsViewer.Configuration, FFLogsViewer",
  "ClientId": null,
  "ClientSecret": null,
  "ContextMenu": true,
  "ContextMenuStreamer": false,
  "OpenInBrowser": true,
  "ContextMenuButtonName": "Search FF Logs",
  "ShowSpoilers": false,
  "DisplayOldRaid": false,
  "Version": 0
}

That said, deleting the config did resolve the problem. As such, I think your hypothesis about something going wrong in the old version or in the upgrade from the old version to the new version is probably correct.

Aireil commented 2 years ago

Yes, I knew at least one of them was null from the log: System.ArgumentNullException: Value cannot be null.. This is what I checked on the fixed version.

Not sure why the main window wasn't showing up, but whatever, as long as it doesn't happen again! Happy to know it now works, I'm thus closing the issue.