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

[Issue]: Starting freshly installed Jellyfin server for the second time fails with MigrateNetworkConfiguration error #9983

Closed
1 task done
Sky-High opened this issue Jul 9, 2023 · 8 comments · Fixed by #9987
Labels
bug Something isn't working

Comments

@Sky-High
Copy link
Contributor

Sky-High commented Jul 9, 2023

Please describe your bug

After recent Jellyfin.Networking updates, running a freshly installed Jellyfin server (i.e. no configuration files in AppData\Local\jellyfin) logs 'CreateNetworkConfiguration' in AppData\Local\jellyfin\config\migrations.xml.

Starting Jellyfin server for the second time, however, checks for 'MigrateNetworkConfiguration' in migrations.xml, which isn't there, causing Jellyfin server to abort with an error and stacktrace.

Jellyfin Version

Other

if other:

10.9.0

Environment

- OS: Windows 10

Jellyfin logs

[20:22:59] [INF] [1] Jellyfin.Server.Migrations.MigrationRunner: Applying migration 'MigrateNetworkConfiguration'
[20:22:59] [ERR] [1] Jellyfin.Server.Migrations.MigrationRunner: Could not apply migration 'MigrateNetworkConfiguration'
System.InvalidOperationException: There is an error in XML document (22, 6).
 ---> System.Xml.XmlException: 'Element' is an invalid XmlNodeType.
   at System.Xml.XmlReader.FinishReadElementContentAsXxx()
   at System.Xml.XmlReader.ReadElementContentAsString()
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOldNetworkConfiguration.Read2_OldNetworkConfiguration(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOldNetworkConfiguration.Read3_NetworkConfiguration()
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
   at Jellyfin.Server.Migrations.PreStartupRoutines.MigrateNetworkConfiguration.Perform() in C:\o\git\jellyfin-git-srv\Jellyfin.Server\Migrations\PreStartupRoutines\MigrateNetworkConfiguration.cs:line 43
   at Jellyfin.Server.Migrations.MigrationRunner.PerformMigrations(IMigrationRoutine[] migrations, MigrationOptions migrationOptions, Action`1 saveConfiguration, ILogger logger) in C:\o\git\jellyfin-git-srv\Jellyfin.Server\Migrations\MigrationRunner.cs:line 124

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Sky-High Sky-High added the bug Something isn't working label Jul 9, 2023
@Sky-High
Copy link
Contributor Author

I wrote a fix and will submit this with a PR.

@Paulus88
Copy link

Same problem, would be awesome if it works Sky-High, thanks!

@Paulus88
Copy link

Probably has something to do with this change last week:
32ac3b5
or one of the other ones that day.

@Sky-High
Copy link
Contributor Author

Probably has something to do with this change last week: 32ac3b5 or one of the other ones that day.

Yeah, the issue probably existed already earlier but indeed became only apparent after those changes.

Interested to know if the PR fixes your issue too.

@Paulus88
Copy link

I normally pull it from: https://repo.jellyfin.org/releases/server/windows/versions/unstable/combined/

Is this considered the PR version?

@Sky-High
Copy link
Contributor Author

The changes in the PR have not been merged yet, so you can wait for that.
Or you apply the changes manually, of course.
See PR #9987

@Paulus88
Copy link

Thanks @Sky-High, I'm not that good at C# will probably look into it in the near future as it seems to be the language all modern apps are using, Ill wait for your fix to be added to the release. Reading the PR it seems to match my issue exactly.
Always have great respect for you guys working hard on this app

@Paulus88
Copy link

Thanks to your explination in #9987 I managed to get a workaround setup and have my Jellyfin back yeeey, I can't wait until they get your patch as its a lot of messing with network.xml and metadata.xml. I will be watching your patch closely when its accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants