Skip to content

[widget previews] workspaces with nested projects (like examples) don't work #176018

@benthillerkus

Description

@benthillerkus

Steps to reproduce

  1. git clone https://github.com/benthillerkus/widget-preview-repro-workspaces.git
  2. check out the nested branch
  3. flutter pub get
  4. flutter widget-preview start

Expected results

The widget preview opens.

Actual results

The command errors out (see logs).

Code sample

https://github.com/benthillerkus/widget-preview-repro-workspaces

Screenshots or Video

No response

Logs

Logs
puro flutter widget-preview start
Creating widget preview scaffolding at: /Users/bent/Projects/widget-preview-repro-workspaces/.dart_tool/widget_preview_scaffold
Creating the Widget Preview Scaffold manifest at /Users/bent/Projects/widget-preview-repro-workspaces/.dart_tool/widget_preview_scaffold/preview_manifest.json
Because every version of example from path depends on asdf from hosted and widget_preview_scaffold depends on asdf from path, example from path is forbidden.
So, because widget_preview_scaffold depends on example from path, version solving failed.


Failed to update packages.

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.35.4, on macOS 26.1 25B5042k darwin-arm64, locale en-DE) [713ms]
    • Flutter version 3.35.4 on channel stable at /Users/bent/.puro/envs/3.35.4/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d693b4b9db (9 days ago), 2025-09-16 14:27:41 +0000
    • Engine revision c298091351
    • Dart version 3.9.2
    • DevTools version 2.48.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [3.0s]
    • Android SDK at /Users/bent/Library/Android/sdk
    • Emulator version unknown
    • Platform android-36, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 26.0.1) [908ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17A400
    ✗ CocoaPods installed but not working.
        You appear to have CocoaPods installed but it is not working.
        This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
        This can usually be fixed by re-installing CocoaPods.
      For re-installation instructions, see https://guides.cocoapods.org/using/getting-started.html#installation

[✓] Chrome - develop for the web [14ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2025.1) [14ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)

[✓] VS Code (version 1.104.1) [12ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.118.0

[✓] Connected device (2 available) [7.1s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 26.1 25B5042k darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 140.0.7339.185
    ! Error: Browsing on the local area network for iPad von The. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [329ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: widget previewsIssues related to the Widget Previewer toolingfound in release: 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions