Skip to content

GitHubFile.text throws exception #190

@js94766524

Description

@js94766524

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions