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

crash when using fetch for html/js file #33

Closed
howmind opened this issue Mar 27, 2021 · 1 comment
Closed

crash when using fetch for html/js file #33

howmind opened this issue Mar 27, 2021 · 1 comment

Comments

@howmind
Copy link

howmind commented Mar 27, 2021

Hi, firstly thank your amazing working for flutter.
I have one question about fetch function.
When I fetch the html/js file, the flutter_js meets crash problem.
I have checked codes, It seems only support json file(The xhr.dart force to encode the response Text).
Could we support the fetch function to download normal file?

E/flutter (32568): var killErrors=function(value){return true};window.onerror=null;window.oner...
E/flutter (32568): ^
E/flutter (32568):
E/flutter (32568): #0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1404:5)
E/flutter (32568): #1 _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1271:9)
E/flutter (32568): #2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:936:22)
E/flutter (32568): #3 _parseJson (dart:convert-patch/convert_patch.dart:40:10)
E/flutter (32568): #4 JsonDecoder.convert (dart:convert/json.dart:506:36)
E/flutter (32568): #5 JsonCodec.decode (dart:convert/json.dart:157:41)
E/flutter (32568): #6 JavascriptRuntimeXhrExtension.enableXhr..
package:flutter_js/extensions/xhr.dart:350
E/flutter (32568):

@abner
Copy link
Owner

abner commented Apr 4, 2021

fixed it in version 0.4.0

@abner abner closed this as completed Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants