fluttercommunity / font_awesome_flutter

The Font Awesome Icon pack available as Flutter Icons
Other
831 stars 233 forks source link

printVersionNotice sometimes fails #252

Closed ManuelRauber closed 9 months ago

ManuelRauber commented 11 months ago

Describe the bug I noticed that on our CI system the configurator script sometimes fails with this error message:

Downloading https://api.github.com/repos/fluttercommunity/font_awesome_flutter/releases
Unhandled exception:
type '_Map<String, dynamic>' is not a subtype of type 'List<dynamic>'
#0      printVersionNotice (file:///Users/runner/work/1/s/vendor/font_awesome_flutter/font_awesome_flutter/util/lib/main.dart:484:10)
<asynchronous suspension>
#1      main (file:///Users/runner/work/1/s/vendor/font_awesome_flutter/font_awesome_flutter/util/lib/main.dart:96:3)
<asynchronous suspension>

Most of the time, if I re-run everything, it works again. Maybe the GitHub API has an hiccup or something.

But since it's only printing version information, it should not break the build.

Do you think it would be possible to wrap it in a try/catch and simply print something like "Could not determine version information" or something, but not break the build?

michaelspiss commented 9 months ago

Hey @ManuelRauber, sorry for the long waiting time. printVersionInformation's catch seems to have been too narrow to accommodate for different responses from what was expected. This is fixed with the latest release. Thanks for reporting!