fix: compatible with qq browser on ios, close #294
๐ Linked issue
#294
nuxt/nuxt/issues/25956
nuxt/nuxt/issues/24229
โ Type of change
- [ ] ๐ Documentation (updates to the documentation, readme, or JSdoc annotations)
- [x] ๐ Bug fix (a non-breaking change that fixes an issue)
- [ ] ๐ Enhancement (improving an existing functionality like performance)
- [ ] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
This doesn't look perfect, but after manual testing, everything runs smoothly and there are no break change.
The reason may be that the core used by these browsers has not yet implemented response.body ๐คฃ
๐ Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 59.30%. Comparing base (
244fb6a) to head (6da36df). Report is 54 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #366 +/- ##
==========================================
+ Coverage 56.86% 59.30% +2.43%
==========================================
Files 16 16
Lines 728 747 +19
Branches 113 162 +49
==========================================
+ Hits 414 443 +29
+ Misses 303 293 -10
Partials 11 11
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for the PR. I would love to have further investigation before merging this (otherwise ofetch ends up with lots of old browser compatibility fixes)
Do you mind to make a minimal testing environment (html+js) and share the browser version/platform required to verify.
Dear @pi0๏ผI apologize, but I am unable to provide a reproducible test case.
On one hand, it only occurs in the QQ Browser on iOS, and I am not very clear about the WebKit version being used (my phone is running iOS 17).ย
Also, I am not very familiar with testing on old browsers, so I apologize for not being able to provide a shareable test environment. ๐ญ
Okay, no worries. I will try to assemble a reproduction env once could but it is essential before we can move it forward I hope it is reasonable.
Okay, no worries. I will try to assemble a reproduction env once could but it is essential before we can move it forward I hope it is reasonable.
Thank you ๐ฅฐ
So has this problem been resolved? I've been waiting for the new version ๐
If someone doesn't have high stability requirements, they can use this module โ markthree/nuxt-fix-ofetch
Seems to be fixed in the latest QQ browser @markthree can you confirm?
https://github.com/unjs/ofetch/issues/294#issuecomment-2167757063
Seems to be fixed in the latest QQ browser @markthree can you confirm?
Yes, the problem still exists, it's a problem with ofetch, and it can be reproduced when using it solely
From @xjccc comment:
now.. QQ version: 15.1.6.5925 UC version: 16.5.5.2341 works fine
But you have issue with these versions and ofetch?
From @xjccc comment:
now.. QQ version: 15.1.6.5925 UC version: 16.5.5.2341 works fine
But you have issue with these versions and ofetch?
yes, QQ Browser version: 15.1.7
Thanks to the onResponse option, I'm now using it to hack in my production environment, and so far I've found no problems! ๐คฃ
ref โ nuxt-fix-ofetch/src/runtime/00.fetch.client.ts#L52-#L86
I upgrade my QQ Browser version: 15.1.7.5928
iOS version: 17.5.1
- Operating System: Darwin
- Node Version: v20.10.0
- Nuxt Version: 3.12.2
- CLI Version: 3.12.0
- Nitro Version: 2.9.6
- Package Manager: [email protected]
my web site works fine..
Hi dear @markthree Again sorry this took long.
We have merged a relative fix in https://github.com/unjs/ofetch/pull/398 that passes _bodyInit directly as _data.
I think we might add an improvement to check if body is blob, use .stream()