pana icon indicating copy to clipboard operation
pana copied to clipboard

ListMixin.firstWhere at .downloadPackage

Open jonasfj opened this issue 2 years ago • 4 comments

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 )

jonasfj avatar Nov 28 '22 14:11 jonasfj

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 avatar Dec 08 '22 17:12 fraca98

@fraca98: what was the package/version?

isoos avatar Dec 08 '22 18:12 isoos

@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.

fraca98 avatar Dec 08 '22 18:12 fraca98

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.

isoos avatar Dec 09 '22 07:12 isoos