tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] Mobile http request sending error

Open gato25 opened this issue 1 year ago • 0 comments

Describe the bug

when i send this from desktop its working fine

const response = await fetch(
    "https://blablabla.fly.dev/sql",
    {
        method: "POST",
        headers: {
            Accept: "application/json",
            "Content-Type": "text/plain",
        },
        body: sqlQuery,
    },
)

But when i call it on android it gives me "error sending request for url".

default capability json

{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "default",
  "description": "Capability for the main window",
  "windows": ["main"],
  "permissions": [
    "path:default",
    "event:default",
    "window:default",
    "app:default",
    "image:default",
    "resources:default",
    "menu:default",
    "tray:default",
    "shell:allow-open",
    {
      "identifier": "http:default",
      "allow": [{ "url": "https://*" }],
      "deny": [{ "url": "https://private.tauri.app" }]
    }
  ]
}

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 124.0.2478.97
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 18.16.1
    - pnpm: 9.0.4
    - npm: 9.5.1
    - bun: 1.1.7

[-] Packages
    - tauri [RUST]: 2.0.0-beta.20
    - tauri-build [RUST]: 2.0.0-beta.16
    - wry [RUST]: 0.40.0
    - tao [RUST]: 0.28.0
    - @tauri-apps/api [NPM]: 2.0.0-beta.12
    - @tauri-apps/cli [NPM]: 2.0.0-beta.18

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite

Stack trace

No response

Additional context

No response

gato25 avatar May 24 '24 09:05 gato25