Unexpected Failure while importing Wave files with de MGPipelineTool

Hello guys!

I decided to stop dev on Windows and work on Linux ( Pop!_Os) and I am actually using Visual studio Code for my project.

My problem appears when I try to execute my program. “error : Importer ‘WavImporter’ had unexpected failure” which is actually weird since he was able to build without any problems.

I really would appreciate if someone could help me to deal with this. I saw on forums that it could be a right issue but even after giving full rights to all the folder and subfolders it seems to still not work. Here is the full error :
> Microsoft ® Build Engine version 15.7.177.53362 for .NET Core
> Copyright © Microsoft Corporation. All rights reserved.

>   Restore completed in 29.24 ms for /home/lufen/Documents/Monogame/Plateformer/Plateformer.csproj.
>   Skipping /home/lufen/Documents/Monogame/Plateformer/Content/BackGroundMenu.jpg
>   Skipping /home/lufen/Documents/Monogame/Plateformer/Content/Button.png
>   Skipping /home/lufen/Documents/Monogame/Plateformer/Content/player2.png
>   Skipping /home/lufen/Documents/Monogame/Plateformer/Content/mainfont.spritefont
>   Skipping /home/lufen/Documents/Monogame/Plateformer/Content/texte.spritefont
>   /home/lufen/Documents/Monogame/Plateformer/Content/click.wav
> /home/lufen/Documents/Monogame/Plateformer/Content/click.wav : error : Importer 'WavImporter' had unexpected failure! [/home/lufen/Documents/Monogame/Plateformer/Plateformer.csproj]
>   Microsoft.Xna.Framework.Content.Pipeline.InvalidContentException: Failed to open file click. Ensure the file is a valid audio file and is not DRM protected. ---> System.ComponentModel.Win32Exception: ApplicationName='/home/lufen/.nuget/packages/monogame.content.builder/3.7.0.4/build/MGCB/build/ffprobe', CommandLine='-i "/home/lufen/Documents/Monogame/Plateformer/Content/click.wav" -show_format -show_entries streams -v quiet -of flat', CurrentDirectory='', Native error= Access denied
>     at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x002dc] in <2740d7148e184840ad6689888c90a56d>:0
>     at System.Diagnostics.Process.Start () [0x0003a] in <2740d7148e184840ad6689888c90a56d>:0
>     at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
>     at Microsoft.Xna.Framework.Content.Pipeline.ExternalTool.Run (System.String command, System.String arguments, System.String& stdout, System.String& stderr, System.String stdin) [0x000a5] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at Microsoft.Xna.Framework.Content.Pipeline.Audio.DefaultAudioProfile.ProbeFormat (System.String sourceFile, Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioFileType& audioFileType, Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioFormat& audioFormat, System.TimeSpan& duration, System.Int32& loopStart, System.Int32& loopLength) [0x00010] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioContent..ctor (System.String audioFileName, Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioFileType audioFileType) [0x00015] in <21694ce2bd7a4add8c34ca22998e7694>:0
>      --- End of inner exception stack trace ---
>     at Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioContent..ctor (System.String audioFileName, Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioFileType audioFileType) [0x0023b] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at Microsoft.Xna.Framework.Content.Pipeline.WavImporter.Import (System.String filename, Microsoft.Xna.Framework.Content.Pipeline.ContentImporterContext context) [0x0003f] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1[T].Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import (System.String filename, Microsoft.Xna.Framework.Content.Pipeline.ContentImporterContext context) [0x0001c] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent (MonoGame.Framework.Content.Pipeline.Builder.PipelineBuildEvent pipelineEvent) [0x00079] in <21694ce2bd7a4add8c34ca22998e7694>:0
>   /home/lufen/Documents/Monogame/Plateformer/Content/load.wav
> /home/lufen/Documents/Monogame/Plateformer/Content/load.wav : error : Importer 'WavImporter' had unexpected failure! [/home/lufen/Documents/Monogame/Plateformer/Plateformer.csproj]
>   Microsoft.Xna.Framework.Content.Pipeline.InvalidContentException: Failed to open file load. Ensure the file is a valid audio file and is not DRM protected. ---> System.ComponentModel.Win32Exception: ApplicationName='/home/lufen/.nuget/packages/monogame.content.builder/3.7.0.4/build/MGCB/build/ffprobe', CommandLine='-i "/home/lufen/Documents/Monogame/Plateformer/Content/load.wav" -show_format -show_entries streams -v quiet -of flat', CurrentDirectory='', Native error= Access denied
>     at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x002dc] in <2740d7148e184840ad6689888c90a56d>:0
>     at System.Diagnostics.Process.Start () [0x0003a] in <2740d7148e184840ad6689888c90a56d>:0
>     at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
>     at Microsoft.Xna.Framework.Content.Pipeline.ExternalTool.Run (System.String command, System.String arguments, System.String& stdout, System.String& stderr, System.String stdin) [0x000a5] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at Microsoft.Xna.Framework.Content.Pipeline.Audio.DefaultAudioProfile.ProbeFormat (System.String sourceFile, Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioFileType& audioFileType, Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioFormat& audioFormat, System.TimeSpan& duration, System.Int32& loopStart, System.Int32& loopLength) [0x00010] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioContent..ctor (System.String audioFileName, Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioFileType audioFileType) [0x00015] in <21694ce2bd7a4add8c34ca22998e7694>:0
>      --- End of inner exception stack trace ---
>     at Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioContent..ctor (System.String audioFileName, Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioFileType audioFileType) [0x0023b] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at Microsoft.Xna.Framework.Content.Pipeline.WavImporter.Import (System.String filename, Microsoft.Xna.Framework.Content.Pipeline.ContentImporterContext context) [0x0003f] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1[T].Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import (System.String filename, Microsoft.Xna.Framework.Content.Pipeline.ContentImporterContext context) [0x0001c] in <21694ce2bd7a4add8c34ca22998e7694>:0
>     at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent (MonoGame.Framework.Content.Pipeline.Builder.PipelineBuildEvent pipelineEvent) [0x00079] in <21694ce2bd7a4add8c34ca22998e7694>:0
> /home/lufen/.nuget/packages/monogame.content.builder/3.7.0.4/build/MonoGame.Content.Builder.targets(92,5): error MSB3073: The command "/usr/bin/mono "/home/lufen/.nuget/packages/monogame.content.builder/3.7.0.4/build/MGCB/build/MGCB.exe" /@:"/home/lufen/Documents/Monogame/Plateformer/Content/Content.mgcb" /platform:DesktopGL /quiet /outputDir:"bin/DesktopGL/Content" /intermediateDir:"obj/DesktopGL/Content"" exited with code 2. [/home/lufen/Documents/Monogame/Plateformer/Plateformer.csproj]

> Build FAILED.

> /home/lufen/Documents/Monogame/Plateformer/Content/click.wav : error : Importer 'WavImporter' had unexpected failure! [/home/lufen/Documents/Monogame/Plateformer/Plateformer.csproj]
> /home/lufen/Documents/Monogame/Plateformer/Content/load.wav : error : Importer 'WavImporter' had unexpected failure! [/home/lufen/Documents/Monogame/Plateformer/Plateformer.csproj]
> /home/lufen/.nuget/packages/monogame.content.builder/3.7.0.4/build/MonoGame.Content.Builder.targets(92,5): error MSB3073: The command "/usr/bin/mono "/home/lufen/.nuget/packages/monogame.content.builder/3.7.0.4/build/MGCB/build/MGCB.exe" /@:"/home/lufen/Documents/Monogame/Plateformer/Content/Content.mgcb" /platform:DesktopGL /quiet /outputDir:"bin/DesktopGL/Content" /intermediateDir:"obj/DesktopGL/Content"" exited with code 2. [/home/lufen/Documents/Monogame/Plateformer/Plateformer.csproj]
>     0 Warning(s)
>     3 Error(s)

> Time Elapsed 00:00:00.93`indent preformatted text by 4 spaces`

Thanks in advance for your precious help :smile:

It really blocks only with Sound files.

hmmm, try doing:

chmod +x /home/lufen/.nuget/packages/monogame.content.builder/3.7.0.4/build/MGCB/build/ffprobe

You’ll probably need to do the following command as well:

chmod +x /home/lufen/.nuget/packages/monogame.content.builder/3.7.0.4/build/MGCB/build/ffmpeg

Hello, thanks a MILLION for your answer! Even after the command I keep having the same error but the difference is that if I press “Debog anyway” my game shows up (without the sound / music sadly)

Edit : I didn’t saw the second command line. Thanks, I don’t have the error anymore but now the whole game dissapeared and I have only a blue screen like my code has been ignored lol :frowning:

Edit 2 : Problem solved It was a misconfiguration of mine, thanks a lot ! I swear if you was here I’ll pay you a beer !

I’ve run into to the same problem, but I don’t know how I can execute the command.
Do I have to type it in the windows command line or somewhere else?
Here is the error im getting:

  C:/Users/me/Documents/Projects/MyGame/MyGame/Content/Click.wav
        C:/Users/me/Documents/Projects/MyGame/MyGame/Content/Click.wav : error : Importer 'WavImporter' had unexpected failure!
        Microsoft.Xna.Framework.Content.Pipeline.InvalidContentException: Failed to open file Click. Ensure the file is a valid audio file and is not DRM protected. ---> System.InvalidOperationException: ffprobe exited with non-zero exit code.
           at Microsoft.Xna.Framework.Content.Pipeline.Audio.DefaultAudioProfile.ProbeFormat(String sourceFile, AudioFileType& audioFileType, AudioFormat& audioFormat, TimeSpan& duration, Int32& loopStart, Int32& loopLength)
           at Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioContent..ctor(String audioFileName, AudioFileType audioFileType)
           --- End of inner exception stack trace ---
           at Microsoft.Xna.Framework.Content.Pipeline.Audio.AudioContent..ctor(String audioFileName, AudioFileType audioFileType)
           at Microsoft.Xna.Framework.Content.Pipeline.WavImporter.Import(String filename, ContentImporterContext context)
           at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
           at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent pipelineEvent)
    [...]
    C:/Users/me/Documents/Projects/MyGame/MyGame/Content/Click.wav : error : Importer 'WavImporter' had unexpected failure!
    C:\Program Files (x86)\MSBuild\MonoGame\v3.0\MonoGame.Content.Builder.targets(90,5): error MSB3073: The command ""C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe" /@:"C:\Users\me\Documents\Projects\MyGame\MyGame\Content\Content.mgcb" /platform:Windows /outputDir:"C:\Users\me\Documents\Projects\MyGame\MyGame\Content\bin\Windows" /intermediateDir:"C:\Users\me\Documents\Projects\MyGame\MyGame\Content\obj\Windows" /quiet" exited with code 7.