tauri-apps / tauri-apps/plugins-workspace
[question] When calling the relaunch method of the plugin-process, I encounter the error “Operation not permitted (os error 1).” Could you help me find a solution?
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 602
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 9
Description
```json
// src-tauri/capabilities/main.json
{
// ...
"updater:default",
"updater:allow-check",
"updater:allow-download",
"updater:allow-install",
"updater:allow-download-and-install",
"process:default",
"process:allow-restart",
"dialog:default"
}
```
```typescript
import { ask } from '@tauri-apps/plugin-dialog';
import { relaunch } from '@tauri-apps/plugin-process';
import { check } from '@tauri-apps/plugin-updater';
export async function checkForAppUpdates() {
const update = await check();
if (update?.available) {
const yes = await ask(
`
Update to ${update.version} is available!
Release notes: ${update.body}
`,
{
title: 'Update Now!',
kind: 'info',
okLabel: 'Update',
cancelLabel: 'Cancel'
}
);
if (yes) {
await update.downloadAndInstall();
await relaunch();
}
}
}
//...
useEffect(() => {
(async () => {
await checkForAppUpdates();
})();
}, []);
```
```json
// tauri.conf.json
{
"build": {
"beforeBuildCommand": "yarn build",
"beforeDevCommand": "yarn dev",
"frontendDist": "../out",
"devUrl": "http://localhost:3000"
},
"bundle": {
"active": true,
"category": "DeveloperTool",
"icon": ["icons/icon.icns", "icons/icon.png"],
"macOS": {
"entitlements": "./entitlements.plist",
"signingIdentity": "Developer ID Application"
},
"createUpdaterArtifacts": true
},
"plugins": {
"updater": {
"windows": {
"installMode": "passive"
},
"pubkey": "~~~",
"endpoints": ["~~~"]
}
}
}
```
When I call the relaunch method, I get the error “Operation not permitted (os error 1).” I believe I’ve configured everything correctly, but I’m wondering how I can resolve this issue.
Contributor guide
Assessment
This issue has not been assessed yet.