LibreElec 9 / Kodi “Failed to play game” error accessing game files over SMB network share

If you have attempted to use the Games section in Kodi 18, you may have run into the issue of trying to play Kodi games over SMB (a network share). This article discusses how to workaround the error:

Failed to play game
This game can only be plated directly from a hard drive or partition. Compressed files must be extracted.

Screnshot of Kodi "Failed to play game" error

On clicking ‘OK’ you will be unable to play any game stored on a SMB share for some emulator types. You will not universally encounter the error for all games. Nintendo SNES and Gameboy will work, while Comodor Amiga 500 and Sega MegaDrive emulation games will fail with the above error message.

 

LibreELEC/Linux Kodi games over SMB workaround

You can work around the error (in most, but not all circumstances) by mounting the SMB share in the operating system and not via Kodi.

Note: The following is written for LibreELEC 9.0. Steps may vary for other Linux distributions.

  1. Ensure that SSH is enabled in LibreELEC / you linux distribution
  2. Use SSH at the command line or Putty for Windows to SSH into the LibreELEC device
    1. Default username: root
    2. Default password: libreelec
  3. Create a new folder under the /storage/ path to serve as the mount point for your SMB share
    mkdir /storage/mysmbgames
  4. Mount the SMB path in the operating system
mount -t cifs //<FQDN or hostname>/<share name> /storage/mysmbgames -o username="<my username>",password=<my password>
e.g.mount -t cifs //mynetworkserver/GameRoms /storage/mysmbgames -o username="joebloggs",password=12345abcde
  1. In Kodi use Settings > File manager to browse to the games folder or add the new path to the Games library
  2. Play your game

 

Windows Kodi games over SMB workaround

To overcome the “Failed to play game” error on Windows, you can create a symbolic link to your SMB share via the operating system, rather than relying on Kodi to mount the SMB share.

  1. Open an elevated command prompt
  2. Enter the command to create a directory symbolic link
mklink /D <path to symlink mount point> <path to SMB share>
e.g.
mklink /D "C:\games" "\\mynetworkserver\GameRoms"
  1. A new folder will be created on c:\games that connects to your SMB share.
    Note: To remove the link, just delete the c:\games folder from the c: drive (it will not delete your games)
  2. In Kodi use Settings > File manager to browse to the games folder or add the new path to the Games library
  3. Play your game