Uridecodebin fails in Tauri app release build, works in dev mode

I’m developing a Rust application using Tauri and gstreamer-rs. I’m encountering an issue where the application works perfectly in development mode (npm run tauri dev) but fails when I run the release build executable.

When running the release build executable, I get the following error:

"Couldn't create 'uridecodebin' element"

windows 11 latest.
GStreamer version: 1.22.10 (as reported by gst-launch-1.0 --gst-version)

GStreamer is correctly installed and functioning at the system level:

gst-launch-1.0 videotestsrc ! autovideosink works correctly, displaying a test pattern.
gst-inspect-1.0 uridecodebin returns detailed information about the element, confirming it’s properly installed.

Relevant environment variables are set:

C:\gstreamer\1.0\msvc_x86_64\bin
C:\gstreamer\1.0\msvc_x86_64\lib
C:\gstreamer\1.0\x86_64\include
GSTREAMER_1_0_ROOT_MSVC_X86_64 = C:\gstreamer\1.0\msvc_x86_64\
PKG_CONFIG_PATH includes: C:\gstreamer\1.0\msvc_x86_64\lib\pkgconfig

What could cause uridecodebin to fail in the release build but work in development mode, given that GStreamer is functioning correctly at the system level? Could this be related to how the release build is linking or loading GStreamer libraries? If so, what should I check or modify in my build process? Are there any additional debugging steps or information I should gather to help diagnose this issue?

Additional Observations

In some directories, we have .dll.a files instead of .dll files. For example:
C:\gstreamer\1.0\msvc_x86_64\lib\libgstreamer-1.0.dll.a
But of course It’s unclear if this is related to the issue or if it explains the difference in behavior between development and release modes. But I m struggling this problem couple of days and try to look everywhere to fix :slight_smile:

I installed gstreamer simply:

https://gstreamer.freedesktop.org/data/pkg/windows/1.24.6/msvc/gstreamer-1.0-devel-msvc-x86_64-1.24.6.msi

You need to install https://gstreamer.freedesktop.org/data/pkg/windows/1.24.6/msvc/gstreamer-1.0-msvc-x86_64-1.24.6.msi as well, and the tools should report version 1.24.6 then.

1 Like

thank you I forgot the mention, that I have already installed this one too sorry for the not mentioning.

But now I understand my problem (I think).
My problem is that when I was building the tauri application, I coded the build script incorrectly, which is completely my fault.

To summarize, “npm run tauri dev” works, probably because at build time gst automatically fetches everything in my PATH.
I, on the other hand, in my build script only bring those files:
“set GSTREAMER_BIN=C:\gstreamer\1.0\msvc_x86_64\bin”
As for these, and when I click on target/release/app.exe in my rust project, it finds the gst dlls in the folder but not some of them, so I get this error that appears “dynamically” in the application.

Moreover, when I do not use my own build script, but just “cargo build --release”, only ui.exe and a few onnx runtime related .rlib files are created in the release folder. When I run my application this way, it works fine (so probably it tries to find everything on path, not in this folder).
However, when I bring “set GSTREAMER_BIN=C:\gstreamer\1.0\msvc_x86_64\bin” files here through my build script, it doesn’t want to run.

So I think the problem (though I’m still not sure, I’m still running some tests) has something to do with identifying which files are being used in my application (even if it’s a bit difficult to detect with depwalker, since it appears when I press a certain place in my application).

Do you have an idea what would be an ideal way to detect which files are missing to make this thing work? As I said, this error appears in dynamically in some area of my app. (the other areas are working very well)

after several tests, I can confirm that this was the origin of the problem. In this case, I should detect which bins I need though :frowning: