• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting System.InvalidOperationException: There is an error in XML document (0, 0).

     
    • 0 Vote(s) - 0 Average

    System.InvalidOperationException: There is an error in XML document (0, 0).

    Jellyfin crashes on startup
    endymion1818
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Jan
    Reputation: 0
    Country:United Kingdom
    #1
    2024-01-03, 09:25 AM
    I keep getting this issue even after updating Jellyfin and dependencies. It happened unexpectedly and I can't figure out why or which XML document has an error:

    [09:23:19] [INF] [1] Main: Jellyfin version: 10.8.13
    [09:23:19] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /home/redacted/jellyfin/log]"]
    [09:23:19] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll"]
    [09:23:19] [INF] [1] Main: Operating system: Linux
    [09:23:19] [INF] [1] Main: Architecture: X64
    [09:23:19] [INF] [1] Main: 64-Bit Process: True
    [09:23:19] [INF] [1] Main: User Interactive: True
    [09:23:19] [INF] [1] Main: Processor count: 8
    [09:23:19] [INF] [1] Main: Program data path: /home/redacted/jellyfin
    [09:23:19] [INF] [1] Main: Web resources path: /usr/lib/jellyfin/bin/jellyfin-web
    [09:23:19] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
    [09:23:19] [FTL] [1] Main: Unhandled Exception
    System.InvalidOperationException: There is an error in XML document (0, 0).
     ---> System.Xml.XmlException: Root element is missing.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlReader.MoveToContent()
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderServerConfiguration.Read10_ServerConfiguration()
       --- 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 Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromStream(Type type, Stream stream)
       at Emby.Server.Implementations.Serialization.MyXmlSerializer.DeserializeFromFile(Type type, String file)
       at Jellyfin.Server.Migrations.MigrationRunner.RunPreStartup(ServerApplicationPaths appPaths, ILoggerFactory loggerFactory)
       at Jellyfin.Server.Program.StartApp(StartupOptions options)
       at Jellyfin.Server.Program.<Main>(String[] args)

    Short of uninstalling and reinstalling Jellyfin, is there any way of identifying what XML document is at fault?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-01-03, 09:32 AM
    I'm not aware of how to figure out which is the problem. But /etc/jellyfin is the only directory that has XMLs that could break Jellyfin.

    Code:
    chris@rat-trap:/etc/jellyfin$ ll
    total 76
    drwxr-x---   5 jellyfin adm       4096 Jan  3 02:33 ./
    drwxr-xr-x 145 root     root     12288 Dec 29 18:13 ../
    -rw-r--r--   1 jellyfin jellyfin   263 Dec 22 19:35 branding.xml
    drwxr-xr-x   4 jellyfin jellyfin  4096 Aug 15 12:05 dlna/
    -rw-r--r--   1 jellyfin jellyfin   770 Aug 15 12:15 dlna.xml
    -rw-r--r--   1 jellyfin jellyfin  2312 Jan  3 03:35 encoding.xml
    -rw-r--r--   1 jellyfin jellyfin  1322 Oct 28 00:04 livetv.xml
    -rw-r--r--   1 jellyfin jellyfin  1362 Aug 15 12:15 logging.default.json
    -rw-r--r--   1 jellyfin root      1040 Aug 15 12:15 logging.json
    -rw-r--r--   1 jellyfin jellyfin   260 Aug 15 12:15 metadata.xml
    -rw-r--r--   1 jellyfin jellyfin  2181 Aug 15 12:15 migrations.xml
    -rw-r--r--   1 jellyfin jellyfin  1546 Nov 24 12:58 network.xml
    -rw-r--r--   1 jellyfin jellyfin   270 Jan  3 02:42 playback_reporting.xml
    drwxr-xr-x   2 jellyfin jellyfin  4096 Dec 14 08:09 ScheduledTasks/
    -rw-r--r--   1 jellyfin jellyfin  5979 Dec 22 19:35 system.xml
    drwxr-xr-x   3 jellyfin jellyfin  4096 Aug 15 12:05 users/
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    endymion1818
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Jan
    Reputation: 0
    Country:United Kingdom
    #3
    2024-01-03, 09:33 AM
    To be clear, I upgraded Jellyfin _after_ this started to happen, to see if it would resolve the issue.
    endymion1818
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 Jan
    Reputation: 0
    Country:United Kingdom
    #4
    2024-01-03, 09:40 AM
    Thanks @TheDreadPirate, I checked all XML files with an online validator and there were no errors ...

    I wonder if it's system.xml that's the issue:

    System.InvalidOperationException: There is an error in XML document (0, 0).
    ---> System.Xml.XmlException: Root element is missing.

    But I wouldn't know what was the problem there.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #5
    2024-01-03, 09:50 AM
    The quick solution is to

    backup /var/lib/jellyfin (this has your database and user data)
    uninstall
    reinstall
    stop jellyfin
    restore /var/lib/jellyfin from the backup
    start jellyfin
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    niels
    Offline

    Core Team

    Posts: 248
    Threads: 4
    Joined: 2023 Jun
    Reputation: 12
    Country:Netherlands
    #6
    2024-01-03, 09:58 AM
    If the root element is missing that likely means the file is empty.
    Daniel_King
    Offline

    Junior Member

    Posts: 21
    Threads: 4
    Joined: 2023 Jul
    Reputation: 0
    #7
    2025-01-22, 02:53 PM
    (2024-01-03, 09:40 AM)endymion1818 Wrote: System.InvalidOperationException: There is an error in XML document (0, 0).
    ---> System.Xml.XmlException: Root element is missing.

    After updating my Linux server and deleting the docker log files, I get the same error.

    Could you solve this issue?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #8
    2025-01-22, 04:19 PM
    Is jellyfin installed directly on Linux or in Docker?

    If directly on Linux, delete all the XMLs in /etc/jellyfin/. They will be recreated with defaults and don't contain any critical data.

    If docker, navigate to where you mounted /config and delete all the XMLs in /config/config.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    1
    Daniel_King
    Offline

    Junior Member

    Posts: 21
    Threads: 4
    Joined: 2023 Jul
    Reputation: 0
    #9
    2025-01-22, 05:46 PM (This post was last modified: 2025-01-22, 06:03 PM by Daniel_King. Edited 1 time in total.)
    I use Docker.

    My config folder is mounted under "/home/jellyfin/config".

    But within the config folder, there is no other config folder.

    I see 4 xml files:
    encoding.xml
    migration.xml
    network.xml
    system.xml

    Should I delete them, or are these other XMLs?

    Edit: Removing the XMLs worked. Thanks!
    1
    banked2678
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Apr
    Reputation: 0
    Country:Brazil
    #10
    2025-04-21, 03:13 PM
    After some experimentation, I could get it working by deleting migration.xml and system.xml.

    If one would like to fix this problem too, he can try deleting only these so that configs aren't lost unnecessarily.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode