Comments (4)
Please provide a minimal reproduction, as I can't seem to be able to reproduce. Also make sure your JS packages are up to date.
from tauri.
So I tried updating JS packages and checked my Crates which didn't change a thing but updating my build.rs to not apply my windows attributes let it load. The new issue is that my app requires elevated permission to function.
Here is my build.rs
fn main() {
let mut windows = tauri_build::WindowsAttributes::new();
let manifest = include_str!("manifest.xml");
windows = windows.app_manifest(
manifest
);
let attrs = tauri_build::Attributes::new()
.windows_attributes(windows);
tauri_build::try_build(attrs).expect("failed to run build script");
}
And manifest.xml
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Just by tinkering around with it only when I commented out the
.windows_attributes() line from when I create the attributes fixed it which proves the issue is with either the manifest or how I am creating the attributes (although the manifest was straight from tauri docs)
from tauri.
Since you mentioned the dialog, it seems like you skipped over the warning here: https://docs.rs/tauri-build/latest/tauri_build/struct.WindowsAttributes.html#warning so your manifest should look more like this
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
If it's not that, then it probably doesn't like that it requires admin in dev mode - maybe try running tauri dev
in an admin terminal then (not a general recommendation of course - running stuff in admin terminals is pretty meh)
from tauri.
Since you mentioned the dialog, it seems like you skipped over the warning here: https://docs.rs/tauri-build/latest/tauri_build/struct.WindowsAttributes.html#warning so your manifest should look more like this
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> </requestedPrivileges> </security> </trustInfo> </assembly>
If it's not that, then it probably doesn't like that it requires admin in dev mode - maybe try running
tauri dev
in an admin terminal then (not a general recommendation of course - running stuff in admin terminals is pretty meh)
Yeah that seemed to fix it, Thank you!
from tauri.
Related Issues (20)
- [bug] error: linking with cc failed: exit status: 1 on fedora
- [feat] automatically create tasks.json HOT 2
- [bug] [v2] undo and redo shortcuts don't work in popular editor on MacOS HOT 1
- [bug] it is too easy to have a js plugin lib on one version and rust on another HOT 1
- [bug] [v2] trayIcon set_visible(true) method is not working HOT 3
- [feat] Is there a way to allow window.open() on the front end? HOT 1
- [feat] Support transparent webviews on mobile HOT 2
- [bug] `tauri dev` cannot find binary path when `default-run` changed
- [bug] Setting windows manifest returns "duplicate resource". HOT 1
- [bug] Inconsistent render order HOT 1
- [bug]
- [feat] Catch tauri errors HOT 11
- [feat] `AppHandle::restart` should be diverging function (`-> !`)
- [bug] Build AppImage cannot display images in Tauri v1 HOT 2
- [bug] TaskDialogIndirect issue when building Windows cross platform HOT 2
- [bug] [v2] Drop Events are not window specific HOT 6
- [bug] can't compile tauri for development HOT 9
- [bug] CSS randomly applied using Sveltekit + Tauri (v1 and v2) HOT 1
- [bug] HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tauri.