Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Error: 1/0 error Operation not permitted (os error 1) on iOS #12497

Open
do-me opened this issue Jan 24, 2025 · 1 comment
Open

[bug] Error: 1/0 error Operation not permitted (os error 1) on iOS #12497

do-me opened this issue Jan 24, 2025 · 1 comment
Labels
platform: iOS status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@do-me
Copy link

do-me commented Jan 24, 2025

Describe the bug

Trying to generate embeddings with embedanything in the Rust backend. Works fine on MacOS, throws

Error: 1/0 error Operation not permitted (os error 1)

on iOS.

Image

Reproduction

Test repo with instructions: https://github.com/do-me/tauri-embedanything-ios/tree/main

Expected behavior

All permissions are given, so it's supposed to work.

Full tauri info output

cargo tauri info

[✔] Environment
    - OS: Mac OS 15.1.1 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.86.0-nightly (419b3e2d3 2025-01-15)
    ✔ cargo: 1.86.0-nightly (088d49608 2025-01-10)
    ✔ rustup: 1.27.1 (2024-04-24)
    ✔ Rust toolchain: nightly-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.10.0
    - npm: 10.2.3
    - deno: deno 2.1.6

[-] Packages
    - tauri 🦀: 2.1.1
    - tauri-build 🦀: 2.0.3
    - wry 🦀: 0.47.2
    - tao 🦀: 0.30.8
    - tauri-cli 🦀: 2.2.4

[-] Plugins
    - tauri-plugin-log 🦀: 2.2.0
    - tauri-plugin-os 🦀: 2.2.0
    - tauri-plugin-http 🦀: 2.2.0
    - tauri-plugin-opener 🦀: 2.2.5
    - tauri-plugin-fs 🦀: 2.2.0

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../src-www
    - devUrl: http://0.0.0.0:3000/

[-] iOS
    - Developer Teams: Dominik .... (ID: ...)

Stack trace

App installed:
• bundleID: app.somethin.ggggg
• installationURL: file:///private/var/containers/Bundle/Application/70694BF9-C4BE-4A64-BC7D-10FBB3836550/Offline%20OSM.app/
• launchServicesIdentifier: unknown
• databaseUUID: A409327F-6C64-4235-A282-608D7112A156
• databaseSequenceNumber: 2964
• options: 
23:44:20  Enabling developer disk image services.
23:44:20  Acquired usage assertion.
Launched application with app.somethin.ggggg bundle identifier.
    Info Watching /Users/dome/work/general/tauri/tauri-offline-maps/src-tauri for changes...
[connected]

Additional context

No response

@do-me
Copy link
Author

do-me commented Jan 25, 2025

Very likely related: #8843 (comment)

Embedanything downloads the model at first use and saves it somewhere. I feel that for some reason this cached model cannot be accessed. I tried adding all possible permissions and security entries but no success, still get the same error:

tauri.config.json

    "security": {
      "assetProtocol": {
        "enable": true,
        "scope": {
          "allow": [
            "$APPDATA/**",
            "$APPCACHE/**",
            "$APPCONFIG/**",
            "$APPLOCALDATA/**",
            "$APPLOG/**",
            "$AUDIO/**",
            "$CACHE/**",
            "$CONFIG/**",
            "$DATA/**",
            "$DESKTOP/**",
            "$DOCUMENT/**",
            "$DOWNLOAD/**",
            "$EXECUTABLE/**",
            "$FONT/**",
            "$HOME/**",
            "$LOCALDATA/**",
            "$PICTURE/**",
            "$PUBLIC/**",
            "$RESOURCE/**",
            "$RUNTIME/**",
            "$TEMP/**",
            "$TEMPLATE/**",
            "$VIDEO/**"
          ]
        }
      },
      "csp": null,
      "dangerousDisableAssetCspModification": false,
      "freezePrototype": false,
      "pattern": {
        "use": "brownfield"
      }
    }

capabilities/default.json

{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "default",
  "description": "enables the default permissions",
  "windows": [
    "main"
  ],
  "permissions": [
    "core:default",
    "opener:default",
    "fs:allow-read-text-file",
    "fs:allow-resource-read-recursive",
    "fs:default",
    "fs:allow-read-file",
    "fs:allow-write-file",
    "fs:allow-read-dir",
    "fs:allow-copy-file",
    "fs:allow-mkdir",
    "fs:allow-remove",
    "fs:allow-rename",
    "fs:allow-exists",
    "core:window:allow-set-resizable",
    "core:window:allow-maximize",
    "core:window:allow-unmaximize",
    "core:window:allow-set-size",
    "core:window:allow-set-min-size",
    "log:default",
    "fs:create-app-specific-dirs",
    "fs:read-app-specific-dirs-recursive",
    "fs:allow-appcache-meta",
    "fs:allow-appcache-meta-recursive",
    "fs:allow-appcache-read",
    "fs:allow-appcache-read-recursive",
    "fs:allow-appcache-write",
    "fs:allow-appcache-write-recursive",
    {
      "identifier": "fs:allow-write-file",
      "allow": [
        {
          "path": "$APPDATA/**/*"
        }
      ]
    },
    "fs:read-files",
    "fs:read-dirs",
    {
      "identifier": "fs:scope",
      "allow": [
        {
          "path": "**"
        },
        {
          "path": "$APPDATA/**/*"
        },
        {
          "path": "$APPDATA/**/.*"
        }
      ]
    },
    "os:allow-platform",
    {
      "identifier": "http:default",
      "allow": [
        {"url": "https://*" },
        {"url": "http://localhost:3000" },
        {"url": "http://0.0.0.0:3000" },
        {"url": "https://bpev.me" }
      ]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: iOS status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants