-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
platform: macOSstatus: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuestype: bug
Description
Describe the bug
trigger error when using api fs.readTextFile in production mode.
Reproduction
- set
tauri.conf.json
"tauri": {
"allowlist": {
"all": true,
"fs": {
"scope": ["$RESOURCE/*"]
}
}
}
- use api
import {
readTextFile,
} from "@tauri-apps/api/fs";
async fucntion fun(){
const contents = await readTextFile(localConfigPath);
}- build app
pnpm tauri build --debug
- install app
- run app
Expected behavior
readTextFile success.
Platform and versions
Environment
› OS: Mac OS 12.5.1 X64
› Node.js: 16.13.2
› npm: 8.1.2
› pnpm: 7.10.0
› yarn: 1.22.18
› rustup: 1.25.1
› rustc: 1.63.0
› cargo: 1.63.0
› Rust toolchain: stable-x86_64-apple-darwin
Packages
› @tauri-apps/cli [NPM]: 1.0.5
› @tauri-apps/api [NPM]: 1.0.2
› tauri [RUST]: 1.0.5,
› tauri-build [RUST]: 1.0.4,
› tao [RUST]: 0.12.2,
› wry [RUST]: 0.19.0,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
App directory structure
├─ dist
├─ node_modules
├─ public
├─ src-tauri
├─ .git
├─ .vscode
└─ src
Stack trace
No response
Additional context
It only throw error in production mode, work on dev mod
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
platform: macOSstatus: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuestype: bug
