plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

http fetch freezes in POST fetch, cannot get more logs

Open cardo-podcast opened this issue 8 months ago • 1 comments

Hi, I'm updating my app from Tauri v1 to v2 and this statement is resulting in a freeze during the fetch action, cannot get more log info.

import { fetch } from '@tauri-apps/plugin-http'

  const r = await fetch(baseUrl + '/index.php/login/v2', {
    method: 'POST',
  })

This line hasn't changed since the app versiong using Tauri v1. Other post fetches inside the app seems to work with Tauri v2.

This is my tauri info output:

[✔] Environment
    - OS: Windows 10.0.22631 x86_64 (X64)
    ✔ WebView2: 134.0.3124.93
    ✔ MSVC:
        - Visual Studio Build Tools 2019
        - Visual Studio Build Tools 2022
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.12.2
    - pnpm: 9.11.0
    - yarn: 1.22.22
    - npm: 10.2.4
    - bun: 1.1.29
        Info GET https://docs.rs/crate/tauri-cli/
        Info Request { method: GET, uri: https://docs.rs/crate/tauri-cli/, version: HTTP/1.1, headers: {"accept-encoding": "gzip", "user-agent": "ureq/3.0.2", "accept": "*/*", "host": "docs.rs"} }
        Info Response { status: 308, version: HTTP/1.1, headers: {"content-length": "0", "connection": "keep-alive", "server": "nginx/1.14.0 (Ubuntu)", "date": "Tue, 01 Apr 2025 18:48:24 GMT", "location": "/crate/tauri-cli", "<NOTICE>": "7 HEADERS ARE REDACTED"} }
        Info Redirect (308 Permanent Redirect): GET https://docs.rs/crate/tauri-cli
        Info GET https://docs.rs/crate/tauri-cli
        Info Request { method: GET, uri: https://docs.rs/crate/tauri-cli, version: HTTP/1.1, headers: {"accept-encoding": "gzip", "user-agent": "ureq/3.0.2", "accept": "*/*", "host": "docs.rs"} }
        Info Response { status: 302, version: HTTP/1.1, headers: {"content-length": "0", "connection": "keep-alive", "server": "nginx/1.14.0 (Ubuntu)", "date": "Tue, 01 Apr 2025 18:48:24 GMT", "location": "/crate/tauri-cli/latest", "<NOTICE>": "6 HEADERS ARE REDACTED"} }
        Info Redirect (302 Found): GET https://docs.rs/crate/tauri-cli/latest
        Info GET https://docs.rs/crate/tauri-cli/latest
        Info Request { method: GET, uri: https://docs.rs/crate/tauri-cli/latest, version: HTTP/1.1, headers: {"accept-encoding": "gzip", "user-agent": "ureq/3.0.2", "accept": "*/*", "host": "docs.rs"} }
        Info Response { status: 200, version: HTTP/1.1, headers: {"content-type": "text/html; charset=utf-8", "content-length": "101780", "connection": "keep-alive", "server": "nginx/1.14.0 (Ubuntu)", "date": "Tue, 01 Apr 2025 18:48:24 GMT", "<NOTICE>": "7 HEADERS ARE REDACTED"} }

[-] Packages
    - tauri 🦀: 2.4.1
    - tauri-build 🦀: 2.1.1
    - wry 🦀: 0.50.5
    - tao 🦀: 0.32.8
    - tauri-cli 🦀: 2.0.0-rc.16
    - @tauri-apps/api : 2.4.0 (outdated, latest: 2.4.1)
    - @tauri-apps/cli : 2.4.0 (outdated, latest: 2.4.1)

[-] Plugins
    - tauri-plugin-updater 🦀: 2.6.1
    - @tauri-apps/plugin-updater : 2.6.1
    - tauri-plugin-shell 🦀: 2.2.0
    - @tauri-apps/plugin-shell : 2.2.0
    - tauri-plugin-single-instance 🦀: 2.2.2
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-sql 🦀: 2.2.0
    - @tauri-apps/plugin-sql : 2.2.0
    - tauri-plugin-fs 🦀: 2.2.0
    - @tauri-apps/plugin-fs : 2.2.0
    - tauri-plugin-log 🦀: 2.3.1
    - @tauri-apps/plugin-log : 2.3.1
    - tauri-plugin-os 🦀: 2.2.1
    - @tauri-apps/plugin-os : 2.2.1
    - tauri-plugin-http 🦀: 2.4.2
    - @tauri-apps/plugin-http : 2.4.2
    - tauri-plugin-process 🦀: 2.2.0
    - @tauri-apps/plugin-process : 2.2.0

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

cardo-podcast avatar Apr 01 '25 18:04 cardo-podcast

@cardo-podcast I was facing a similar issue but with a request using GET method on a public exposed API: updating all my outdated tauri packages solved the problem.

d9c4 avatar Apr 21 '25 09:04 d9c4