I have a question for Tauri Linux release, it doesn't seem to run std Command. May it be the PATH for AppImage? dev run goes fine. I am running yt-dlp command.
https://github.com/vladimir-sama/murder-player/blob/main/src-tauri/src/lib.rs
#STD Command does not work in Linux release
43 messages · Page 1 of 1 (latest)
Are there any logs / any printing from the function when it's called?
And is it possible to test with another command what happens, e.g. a basic echo?
I am kinda new, running the release in terminal doesn't display anything. Is there debug logs?
There's probably a better way of doing this but there's code which hides the terminal from appearing. If you temporarily comment that out you might be able to see that terminal and the logs
That sounds better, how is that?
Are you asking where the code is?
Yeah I guess
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] ?
Yes. You can also perhaps just get a debug release build, but commenting that out temporarily also hopefully works
What is the command for debug production build? npm run tauri build .. ?
npm run tauri build -- --debug
I'm not sure if this causes the logs to come up by default or not (without un commenting that line)
There's also this in the notes:
You can also run a built app from the terminal, giving you the Rust compiler notes (in case of errors) or your println messages. Browse to the file src-tauri/target/(release|debug)/[app name] and run it in directly in your console or double-click the executable itself in the filesystem (note: the console closes on errors with this method).
So I assume you don't have to comment anything out, just do the debug build and launch the app from console
Refused to execute a script for an inline event handler because 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy. in Inspect
This isn't the case in dev mode?
No, it works fine
So is that what's causing the issue, that that specific script gets blocked?
Confirmed npm run tauri dev has no errors
Somehow it seems I have to allow unsafe-inline after a Google search, if it's possible
I'm a bit sceptical of doing this but it depends if that's what you actually want. Is the error appearing in the console or in developer tools?
I'd assume devtools console
I think the best thing to do is to try and not put the scripts inline
I just need minimal changes, I'd prefer that
It's true but I think the usual security practices either include some form of CSP protection for inline code or not using it at all
I guess do either way but it's easy to forget when you modify the csp etc and can forget to revert later if you want to improve security practices
How can I?
To modify the csp or not put the code inline?
https://github.com/tauri-apps/tauri/issues/3583 says you can, but I cannot find how
The csp
So Content-Security-Policy: script-src 'unsafe-inline'; how do I add it?
It says http, I'm confused
In the tauri.conf.json it goes?
Yes, for script-src (depending how your conf looks), but honestly it's not recommended to do inline by all the guides and might be easier to just move it to another file
"security": {
"csp": "default-src: 'self'; media-src: *; Content-Security-Policy: script-src 'unsafe-inline';"
}
?
Don't think you need content-security-policy in front
I test it, brb
Imma sleep now but ping me if that doesn't work