pana
pana copied to clipboard
ListMixin.firstWhere at .downloadPackage
Error: Bad state: No element
at .ListMixin.firstWhere
at .downloadPackage ( package:pana/src/download_utils.dart:48 )
at StackZoneSpecification._registerUnaryCallback.<fn> ( package:stack_trace/src/stack_zone_specification.dart:125 )
Hi sorry for the question. I published a package on pub.dev and from the Pana analysis i get this error. Is there anything I can do to fix it?
0/10 points: Failed to run dartdoc
Running dartdoc failed with the following error: Bad state: No element
#0 ListMixin.firstWhere (dart:collection/list.dart:167:5)
#1 downloadPackage (package:pana/src/download_utils.dart:48:10)
<asynchronous suspension>
#2 StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:124:15)
<asynchronous suspension>
I'm a little bit confused cause it never happened to me before 😢
@fraca98: what was the package/version?
@fraca98: what was the package/version?
This is the package https://pub.dev/packages/withings_flutter and the issue is related to the last version (1.0.3). You can check the error in the section 'Scores'. It's reported: Analysed with Pana 0.21.22, Flutter 3.3.9, Dart 2.18.5.
Based on the pana version, and the observable data, this seems to be a cache issue in combination with partial traffic migration of a new release we are rolling out (as I see only the "current" site version with earlier pana). The new release picked up the newly published version earlier than its version list cache expired, and failed to analyze it in the first attempt.
@fraca98: you don't need to do anything, there will be a repeated attempt to analyze the package and it will pick up the correct version.
@jonasfj: we shall extend the download util to use explicit downloadUrl
when it is available, it seems to be easier to do than figuring out cache invalidation across runtime versions.