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

Unable to run example test with patrol drive on Android #408

Closed
gmorva-wunder opened this issue Oct 4, 2022 · 4 comments
Closed

Unable to run example test with patrol drive on Android #408

gmorva-wunder opened this issue Oct 4, 2022 · 4 comments
Labels
needs more info Looks valid, but more info is needed

Comments

@gmorva-wunder
Copy link

Hi,
I am pretty new to patrol, so excuse me if I overlooked something. I am trying to run the example test with the following command: patrol drive --target integration_test/app_test.dart.
Thanks for any help.

Error details
No device specified, using the first one (4fcf519f) ✓ Forwarded ports (13ms) ✓ Installed server (1.0s) ✓ Installed instrumentation (0.9s) Running app_test.dart with flutter_driver on 4fcf519f... pl.leancode.automatorserver.ServerLoop:

FAILURE: Build failed with an exception.

  • What went wrong:
    Gradle could not start your build.

Cannot create service of type BuildSessionActionExecutor using method LauncherServices$ToolingBuildSessionScopeServices.createActionExecutor() as there is a problem with parameter #21 of type FileSystemWatchingInformation.
Cannot create service of type BuildLifecycleAwareVirtualFileSystem using method VirtualFileSystemServices$GradleUserHomeServices.createVirtualFileSystem() as there is a problem with parameter #7 of type GlobalCacheLocations.
Cannot create service of type GlobalCacheLocations using method GradleUserHomeScopeServices.createGlobalCacheLocations() as there is a problem with parameter #1 of type List.
Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
Timeout waiting to lock journal cache (/home/morva/.gradle/caches/journal-1). It is currently in use by another Gradle instance.
Owner PID: 260139
Our PID: 338812
Owner Operation:
Our operation:
Lock file: /home/morva/.gradle/caches/journal-1/journal-1.lock

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

  • Get more help at https://help.gradle.org
    BUILD FAILED in 1m
    Gradle task assembleDebug failed with exit code 1
    flutter_driver exited with code 1
    See the logs above to learn what happened. If the logs above aren't useful then it's a bug – please report it.
Flutter doctor
[✓] Flutter (Channel stable, 3.3.2, on Ubuntu 22.04 LTS 5.15.0-48-generic, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.2)
[✓] Android Studio (version 2021.3)
[✓] VS Code
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

@bartekpacia bartekpacia added the bug Something isn't working label Oct 4, 2022
@bartekpacia
Copy link
Contributor

Hi @gmorva-wunder, thank you for filing the issue. 💙 I'm sorry that you encountered this problem.

This is the first time I see such an error with Patrol 🤔

Could you check what version of Gradle are you using? You can do so by going to the example/android folder and executing ./gradlew --version.

For example, here's my output:

$ ./gradlew --version

------------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------

Build time:   2022-08-05 21:17:56 UTC
Revision:     d1daa0cbf1a0103000b71484e1dbfe096e095918

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.11 (AdoptOpenJDK 11.0.11+9)
OS:           Mac OS X 11.5 x86_64

Also, try clearing Gradle cache.

I'm waiting forward to your response :)

@bartekpacia bartekpacia added needs more info Looks valid, but more info is needed and removed bug Something isn't working labels Oct 4, 2022
@gmorva-wunder
Copy link
Author

Hi @bartekpacia, thanks for the fast response!
Got it working by clearing the cache, but will leave some extra information if it helps.

My initial ./gradlew --version:

Welcome to Gradle 7.5.1!

Here are the highlights of this release:
 - Support for Java 18
 - Support for building with Groovy 4
 - Much more responsive continuous builds
 - Improved diagnostics for dependency resolution

For more details see https://docs.gradle.org/7.5.1/release-notes.html


------------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------

Build time:   2022-08-05 21:17:56 UTC
Revision:     d1daa0cbf1a0103000b71484e1dbfe096e095918

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          18.0.2-ea (Private Build 18.0.2-ea+9-Ubuntu-222.04)
OS:           Linux 5.15.0-48-generic amd64

After deleting the cache


------------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------

Build time:   2022-08-05 21:17:56 UTC
Revision:     d1daa0cbf1a0103000b71484e1dbfe096e095918

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          18.0.2-ea (Private Build 18.0.2-ea+9-Ubuntu-222.04)
OS:           Linux 5.15.0-48-generic amd64

I guess it's the same, but without the welcome message for some reason.

Also, after clearing the cache, the following error was displayed when trying to run either the project or the tests:
Gradle threw an error while downloading artifacts from the network.
this resolved that issue.

@bartekpacia
Copy link
Contributor

I'm happy that you got it working :) Thanks for using Patrol and for reporting problems :)

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs more info Looks valid, but more info is needed
Projects
None yet
Development

No branches or pull requests

2 participants