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

GitHubFile.text throws exception #190

Closed
js94766524 opened this issue Nov 11, 2019 · 5 comments · Fixed by #191
Closed

GitHubFile.text throws exception #190

js94766524 opened this issue Nov 11, 2019 · 5 comments · Fixed by #191

Comments

@js94766524
Copy link

the version 6.0.0 seems something is wrong when decoding content from base64 string to utf8.
this exception didn't appear with version 5.0.0

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following FormatException was thrown building FutureBuilder<RepositoryContents>(dirty, state: _FutureBuilderState<RepositoryContents>#5eef4):
Invalid character (at character 61)
5pys5paH5LuF5YGa5bqU55So5ryU56S677yM6K+m57uG5Y6f55CG5Y+v5Y+C
                                                            ^

User-created ancestor of the error-causing widget was: 
  StreamBuilder<GitHub> file:///Users/shixiaolong/Documents/Personal/flutter_doc_client/lib/widgets/git_directory.dart:121:13
When the exception was thrown, this was the stack: 
#0      _Base64Decoder.decodeChunk (dart:convert/base64.dart:680:7)
#1      _Base64Decoder.decode (dart:convert/base64.dart:605:14)
#2      Base64Decoder.convert (dart:convert/base64.dart:485:26)
#3      Base64Codec.decode (dart:convert/base64.dart:82:47)
#4      base64Decode (dart:convert/base64.dart:51:49)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.5, on Mac OS X 10.15.1 19B88, locale zh-Hans-CN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Community Edition (version 2019.2.1)
[✓] VS Code (version 1.39.2)
[✓] Connected device (1 available)

• No issues found!
@github-actions
Copy link

Thanks for submitting an issue! @robrbecker will take a look soon!

@robrbecker
Copy link
Member

@js94766524 I'll take a look today. Do you have a copy of the JSON that it is trying to parse? Is there any more to the stacktrace that might indicate what method in github.dart library that is the problem. All I can tell from this is that the problem is happening when deserializing a RepositoryContents class.

@robrbecker
Copy link
Member

@js94766524 Please try the 6.0.1 release and if you are still having the same problem, re-open this issue.

@robrbecker
Copy link
Member

@js94766524 Update .. this should be fixed in 6.0.2

@js94766524
Copy link
Author

It works~
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants