ShokoAnime / ShokoDesktop

Repository for Shoko Desktop
http://shokoanime.com/shokodesktop/
106 stars 25 forks source link

Version 3.8 Beta Issues #546

Closed ElementalCrisis closed 6 years ago

ElementalCrisis commented 7 years ago

VERSION INFORMATION

Server Version: 3.8.0.0 Desktop Version: 3.8.0.0

DESCRIPTION

Dashboard - Simple View

image

Collection - Normal View

image

image

da3dsoul commented 7 years ago

Mk time to start listing what I've already fixed before you made this. Tags, related and similar, and NO GROUP INFO were all already fixed. I may have already fixed comments, but I'll need to look to see

da3dsoul commented 7 years ago

I don't use simple view, so I'm not surprised half of it is broken

ElementalCrisis commented 7 years ago

Oh cool, I take it you haven't pushed your fixes yet? Unless I missed the commit.

da3dsoul commented 7 years ago

You did. It was a general clean up to AniDB scraping

ElementalCrisis commented 7 years ago

Ah ok cool, I'll update the beta later tonight.

ElementalCrisis commented 7 years ago

On a fresh install of Shoko Server with a fresh DB.

[2017-07-30 22:04:37:519] Error|ShokoServer.WorkerSetupDB_DoWork => ShokoServer.NetPermissionWrapper => ShokoServer.StartNancyHost Nancy.Hosting.Self.AutomaticUrlReservationCreationFailureException: The Nancy self host was unable to start, as no namespace reservation existed for the provided url(s).

Please either enable UrlReservations.CreateAutomatically on the HostConfiguration provided to 
the NancyHost, or create the reservations manually with the (elevated) command(s):

netsh http add urlacl url="http://+:8111/" user="Everyone"

   at Nancy.Hosting.Self.NancyHost.StartListener()
   at Nancy.Hosting.Self.NancyHost.Start()
   at Shoko.Server.ShokoServer.StartNancyHost() in D:\My Files\Documents\GitHub\ShokoServer\Shoko.Server\ShokoServer.cs:line 1651

This error makes it so you can't run Shoko as a normal user with SQLite.

Previously, when the user started Shoko, if a config file was not found the user was given the option to select one. Then Shoko would restart as Admin, do what it needs to do and then restart as a regular user. This no longer happens and causes the above errors and errors writing to the SQLite DB.

[2017-07-30 22:17:16:047] Error|App.OnStartup => ServerSettings.LoadSettingsFromFile => ServerSettings.LoadLegacySettingsFromFile Error occured during LoadSettingsManuallyFromFile: The string parameter 'fileMap.ExeConfigFilename' cannot be null or empty.
Parameter name: fileMap.ExeConfigFilename
[2017-07-30 22:17:16:313] Info|Application.<.ctor>b__1_0 => App.OnStartup => ServerSettings.LoadSettingsFromFile User has fresh config, restarting once as admin.
[2017-07-30 22:17:16:328] Info|App.OnStartup => ServerSettings.LoadSettingsFromFile => Utils.RestartAsAdmin RestartAsAdmin batch line: timeout 5 && taskkill /F /IM ShokoServer.exe /fi "memusage gt 2" && "D:\Program Files (x86)\Shoko\Shoko Server\ShokoServer.exe"
[2017-07-30 22:19:19:651] Warn|MainWindow..ctor => ShokoServer.StartUpServer => ServerSettings.DebugSettingsToLog Error in log (database version lookup: Object reference not set to an instance of an object.

This was the message box you'd seen on a fresh install of Server. image

Logs Related to it. Server - 2017-07-30_-_Server.txt

Desktop 2017-07-30.zip

ElementalCrisis commented 7 years ago

@da3dsoul on latest commit, Realted & Similar still show nothing and Group Info is still set to UNKNOWN.

ElementalCrisis commented 7 years ago

Also my Server log is filled with these.

[2017-08-13 15:57:25:529] Error|BackgroundWorker.OnDoWork => CommandProcessorGeneral.WorkerCommands_DoWork => CommandRequest_GetAnimeHTTP.ProcessCommand Error processing CommandRequest_GetAnimeHTTP: 13060 - NHibernate.Exceptions.GenericADOException: could not insert: [Shoko.Models.Server.AniDB_Anime_Character][SQL: INSERT INTO AniDB_Anime_Character (AnimeID, CharID, CharType, EpisodeListRaw) VALUES (?, ?, ?, ?); select last_insert_rowid()] ---> System.Data.SQLite.SQLiteException: constraint failed
NOT NULL constraint failed: AniDB_Anime_Character.EpisodeListRaw
   at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
   at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
   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 NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd)
   at NHibernate.Id.IdentityGenerator.InsertSelectDelegate.ExecuteAndExtract(IDbCommand insert, ISessionImplementor session)
   at NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder)
   --- End of inner exception stack trace ---
   at NHibernate.Id.Insert.AbstractReturningDelegate.PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder)
   at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object[] fields, Object obj, ISessionImplementor session)
   at NHibernate.Action.EntityIdentityInsertAction.Execute()
   at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
   at NHibernate.Event.Default.AbstractSaveEventListener.PerformSaveOrReplicate(Object entity, EntityKey key, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)
   at NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)
   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event)
   at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)
   at NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event)
   at NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
   at Shoko.Server.Repositories.BaseDirectRepository`2.Save(IReadOnlyCollection`1 objs) in D:\Documents\GitHub\ShokoServer\Shoko.Server\Repositories\BaseDirectRepository.cs:line 156
   at Shoko.Server.Models.SVR_AniDB_Anime.CreateCharacters(ISession session, List`1 chars) in D:\Documents\GitHub\ShokoServer\Shoko.Server\Models\SVR_AniDB_Anime.cs:line 1230
   at Shoko.Server.Models.SVR_AniDB_Anime.PopulateAndSaveFromHTTP(ISession session, Raw_AniDB_Anime animeInfo, List`1 eps, List`1 titles, List`1 cats, List`1 tags, List`1 chars, List`1 rels, List`1 sims, List`1 recs, Boolean downloadRelations) in D:\Documents\GitHub\ShokoServer\Shoko.Server\Models\SVR_AniDB_Anime.cs:line 1064
   at Shoko.Server.AniDBHelper.SaveResultsForAnimeXML(ISession session, Int32 animeID, Boolean downloadRelations, AniDBHTTPCommand_GetFullAnime getAnimeCmd) in D:\Documents\GitHub\ShokoServer\Shoko.Server\AniDBHelper.cs:line 1080
   at Shoko.Server.AniDBHelper.GetAnimeInfoHTTP(ISession session, Int32 animeID, Boolean forceRefresh, Boolean downloadRelations) in D:\Documents\GitHub\ShokoServer\Shoko.Server\AniDBHelper.cs:line 1067
   at Shoko.Server.AniDBHelper.GetAnimeInfoHTTP(Int32 animeID, Boolean forceRefresh, Boolean downloadRelations) in D:\Documents\GitHub\ShokoServer\Shoko.Server\AniDBHelper.cs:line 1017
   at Shoko.Server.Commands.CommandRequest_GetAnimeHTTP.ProcessCommand() in D:\Documents\GitHub\ShokoServer\Shoko.Server\Commands\AniDB\CommandRequest_GetAnimeHTTP.cs:line 54
ElementalCrisis commented 7 years ago

Also every series I add fails to properly download the AniDB poster crashing Desktop.

da3dsoul commented 7 years ago

Hmm ok. Any log for the failed poster downloads

ElementalCrisis commented 7 years ago

For TvDB Images

[2017-08-13 16:04:45:086] Warn|BackgroundWorker.OnDoWork => CommandProcessorImages.WorkerCommands_DoWork => CommandRequest_DownloadImage.ProcessCommand Error processing CommandRequest_DownloadImage: http://thetvdb.com/banners/fanart/original/87991-2.jpg (23) - The image download stream returned an invalid image
[2017-08-13 16:04:45:121] Info|BackgroundWorker.OnDoWork => CommandProcessorImages.WorkerCommands_DoWork => CommandRequest_DownloadImage.ProcessCommand Processing CommandRequest_DownloadImage: 24
[2017-08-13 16:04:50:570] Warn|BackgroundWorker.OnDoWork => CommandProcessorImages.WorkerCommands_DoWork => CommandRequest_DownloadImage.ProcessCommand Error processing CommandRequest_DownloadImage: http://thetvdb.com/banners/fanart/original/87991-3.jpg (24) - The image download stream returned an invalid image
[2017-08-13 16:05:00:108] Info|BackgroundWorker.OnDoWork => CommandProcessorImages.WorkerCommands_DoWork => CommandRequest_DownloadImage.ProcessCommand Processing CommandRequest_DownloadImage: 23

Here's my log with some other errors I've noticed.

2017-08-13.txt

Seems the issue is, the image is never downloaded so when Desktop goes to load the imagefile, it creates a 0KB one since it can't find it and crashes.

I added Cowboy Bebop, the AniDB Image filename is 156726.jpg yet there is no record in my log for it.

da3dsoul commented 7 years ago

It shouldn't save if it's invalid

da3dsoul commented 7 years ago

We may need to deprecate image downloading from TvDB, as TvDBSharper handles that

ElementalCrisis commented 7 years ago

Yeah that would solve the TvDB downloading issue, now to figure out why posters aren't being downloaded from AniDB or anything logged about it.

da3dsoul commented 7 years ago

I'm not having any issues with covers downloading.

da3dsoul commented 7 years ago

From discord:

finally I can reproduce it... - in metro Dashboard the "refresh circle" will get permanent (wont disappear) when you go and pin a serie before hitting the refresh button so steps are - dashboard view --> click a serie --> use the pin button --> go back to dashboard --> hit the back button --> hit refresh for the list

ElementalCrisis commented 7 years ago
[2017-08-26 17:56:44:082] Error|EventRoute.InvokeHandlersImpl => NewSeries.btnConfirm_Click => Utils.ShowErrorMessage System.AggregateException: One or more errors occurred. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Nancy.Rest.Client.ClientFactory.DoSyncClient(Object dexp, MethodDefinition def, IWebProxy proxy, Object[] parameters)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute7[T0,T1,T2,T3,T4,T5,T6,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
   at Nancy.Rest.Client.ClientFactory.<>c__DisplayClass1_1`1.<Create>b__15(Object a, Object b, Object c)
   at CallSite.Target(Closure , CallSite , Object , Int32 , Nullable`1 , Int32 )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at CallSite.Target(Closure , CallSite , Object , Int32 , Nullable`1 , Int32 )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at ActLike_IShokoServer_fd039e6db49d4a4cbad74b49b700420d.CreateSeriesFromAnime(Int32 animeID, Nullable`1 animeGroupID, Int32 userID)
   at Shoko.Desktop.Forms.NewSeries.btnConfirm_Click(Object sender, RoutedEventArgs e) in D:\Documents\GitHub\ShokoDesktop\Shoko.Desktop\Forms\NewSeries.xaml.cs:line 289
---> (Inner Exception #0) System.Threading.Tasks.TaskCanceledException: A task was canceled.<---

[2017-08-26 17:56:45:374] Error|EventRoute.InvokeHandlersImpl => UnrecognisedVideos.btnAddSeries_Click => Utils.ShowErrorMessage System.NullReferenceException: Object reference not set to an instance of an object.
   at Shoko.Desktop.UserControls.UnrecognisedVideos.btnAddSeries_Click(Object sender, RoutedEventArgs e) in D:\Documents\GitHub\ShokoDesktop\Shoko.Desktop\UserControls\UnrecognisedVideos.xaml.cs:line 342

Seems the issue is actually with adding the series as it makes the group for the series.

da3dsoul commented 7 years ago

Is there an error in server? That sounds like a server error

ElementalCrisis commented 7 years ago

Nothing in the logs from what I could see. I'll try again after the new DB is done.

ElementalCrisis commented 7 years ago

image

image

Cazzar commented 7 years ago

Just looked into the fansub group info. it is downloaded.

https://github.com/ShokoAnime/ShokoServer/blob/aa5f05782cf2da140a7189e879c80b23e2e1a21b/Shoko.Server/AniDBHelper.cs#L410-L415

You just need "AniDB_DownloadReleaseGroups": "True" in your config.

ElementalCrisis commented 7 years ago

@Cazzar Had to disable and re-enable to get it to work, but that did the trick.

da3dsoul commented 7 years ago

That's why I couldn't reproduce it. I've had that on

LovShoko commented 7 years ago

The following already got solved by me - I simply deleted the serie and re-imported the files in question Have a look at the screenshot image

In it you can see multipe errors:

  1. the "1-OVA" (2nd entry) is actually from a different serie
  2. the same image for "different" episodes (as I said it is actually of a different serie)
  3. the file is stored (drop destination) with the correct serie (see tooltip of the file)

Some thoughts that came while chatting in discord: as you can see in my image, shoko linked the file to 2 different serie - 1st in the episode tab of the serie "High School DxD OAD" and 2nd by dropping the file (after import) into the destination folder of the serie "High School DxD New։ Teishi Kyoushitsu no Vampire" so 1 file is getting linked 2 different series

maybe the hash was originally linked to the wrong serie (maybe thats also the reason why shoko displays a count of 3 episodes even though "High School DxD OAD" only has 2) Have this serie in my collection a pretty long time, just played around with it because of a previous bug I had

ElementalCrisis commented 7 years ago

I'd check your log for any importing issues, everything imported correctly for me.

image

LovShoko commented 7 years ago

@ElementalCrisis - as I said re-importing solved the issue for me aswell dont know what was wrong in the first place

just checked the episode counter again on my side - since yours displays 2 episodes now mine also displays the count correctly - maybe some caching issue

gona edit my question and remove the part about the counter being wrong

I cannot check logs since I dont know when this happened, I just found it because of some issues in metro view

ElementalCrisis commented 7 years ago

Duplicate images has been fixed.

Validating Images only works IF Shoko Desktop is closed.

da3dsoul commented 7 years ago

Fixed group exclusion settings

Cazzar commented 7 years ago

Checked off anidb comments not loading per: image

Cazzar commented 7 years ago

As with the adding new group, that is working.

da3dsoul commented 7 years ago

So the only thing left in this issue at this point is: From discord:

finally I can reproduce it... - in metro Dashboard the "refresh circle" will get permanent (wont disappear) when you go and pin a serie before hitting the refresh button so steps are - dashboard view --> click a serie --> use the pin button --> go back to dashboard --> hit the back button --> hit refresh for the list

LovShoko commented 7 years ago

@da3dsoul Thats not correct.

There are still those points open:

(The first 2 are bugs, and the second is a request from me)

da3dsoul commented 7 years ago
  1. @Cazzar said he couldn't reproduce it
  2. True I forgot that
  3. No. It leads to unpredictable results depending on the order that series are grouped
LovShoko commented 7 years ago
  1. To again verify the problem, I went ahead and downloaded the following file: [(́◉◞౪◟◉‵)] Mobile Suit Gundam Twilight AXIS - 05 / 機動戦士ガンダム Twilight AXIS 第5話 [720p].mkv (FYI - though I believe it doesnt matter - I dont have any Gundam Serie in my Collection)

And after importing I get this: image

Notice the tooltip, thats the correct and current filename. So.... totally reproducable on my end.

  1. Bad boy.
  2. Okay, no problem since I solved the issue at hand with the mentioned settings.

I had another look at my discord history and found the following stuff that I forgot (bad boy me) to post here and I verified that they are aswell still open:

da3dsoul commented 6 years ago

The characters thing is still not fixed, but a separate issue can be made