Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patrol dev tools is not found using github example app #1964

Open
neiljaywarner opened this issue Nov 28, 2023 · 3 comments
Open

patrol dev tools is not found using github example app #1964

neiljaywarner opened this issue Nov 28, 2023 · 3 comments
Labels
docs Concerns doc comments, READMEs, or docs P2 Issues not at the top of the work list package: patrol_devtools_extension Related to the patrol_devtools_extension package

Comments

@neiljaywarner
Copy link

Steps to reproduce

  1. clone example app
  2. cd into it
  3. open ios simulator
  4. flutter run
  5. swipe closed
  6. run patrol develop -t integration_test/example_test.dart --verbose
    expected: patrol dev tools opens

Actual results

  1. displays patrol_ext_not_found in the browser window for dev tools
  2. logs say
    ERROR - 2023-11-28 17:04:43.988110
    POST /api/serveAvailableExtensions?rootPath=file%3A%2F%2F%2FUsers%2FNeil.Warner%2Fdev%2Fpatrol%2Fpackages%2Fpatrol%2Fexample
    Error thrown by handler.
    PathNotFoundException: Directory listing failed, path = '/Users/Neil.Warner/dev/patrol/packages/patrol/extension/devtools/build/' (OS Error: No such file or directory, errno = 2)

Logs

Logs
Neil.Warner@NA-PPH9L3DMBP example % patrol develop  -t integration_test/example_test.dart --verbose
Verbose mode enabled. More logs will be printed.
Received test target: /Users/Neil.Warner/dev/patrol/packages/patrol/example/integration_test/example_test.dart
Generated entrypoint /Users/Neil.Warner/dev/patrol/packages/patrol/example/integration_test/test_bundle.dart for development
$ flutter --no-version-check devices --machine
No device specified, using the first one (iPhoneSE)
Received device: iPhoneSE
$ xcrun simctl listapps 1FE3C342-CDD0-44A0-8749-47F419F628FB
Received 9 --dart-define(s) (0 custom, 9 internal)
Received internal --dart-define: PATROL_WAIT=0
Received internal --dart-define: PATROL_APP_PACKAGE_NAME=pl.leancode.patrol.example
Received internal --dart-define: PATROL_APP_BUNDLE_ID=pl.leancode.patrol.Example
Received internal --dart-define: PATROL_ANDROID_APP_NAME=Patrol example
Received internal --dart-define: PATROL_IOS_APP_NAME=Patrol example
Received internal --dart-define: INTEGRATION_TEST_SHOULD_REPORT_RESULTS_TO_NATIVE=false
Received internal --dart-define: PATROL_TEST_LABEL_ENABLED=true
Received internal --dart-define: PATROL_HOT_RESTART=true
Received internal --dart-define: PATROL_IOS_INSTALLED_APPS=["com.apple.Bridge","com.apple.DocumentsApp","com.apple.Health","com.apple.Maps","com.apple.MobileAddressBook","com.apple.MobileSMS","com.apple.Passbook","com.apple.Preferences","com.apple.PreviewShell","com.apple.freeform","com.apple.mobilecal","com.apple.mobilesafari","com.apple.mobileslideshow","com.apple.news","com.apple.reminders","com.apple.shortcuts","com.apple.webapp","com.example.patrol30Test","com.transistorsoft.flutterBackgroundGeolocationExample"]
• Building app with entrypoint test_bundle.dart for iOS simulator (debug)...
$ flutter build ios --no-version-check --config-only --no-codesign --debug --simulator --target /Users/Neil.Warner/dev/patrol/packages/patrol/example/integration_test/test_bundle.dart --dart-define PATROL_WAIT=0 --dart-define PATROL_APP_PACKAGE_NAME=pl.leancode.patrol.example --dart-define PATROL_APP_BUNDLE_ID=pl.leancode.patrol.Example --dart-define PATROL_ANDROID_APP_NAME=Patrol example --dart-define PATROL_IOS_APP_NAME=Patrol example --dart-define INTEGRATION_TEST_SHOULD_REPORT_RESULTS_TO_NATIVE=false --dart-define PATROL_TEST_LABEL_ENABLED=true --dart-define PATROL_HOT_RESTART=true --dart-define PATROL_IOS_INSTALLED_APPS=["com.apple.Bridge","com.apple.DocumentsApp","com.apple.Health","com.apple.Maps","com.apple.MobileAddressBook","com.apple.MobileSMS","com.apple.Passbook","com.apple.Preferences","com.apple.PreviewShell","com.apple.freeform","com.apple.mobilecal","com.apple.mobilesafari","com.apple.mobileslideshow","com.apple.news","com.apple.reminders","com.apple.shortcuts","com.apple.webapp","com.example.patrol30Test","com.transistorsoft.flutterBackgroundGeolocationExample"]
        Building pl.leancode.patrol.Example for simulator (ios)...
$ xcodebuild build-for-testing -workspace Runner.xcworkspace -scheme Runner -configuration Debug -only-testing RunnerUITests -sdk iphonesimulator -destination generic/platform=iOS Simulator -quiet -derivedDataPath ../build/ios_integ OTHER_SWIFT_FLAGS=$(inherited) -D PATROL_ENABLED
        2023-11-28 17:04:00.042 xcodebuild[18378:5293105] [MT] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-22269/IDEFoundation/Provisioning/Capabilities Infrastructure/IDECapabilityQuerySelection.swift:103
        Details:  createItemModels creation requirements should not create capability item model for a capability item model that already exists.
        Function: createItemModels(for:itemModelSource:)
        Thread:   <_NSMainThread: 0x600003b8c0c0>{number = 1, name = main}
        Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
        2023-11-28 17:04:00.042 xcodebuild[18378:5293105] [MT] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-22269/IDEFoundation/Provisioning/Capabilities Infrastructure/IDECapabilityQuerySelection.swift:103
        Details:  createItemModels creation requirements should not create capability item model for a capability item model that already exists.
___etc etc. omitted some because wqas getting "There was an error creating your Issue: body is too long (maximum is 65536 characters)."
nerUITests-Runner[19166:5296652] PatrolServer: INFO: done opening app with id pl.leancode.patrol.Example
        2023-11-28 17:04:38.443759-0600 RunnerUITests-Runner[19166:5296652] PatrolServer: INFO: result: ()
        Patrol (native): openApp() succeeded
        00:04 +1: All tests passed!
        : Syncing files to device iPhoneSE...                                 6.3s
        : 
Hot Restart: attached to the app (press "r" to restart)
        : Flutter run key commands.
        : r Hot reload. 🔥🔥🔥
        : R Hot restart.
        : h List all available interactive commands.
        : d Detach (terminate "flutter run" but leave application running).
        : c Clear the screen
        : q Quit (terminate the application on the device).
        : 
        : A Dart VM Service on iPhoneSE is available at: http://127.0.0.1:57245/vSjsk9QbMUY=/
Patrol DevTools extension is available at http://127.0.0.1:9100/patrol_ext?uri=http://127.0.0.1:57245/vSjsk9QbMUY=/
$ open http://127.0.0.1:9100/patrol_ext?uri=http://127.0.0.1:57245/vSjsk9QbMUY=/
        : The Flutter DevTools debugger and profiler on iPhoneSE is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:57245/vSjsk9QbMUY=/
        ERROR - 2023-11-28 17:04:43.879703
        POST /api/serveAvailableExtensions?rootPath=file%3A%2F%2F%2FUsers%2FNeil.Warner%2Fdev%2Fpatrol%2Fpackages%2Fpatrol%2Fexample
        Error thrown by handler.
        PathNotFoundException: Directory listing failed, path = '/Users/Neil.Warner/dev/patrol/packages/patrol/extension/devtools/build/' (OS Error: No such file or directory, errno = 2)
        
        ERROR - 2023-11-28 17:04:43.988110
        POST /api/serveAvailableExtensions?rootPath=file%3A%2F%2F%2FUsers%2FNeil.Warner%2Fdev%2Fpatrol%2Fpackages%2Fpatrol%2Fexample
        Error thrown by handler.
        PathNotFoundException: Directory listing failed, path = '/Users/Neil.Warner/dev/patrol/packages/patrol/extension/devtools/build/' (OS Error: No such file or directory, errno = 2)
        

Patrol version

patrol:
path: ../

from example

Patrol Doctor output

Patrol Doctor output
Patrol CLI version: 2.3.1+1
Program adb found in /Users/Neil.Warner/Library/Android/sdk/platform-tools//adb
Env var $ANDROID_HOME is not set
Program xcodebuild found in /usr/bin/xcodebuild
Program ideviceinstaller not found (install with `brew install ideviceinstaller`)

Flutter Doctor output

Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.0, on macOS 13.6.2 22G320 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Community Edition (version 2023.2.5)
[✓] VS Code (version 1.84.2)
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for iPhone. 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

• No issues found!

@neiljaywarner
Copy link
Author

This seems to be related to #1901 - when i manually add the build directory then it seems to work on ios anyway, yay!

@piotruela
Copy link
Collaborator

Hi @neiljaywarner. Thanks for creating the issue. When you use the patrol example app, it has dependency on Patrol using the path instead of pub.dev. Therefore, it's necessary to run the script publish_to_patrol_extension from patrol_devtools_extension.

@piotruela
Copy link
Collaborator

We should add an information about this step in example app readme

@piotruela piotruela added P2 Issues not at the top of the work list docs Concerns doc comments, READMEs, or docs package: patrol_devtools_extension Related to the patrol_devtools_extension package labels Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Concerns doc comments, READMEs, or docs P2 Issues not at the top of the work list package: patrol_devtools_extension Related to the patrol_devtools_extension package
Projects
None yet
Development

No branches or pull requests

2 participants