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?

Open
#2,273 1 comment 0 reactions 0 assignees View on GitHub
platform: macos plugin: process plugin: updater type: bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.