nuxt icon indicating copy to clipboard operation
nuxt copied to clipboard

`useFetch` will be http 400 when navigate from different layout page in old browser and ios app(alipay/qq)

Open BluesYoung-web opened this issue 1 year ago • 5 comments

Environment


  • Operating System: Linux
  • Node Version: v20.9.0
  • Nuxt Version: 3.12.2
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.6
  • Package Manager: [email protected]
  • Builder: -
  • User Config: devtools, app, modules, legacy, experimental
  • Runtime Modules: [email protected]
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-tphpdd?file=nuxt.config.ts

Describe the bug

When this issue (#24229) was closed, i have try the latest version.

I'm trying to polyfill the old browser(use nuxt-vite-legacy, my old browser is android chrome 56), but found an another bug:

'when navigate to a page which use different layout, useFetch's result will be http 400; but it will be ok when i refresh the page'

And then i test in ios alipay to valid if #24229 fixed, i found http 400 occur again. so, i guess it exsists in ios qq too.

Additional context

https://github.com/nuxt/nuxt/assets/55608642/12eb5cef-5626-4ecd-8b7b-4c3872d2f4cb

my operate just like this.

Logs

No response

### Tasks

BluesYoung-web avatar Jun 17 '24 03:06 BluesYoung-web

In that case, you may need to set responseType: 'json' as one of the options to useFetch. Does that help?

danielroe avatar Jun 17 '24 10:06 danielroe

In that case, you may need to set responseType: 'json' as one of the options to useFetch. Does that help?

nop! it dosen't work, still http 400

BluesYoung-web avatar Jun 18 '24 00:06 BluesYoung-web

Is there a way to test this on a computer?

danielroe avatar Jun 19 '24 05:06 danielroe

Is there a way to test this on a computer?

I just try chrome56 on windows, it occur too.

You can download this version's chrome form here

BluesYoung-web avatar Jun 19 '24 06:06 BluesYoung-web