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

randomly missing commas and quotes from response json #1216

Open
bagusindrayana opened this issue May 29, 2024 · 1 comment
Open

randomly missing commas and quotes from response json #1216

bagusindrayana opened this issue May 29, 2024 · 1 comment
Labels
package:http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@bagusindrayana
Copy link

bagusindrayana commented May 29, 2024

i try to GET request to rest api with HttpClient, http or dio and always get FormatException when try to decode the response only if using emulator and if data is big, like 5 mb json data or thousand of row, i try in real device and didn't experience any problems.

here example from Exception result, there comma and quotes missing in in several position and always change every request even is same endpoint and same data

first request
image

second request
image

third request
image

i also try to log the string response and try to validate with jsonlint and there always missing comma or quotes

package version :
http: ^1.2.0
dio: ^5.4.3+1

flutter doctor :
[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [Version 10.0.22631.3447], locale en-ID)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.0)
[√] Android Studio (version 2022.2)
[√] Android Studio (version 2023.3)
[√] VS Code (version 1.89.1)
[√] Connected device (4 available)
[√] Network resources

my code :

var url = Uri.parse(baseUrl + '/asset');
var response = await http.get(url);
dynamic responseData = jsonDecode(response.body.toString());
@bagusindrayana bagusindrayana added package:http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels May 29, 2024
@brianquinlan
Copy link
Collaborator

Hi @bagusindrayana ,

Would you provide a reproducible example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants