Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Crash if the response contains the emoji πŸ˜ͺ #1980

Closed
oscarshaitan opened this issue Sep 22, 2023 · 4 comments
Closed

Web Crash if the response contains the emoji πŸ˜ͺ #1980

oscarshaitan opened this issue Sep 22, 2023 · 4 comments

Comments

@oscarshaitan
Copy link

Package

dio

Version

5.3.3

Operating-System

Web

Output of flutter doctor -v

[βœ“] Flutter (Channel stable, 3.13.0, on macOS 13.5.2 22G91 darwin-arm64 (Rosetta), locale en-GB)
    β€’ Flutter version 3.13.0 on channel stable at /Users/oscartigreros/flutter
    β€’ Upstream repository https://github.com/flutter/flutter.git
    β€’ Framework revision efbf63d9c6 (5 weeks ago), 2023-08-15 21:05:06 -0500
    β€’ Engine revision 1ac611c64e
    β€’ Dart version 3.1.0
    β€’ DevTools version 2.25.0

[βœ“] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    β€’ Android SDK at /Users/oscartigreros/Library/Android/sdk
    β€’ Platform android-33, build-tools 33.0.1
    β€’ Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    β€’ Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    β€’ All Android licenses accepted.

[βœ“] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    β€’ Xcode at /Applications/Xcode.app/Contents/Developer
    β€’ Build 14E300c
    β€’ CocoaPods version 1.11.3

[βœ“] Chrome - develop for the web
    β€’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[βœ“] Android Studio (version 2021.3)
    β€’ Android Studio at /Applications/Android Studio.app/Contents
    β€’ Flutter plugin can be installed from:
      πŸ”¨ https://plugins.jetbrains.com/plugin/9212-flutter
    β€’ Dart plugin can be installed from:
      πŸ”¨ https://plugins.jetbrains.com/plugin/6351-dart
    β€’ Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[βœ“] IntelliJ IDEA Community Edition (version 2023.1.3)
    β€’ IntelliJ at /Applications/IntelliJ IDEA CE.app
    β€’ Flutter plugin version 75.1.3
    β€’ Dart plugin version 231.9161.14

[βœ“] Connected device (2 available)
    β€’ macOS (desktop) β€’ macos  β€’ darwin-arm64   β€’ macOS 13.5.2 22G91 darwin-arm64 (Rosetta)
    β€’ Chrome (web)    β€’ chrome β€’ web-javascript β€’ Google Chrome 116.0.5845.187
    ! Error: Oscar’s iPhone has recently restarted. Xcode will continue when Oscar’s iPhone is unlocked. (code -14)

[βœ“] Network resources
    β€’ All expected network resources are available.

β€’ No issues found!

Dart Version

3.1.0

Steps to Reproduce

On Web while running on debug mode, I'm making a Post request that returns a response that contains the Emoji
πŸ˜ͺ (the text that have 3 of those)

Some combinations I tested

  • Dont fail if only contain 1 of those emojis

  • Fail if for πŸ˜ƒπŸ˜ͺπŸ˜ͺπŸ˜πŸ˜„πŸ˜ƒ

  • Fail if for πŸ˜ƒπŸ˜ͺπŸ˜ͺπŸ˜ͺπŸ˜πŸ˜„πŸ˜ƒ

  • Fail if for πŸ˜ƒπŸ˜ͺπŸ˜ͺπŸ˜ͺπŸ˜πŸ˜„πŸ˜ƒπŸ˜ͺπŸ˜ͺπŸ˜ͺ

  • Fail if for πŸ˜ͺπŸ˜ͺπŸ˜ͺπŸ˜ͺπŸ˜ͺπŸ˜ͺ

  • Dont fail for πŸ˜ͺπŸ˜ƒπŸ˜ͺ

  • Dont fail for πŸ˜ͺπŸ˜ͺπŸ˜ƒπŸ˜ͺ

  • fail for πŸ˜ƒπŸ˜ƒπŸ˜ƒπŸ˜„
    Apparently is 3 of the same emojis in a row

  • but not on 🀬🀬🀬

  • not for 😈😈😈😝

  • fail for 😈😈😈🀬🀬🀬

Expected Result

Just decode the string

Actual Result

Finished with error: Bad UTF-8 encoding (U+FFFD; REPLACEMENT CHARACTER) found while decoding string:
(More of the string I cant show),..."note":"Boy πŸ˜ͺπŸ˜ͺοΏ½
Screenshot 2023-09-22 at 16 19 38

@oscarshaitan oscarshaitan added h: need triage This issue needs to be categorized s: bug Something isn't working labels Sep 22, 2023
@AlexV525
Copy link
Member

Do you have a minimal reproducible example that we can try?

@oscarshaitan
Copy link
Author

trying to isolate the code on a example will add it next week

@AlexV525
Copy link
Member

ping @oscarshaitan

@oscarshaitan
Copy link
Author

I manage to isolate the code but is not failing currently I will close the issue

@AlexV525 AlexV525 added i: cannot reproduce and removed h: need triage This issue needs to be categorized s: bug Something isn't working labels Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants