tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
81.59k stars 2.44k forks source link

[bug] Property dangerousRemoteDomainIpcAccess is not allowed #7517

Open trookie2000 opened 1 year ago

trookie2000 commented 1 year ago

Describe the bug

This is my security configuration in tauri.conf.json "security": { "dangerousDisableAssetCspModification":true, "csp":null, "freezePrototype": true, "dangerousRemoteDomainIpcAccess": [ { "domain": "tauri.localhost", "windows": ["main"] } ]

},

but But doesn't seem to recognize this configuration, There are wavy lines under the dangerousRemoteDomainIpcAccess configuration,resulting in an error in the operation. error:Uncaught (in promise) Scope not defined for URL file:///D:/code/rust/discoRobot/src/components/login.html. See https://tauri.app/v1/api/config/#securityconfig.dangerousremotedomainipcaccess and https://docs.rs/tauri/1/tauri/scope/struct.IpcScope.html#method.configure_remote_access

Reproduction

No response

Expected behavior

No response

Platform and versions

[✔] Environment
    - OS: Mac OS 12.6.3 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.69.0 (84c898d65 2023-04-16)
    ✔ Cargo: 1.69.0 (6e9a83356 2023-04-12)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 19.9.0
    - pnpm: 7.27.0
    - yarn: 1.22.19
    - npm: 9.6.3

[-] Packages
    - tauri [RUST]: 2.0.0-alpha.9
    - tauri-build [RUST]: no manifest (2.0.0-alpha.5, 2.0.0-alpha.5)
    - wry [RUST]: 0.28.3
    - tao [RUST]: 0.19.1
    - @tauri-apps/api [NPM]: not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.9

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/

Stack trace

No response

Additional context

No response

FabianLars commented 1 year ago

if it wouldn't accept the config the app would fail to compile.

The error you posted is probably also unrelated to the error. file:// urls in tauri apps are pretty rare.

I don't think we can proceed here without a minimal reproduction example to be honest.