Network Plugin can't parse UTF8 characters and can't decode images properly
See original GitHub issue🐛 Bug Report
Network Plugin can’t parse UTF8 characters and can’t decode images properly.
To Reproduce
1.Test Link:
2.Test Code(React Native):
fetchData = () => {
fetch('https://ex.ke.com/sdk/recommend/html/100001314?hdicCityId=110000¶mMap[source]=&id=100001314&mediumId=100000037&elementId=&resblockId=1111027381003&templateConfig=%5Bobject%20Object%5D&fbExpoId=346620976471638017&fbQueryId=&required400=true&unique=1111027381003&parentSceneId=')
}
render() {
return (
<TouchableOpacity onPress={this.fetchData}>
<View></View>
</TouchableOpacity>
)
}
3.Flipper Network Plugin parse result(Error)
4. Browser parse result(correctly)
5.image displays
Version 0.51 decodes and displays images correctly, version 0.52 shows (empty).Sometimes images are decoded into String
in the absence of content-type
0.51 ⬇️
0.52 ⬇️
0.52 image decode into string ⬇️
Environment
iPhone11 iOS 13.3 macOS Mojave 10.14.5 Flipper 0.52.1 react-native 0.62.2 npm 6.14.1 node 13.12.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:8 (3 by maintainers)
Top Results From Across the Web
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c
I have a socket server that is supposed to receive UTF-8 valid characters from clients. The problem is ...
Read more >utf8_decode - Manual - PHP
This function converts the string string from the UTF-8 encoding to ISO-8859-1 . Bytes in the string which are not valid UTF-8 ,...
Read more >Solving Unicode Problems in Python 2.7 - Azavea
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position ... is that the UTF-8 encoding can represent every Unicode character, ...
Read more >Unicode & Character Encodings in Python: A Painless Guide
In this tutorial, you'll get a Python-centric introduction to character encodings and unicode. Handling character encodings and numbering systems can at ...
Read more >A Guide to UTF-8 Encoding in PHP and MySQL - Toptal
While this change will ensure that PHP always outputs UTF-8 as the character encoding (in browser response Content-type headers), you still need to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have written a minimal backend with Python Flask to retrieve the same issue in my Android device.
Test API code: https://gist.github.com/yaoandy107/1dc0daf2071aed0448e39100145b1ec3
Flipper ver: 0.57.0 Android ver: 11 & 9 OkHttp: 4.9.0
Image display will be fixed in next weeks release, that is a separate issue.
Looked a bit further in the charset issue, it seems to occur on iOS only but is correct on Android (screenshot). So I suspect it is an issue on the client, not in Flipper desktop.
Edit: difference is that Android sends the gzipped response, but iOS unpacked. Will investigate further