Skip to content

path_provider_android 2.3.0 incompatible with widget_preview_scaffold #184689

Description

@Renzo-Olivares

https://github.com/flutter/packages/pull/9770/changes#diff-dd0ef3cbe9b5c1f450d464bf913e86188ce389299822992405ef9a3e7123ee48R21 upgraded path_provider_android from 2.2.23 to 2.3.0. This seems to be incompatible with some tests in dev/integration_tests/widget_preview_scaffold.

#184688 pins path_provider_android to 2.2.23 for widget_preview_scaffold to fix the issue.

A long-term issue should be explored so we can properly update the dependency to 2.3.0.

Crash log below:

00:03 +6: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart: packages get/upgrade get fetches packages and injects plugin
'package:flutter_tools/src/platform_plugins.dart': Failed assertion: line 444 pos 15: 'pluginClass != null || dartPluginClass != null || defaultPackage != null': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:67:4)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:49:5)
#2      new WindowsPlugin (package:flutter_tools/src/platform_plugins.dart:444:15)
#3      new WindowsPlugin.fromYaml (package:flutter_tools/src/platform_plugins.dart:474:12)
#4      new Plugin._fromMultiPlatformYaml (package:flutter_tools/src/plugins.dart:161:59)
#5      new Plugin.fromYaml (package:flutter_tools/src/plugins.dart:81:21)
#6      _pluginFromPackage (package:flutter_tools/src/flutter_plugins.dart:91:17)
<asynchronous suspension>
#7      findPlugins (package:flutter_tools/src/flutter_plugins.dart:130:28)
<asynchronous suspension>
#8      refreshPluginsList (package:flutter_tools/src/flutter_plugins.dart:1210:32)
<asynchronous suspension>
#9      FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:401:5)
<asynchronous suspension>
#10     PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:395:9)
<asynchronous suspension>
#11     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1630:27)
<asynchronous suspension>
#12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#13     CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#14     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:496:9)
<asynchronous suspension>
#15     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#16     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:431:5)
<asynchronous suspension>
#17     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#18     FlutterCommandRunner.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:307:33)
<asynchronous suspension>
#19     main.<anonymous closure>.runCommandIn (file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart:80:7)
<asynchronous suspension>
#20     main.<anonymous closure>.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart:695:9)
<asynchronous suspension>
#21     testUsingContext.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/src/context.dart:151:32)
<asynchronous suspension>
#22     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
<asynchronous suspension>
#23     testUsingContext.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/src/context.dart:140:28)
<asynchronous suspension>

00:03 +6 -1: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart: packages get/upgrade get fetches packages and injects plugin [E]
  'package:flutter_tools/src/platform_plugins.dart': Failed assertion: line 444 pos 15: 'pluginClass != null || dartPluginClass != null || defaultPackage != null': is not true.
  dart:core                                                            _AssertionError._throwNew
  package:flutter_tools/src/platform_plugins.dart 444:15               new WindowsPlugin
  package:flutter_tools/src/platform_plugins.dart 474:12               new WindowsPlugin.fromYaml
  package:flutter_tools/src/plugins.dart 161:59                        new Plugin._fromMultiPlatformYaml
  package:flutter_tools/src/plugins.dart 81:21                         new Plugin.fromYaml
  package:flutter_tools/src/flutter_plugins.dart 91:17                 _pluginFromPackage
  ===== asynchronous gap ===========================
  package:flutter_tools/src/flutter_plugins.dart 130:28                findPlugins
  ===== asynchronous gap ===========================
  package:flutter_tools/src/flutter_plugins.dart 1210:32               refreshPluginsList
  ===== asynchronous gap ===========================
  package:flutter_tools/src/project.dart 401:5                         FlutterProject.ensureReadyForPlatformSpecificTooling
  ===== asynchronous gap ===========================
  package:flutter_tools/src/commands/packages.dart 395:9               PackagesGetCommand.runCommand
  ===== asynchronous gap ===========================
  package:flutter_tools/src/runner/flutter_command.dart 1630:27        FlutterCommand.run.<fn>
  ===== asynchronous gap ===========================
  package:flutter_tools/src/base/context.dart 154:19                   AppContext.run.<fn>
  ===== asynchronous gap ===========================
  package:args/command_runner.dart 212:13                              CommandRunner.runCommand
  ===== asynchronous gap ===========================
  package:flutter_tools/src/runner/flutter_command_runner.dart 496:9   FlutterCommandRunner.runCommand.<fn>
  ===== asynchronous gap ===========================
  package:flutter_tools/src/base/context.dart 154:19                   AppContext.run.<fn>
  ===== asynchronous gap ===========================
  package:flutter_tools/src/runner/flutter_command_runner.dart 431:5   FlutterCommandRunner.runCommand
  ===== asynchronous gap ===========================
  package:flutter_tools/src/base/context.dart 154:19                   AppContext.run.<fn>
  ===== asynchronous gap ===========================
  package:flutter_tools/src/runner/flutter_command_runner.dart 307:33  FlutterCommandRunner.run.<fn>
  ===== asynchronous gap ===========================
  test/commands.shard/permeable/packages_test.dart 80:7                main.<fn>.runCommandIn
  ===== asynchronous gap ===========================
  test/commands.shard/permeable/packages_test.dart 695:9               main.<fn>.<fn>
  ===== asynchronous gap ===========================
  test/src/context.dart 151:32                                         testUsingContext.<fn>.<fn>.<fn>.<fn>.<fn>
  ===== asynchronous gap ===========================
  package:flutter_tools/src/base/context.dart 154:19                   AppContext.run.<fn>
  ===== asynchronous gap ===========================
  test/src/context.dart 140:28                                         testUsingContext.<fn>.<fn>.<fn>.<fn>
  
00:03 +6 -1: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart: packages get/upgrade get fetches packages and injects plugin in plugin project
00:03 +7 -1: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart: packages get/upgrade get --offline fetches packages
00:04 +8 -1: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart: packages get/upgrade get explicit-packages-resolution omits ".flutter-plugins"
00:04 +9 -1: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart: packages get/upgrade set no plugins as usage value
00:05 +10 -1: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart: packages get/upgrade indicate that the project is not a module in usage value
00:05 +11 -1: /Volumes/Work/s/w/ir/x/w/flutter/packages/flutter_tools/test/commands.shard/permeable/packages_test.dart: packages get/upgrade set the number of plugins as usage value
00:05 +12 -1: /Volumes/Work/s/w/ir/x/w/flutter/package

Activity

  1. stuartmorgan-g commented on Apr 7, 2026

    @stuartmorgan-g
    Contributor

    Can we close this as fixed with #184695 ?

  2. jmagman commented on Apr 7, 2026

    @jmagman
    Member

    Why did an Android plugin change trigger a WindowsPlugin assert?
    Also that emergency PR should have a follow up test.

  3. stuartmorgan-g commented on Apr 7, 2026

    @stuartmorgan-g
    Contributor

    Why did an Android plugin change trigger a WindowsPlugin assert?

    It added a new transitive dependency on jni, and jni technically supports Windows and Linux, so this adds new desktop dependencies. This is one of the long-standing limitations of plugins (and packages in general in a native asset world): you can't say "I only need to depend on platform X of package Y".

  4. lvyking1231ho-png commented on Apr 7, 2026

    @lvyking1231ho-png
  5. added
    in triagePresently being triaged by the triage team
    toolAffects the "flutter" command-line tool. See also t: labels.
    team-toolOwned by Flutter Tool team
    and removed
    in triagePresently being triaged by the triage team
    on Apr 8, 2026
  6. bkonyi commented on Apr 20, 2026

    @bkonyi
    Contributor

    Closing as the underlying issue was fixed in #184695.

  7. github-actions commented on May 4, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    team-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions