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

Running tests from windows throws org.apache.commons.io.FileExistsException #244

Closed
mariobat88 opened this issue Jul 22, 2021 · 35 comments
Closed

Comments

@mariobat88
Copy link

mariobat88 commented Jul 22, 2021

Expected behaviour

executeScreenshotTests -Precord and executeScreenshotTests should not throw FileExistsException

Actual behaviour

Running command executeScreenshotTests -Precord is returning
org.apache.commons.io.FileExistsException: Destination '{myProjectPath}\features\{myFeature}\screenshots\debug\screenshots-compose-default\{packageName}testName.png already exists.

Running command executeScreenshotTests is returning
org.apache.commons.io.FileExistsException: Destination '{myProjectPath}\features\{myFeature}\screenshots\debug\screenshots-compose-default\metadata.json_emulator-5554 already exists.

NOTE: I deleted the screenshots directory from my module before running these commands. After these commands run and finish I see the .png, metadata.json-5554 and sometimes the metadata.json files in that directory.

Steps to reproduce

Create a test using compose-ui and run the commands:
gradlew.bat executeScreenshotTests -Precord
gradlew.bat executeScreenshotTests

Version of the library

5.11.0
Also I am using a machine with Windows 10 installed and Android Studio Arctic Fox 2020.3.1 RC1

@pedrovgs
Copy link
Owner

Linked to #140

@pedrovgs pedrovgs changed the title Tests throwing org.apache.commons.io.FileExistsException Running tests from windows throws org.apache.commons.io.FileExistsException Jul 29, 2021
@shen-david
Copy link

shen-david commented Oct 13, 2021

I also encountered this, on Mac, when I enabled showOnlyFailingTestsInReports = true. The observed behavior here is this option attempts to find/do different file IO operations in different paths, which triggers these errors. I removed this option.

@rock3r
Copy link

rock3r commented Dec 13, 2021

We're still having there issues on code-with-the-italians/bundel on 5.12.1 unfortunately. Same error as the original report. I'll put a link to the recording of our efforts once the recording is out!

Note: this was mistakenly posted on #140 first.

@rock3r
Copy link

rock3r commented Dec 13, 2021

@pedrovgs I have run the tests on the shot-consumer-flavors and they pass. I noticed the dependencies on that project are very old, and the target Android version is too, so I tried upgrading those. It still passes without issues on the same emulators I have issues with (API 29 and 31). I don't really know what we did in our project that makes it fail; it seems like there's nothing different in the setup, as there is barely anything to set up in the Gradle files...

@pedrovgs
Copy link
Owner

pedrovgs commented Dec 13, 2021

🤔 🤔 @rock3r, do you mean you've forked the project from your windows PC and got Shot working on shot-consumer-flavors? 🤔 🤔

API 29+ issues I'm sure are related to the scoped storage... but I'm happy to see I'm not crazy and we got Shot working on windows, at least for 1 project xD cc/ @Tylos

Could you please check the other shot-consumer-* sample projects? You can execute record/verify tasks for all of them just to see If we find something failing.

Looking at your Twitch stream I've noticed the line you mentioned about the message We couldn`t pull the screenshots from folder is related to the old UI kit integration and not to the bug we are facing. That yellow warning message is always shown when there are no tests for activities, views, or fragments and you only have tests for composable functions. Sorry, the message can be misleading.

However, there is an interesting point in the video you've already noticed. The Shot Gradle plugin is actually able to pull the screenshots and when it fails, it shows a message ....testName.png already exists. Looks like the images are being pulled multiple times for a reason I don't understand. As you mentioned the shot-consumer-flavor project is working I'm wondering if it can actually be related to the usage of the test orchestrator or any other detail we don't support or something in your project config. There is an issue reported here #78 but I'm not sure if it is related.

@rock3r, now that you've got it running, could you please run some tests for me and check what's going on?

  • Record and verify tests in all the shot-consumer-* sample projects using API 28 emulator and let me know if you got Shot passing on all of them or only on some of them.
  • Ensure in your project you are not using the AndroidX test orchestrator. Shot is not compatible with this AndroidX feature for now. Maybe it is enabled by default if you've added some updated androidx testing dependencies to your project.
  • When you find any of the sample projects failing you can add some log traces and paste the results here.

For the second experiment, you can modify Adb.scala, pullFolder function as follows:

  private def pullFolder(
      folderName: String,
      device: String,
      screenshotsFolder: Folder,
      appId: AppId
  ) = {
    val folderToPull = s"${baseStoragePath}/screenshots/$appId/$folderName/"
    println(s"Pulling screenshots from ${folderToPull}")
    try {
      executeAdbCommandWithResult(s"-s $device pull $folderToPull $screenshotsFolder")
    } catch {
      case t: Throwable =>
        println(s"Exception catch: ${t}")
        println(
          Console.YELLOW + s"Shot ADB warning: We could not pull screenshots from folder: ${folderToPull}"
        )
    }
  }

It will print the folders where Shot is trying to pull the images every time it tries to pull and if it fails it will print the exception found.

Thank you so much @rock3r 😃 I really appreciate the time you are taking to fix this bug!

P.S: Remember you can publish the artifact to your local marvel using the publishToMavenLocal task afer any shot code change.

@pedrovgs
Copy link
Owner

@mariuszmarzec you are the author of the fix we added as tentative support for windows. Could you please help us with this bug?

@rock3r
Copy link

rock3r commented Dec 13, 2021

🤔 🤔 @rock3r, do you mean you've forked the project from your windows PC and got Shot working on shot-consumer-flavors? 🤔 🤔

Yes! Works fine. Prints some warnings about files not existing when running some ADB commands, but works fine and doesn't fail.

I'll check the other instructions asap and will let you know! :) Thanks a ton for your help 🙌

@mariuszmarzec
Copy link
Contributor

@pedrovgs I don't remember to have this issue during fixing issue #140, but i will try to have a look this week.

@mariuszmarzec
Copy link
Contributor

@pedrovgs
Checked today on my windows machine and looks like still this issue is occurring

java.nio.file.FileAlreadyExistsException: F:\AndroidStudioProjects\Shot\shot-consumer\samplelibrary\screenshots\debug\screenshots-default\com.example.samplelibrary.ExampleInstrumentedTest_takeAScreenshotOfAnInflatedLayout_dump.json

Looks like screenshots-default is not removed after/before from some reason. I will try to fix it later.

According to @rock3r 's issue, i cloned Bundel repo and trying to reproduce error as above, but got different one:

at dev.sebastiano.bundel.onboarding.OnboardingAndroidUiTest.intro_page_should_look_nice(OnboardingAndroidUiTest.kt:72)
java.io.IOException: java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively0(Native Method)
at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)
at java.io.File.createNewFile(File.java:1008)
at com.karumi.shot.compose.ScreenshotSaver.createFileIfNotExists(ScreenshotSaver.kt:77)
at com.karumi.shot.compose.ScreenshotSaver.saveScreenshotBitmap(ScreenshotSaver.kt:59)
at com.karumi.shot.compose.ScreenshotSaver.saveScreenshot(ScreenshotSaver.kt:21)
at com.karumi.shot.compose.ComposeScreenshot.saveScreenshot(ComposeScreenshot.kt:22)
at com.karumi.shot.ScreenshotTest$DefaultImpls.compareScreenshot(ScreenshotTest.kt:144)
at dev.sebastiano.bundel.onboarding.OnboardingAndroidUiTest.compareScreenshot(OnboardingAndroidUiTest.kt:27)
at com.karumi.shot.ScreenshotTest$DefaultImpls.compareScreenshot(ScreenshotTest.kt:116)
at dev.sebastiano.bundel.onboarding.OnboardingAndroidUiTest.compareScreenshot(OnboardingAndroidUiTest.kt:27)
at com.karumi.shot.ScreenshotTest$DefaultImpls.compareScreenshot$default(ScreenshotTest.kt:114)
at dev.sebastiano.bundel.onboarding.OnboardingAndroidUiTest.intro_page_should_look_nice(OnboardingAndroidUiTest.kt:72)
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively0(Native Method)
at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)
at java.io.File.createNewFile(File.java:1008)

Looks like something different. Maybe it is operating system related. @rock3r Do you use Windows or Linux/MacOS?

@rock3r
Copy link

rock3r commented Dec 14, 2021

@mariuszmarzec I'm on Windows 11

@mariuszmarzec
Copy link
Contributor

@pedrovgs I created a PR and after those changes @rock3r 's Bundel screenshot testing is working for me.

@pedrovgs
Copy link
Owner

@mariuszmarzec could you please confirm the emulator you used to test it and also the list of projects and sample projects you've tested? I'd love to release a version with the fix before the end of the year, but I'd like to at least ensure it works for API 28 in different projects.

@mariuszmarzec
Copy link
Contributor

mariuszmarzec commented Dec 20, 2021

@pedrovgs I tested all shot-consumer-* project on API-28 and it works as expected. But i have open champagne to early. Looks like issue:

at dev.sebastiano.bundel.onboarding.OnboardingAndroidUiTest.intro_page_should_look_nice(OnboardingAndroidUiTest.kt:72)
java.io.IOException: java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively0(Native Method)
at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:317)

... stills occur on API 29 for compose test.

I think this PR could be merge, but this second issue require more investigation rather as separate issue.

@mariuszmarzec
Copy link
Contributor

@pedrovgs Issue with IOException is probably same as #240
I think we could merge my PR (if everything is ok) and close this issue.

@pedrovgs
Copy link
Owner

Merged and released, thank you so much @mariuszmarzec 😃 Could you please guys check if 5.12.2 is working as expected, at least on API 28?

@zoey-juan
Copy link

I am facing the same issue in our project by using 5.12.2. Mac, emulator API 28. any luck to fix this?

@mariuszmarzec
Copy link
Contributor

@zoey-juan I discovered that sometimes gradle is locking files created durin shot tasks, and to workaround it you have to run ./gradlew --stop to kill gradle deamon and remove lock on files.

Could you try ./gradlew --stop before runing shot? If any issue still occurs, please share --stacktrace

@zoey-juan
Copy link

zoey-juan commented Jan 21, 2022

@mariuszmarzec hi, thanks for replying. The FileExistsException error is gone after running ./gradlew --stop, however, the screenshot images didn't save to the path(screenshots/debug is created but no images inside) even the log says successful. Any other ideas?
This is the log

$ ./gradlew xxxx-compose-app:debugExecuteScreenshotTests -Precord --stacktrace
Type-safe project accessors is an incubating feature.
Configuration on demand is an incubating feature.

> Configure project :xxxx-compose-app
WARNING:: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 7.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Project property 'kotlin.parallel.tasks.in.project' is deprecated.
By default it depends on Gradle parallel project execution option value.
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/com.*.xxxx.compose.app.test.uid/screenshots-default/: No such file or directory
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/com..*.xxxx.compose.app.test.uid/screenshots-compose-default/: No such file or directory

> Task :xxxx-compose-app:connectedDebugAndroidTest
Starting 19 tests on Pixel_3_API_28(AVD) - 9

> Task :xxxx-compose-app:debugDownloadScreenshots
⬇️  Pulling screenshots from your connected devices!
Shot ADB warning: We could not pull screenshots from folder: /storage/emulated/0/Download/screenshots/com.*.xxxx.compose.app.test.uid/screenshots-compose-default/
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/com.*.xxxx.compose.app.test.uid/screenshots-compose-default/: No such file or directorytsAfter

> Task :xxxx-compose-app:debugExecuteScreenshotTests
💾  Saving screenshots.
😃  Screenshots recorded and saved at: /Users/*/Project/*-app-android/xxxx-compose-app/screenshots/debug/
🤓  You can review the execution report here: /Users/*/Project/*-app-android/xxxx-compose-app/build/reports/shot/record/index.html

BUILD SUCCESSFUL in 1m 17s

@mariobat88
Copy link
Author

@zoey-juan Try running it on API 27 or 26. I regularly have problems with any instrumentation tests greater than API 27. Not only for screenshot tests. It could be API 28 handles storage differently so it can't save the screenshots to your device.

@zoey-juan
Copy link

zoey-juan commented Jan 21, 2022

I have tried to run on API 27 and debug it. the images are actually stored in /storage/emulated/0/Download/screenshots/com.*.compose.app.test.uid/screenshots-default/ but as you see the log below is trying to pull from screenshots-compose-default/

More details here

$ ./gradlew xxxx-compose-app:debugExecuteScreenshotTests -Precord --stacktrace --debug
[DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':rrds-compose-app:debugDownloadScreenshots'.
[QUIET] [system.out] ⬇️  Pulling screenshots from your connected devices!
[DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':xxxx-compose-app:debugDownloadScreenshots'.
[QUIET] [system.out] ⬇️  Pulling screenshots from your connected devices!
[QUIET] [system.out] Shot ADB warning: We could not pull screenshots from folder: /storage/emulated/0/Download/screenshots/com.*.compose.app.test.uid/screenshots-compose-default/
 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Execute downloadScreenshots for :xxxx-compose-app:debugDownloadScreenshots' completed
 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Executing task ':xxxx-compose-app:debugDownloadScreenshots'' completed
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Snapshot outputs after executing task ':xxxx-compose-app:debugDownloadScreenshots'' completed
[DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter] Removed task artifact state for task ':xxxx-compose-app:debugDownloadScreenshots' from context.
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Task :xxxx-compose-app:debugDownloadScreenshots'
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Task :xxxx-compose-app:debugDownloadScreenshots' completed
[INFO] [org.gradle.execution.plan.DefaultPlanExecutor] :xxxx-compose-app:debugDownloadScreenshots (Thread[Execution worker for ':' Thread 2,5,main]) completed. Took 0.095 secs.
[DEBUG] [org.gradle.execution.plan.DefaultExecutionPlan] Node :xxxx-compose-app:debugDownloadScreenshots finished executing
[DEBUG] [org.gradle.execution.plan.DefaultExecutionPlan] Node :xxxx-compose-app:debugDownloadScreenshots completed, executed: true
[DEBUG] [org.gradle.execution.plan.Node] Checking if all dependencies are complete for :xxxx-compose-app:debugRemoveScreenshotsAfter
[DEBUG] [org.gradle.execution.plan.Node] All dependencies are complete for :xxxx-compose-app:debugRemoveScreenshotsAfter
[DEBUG] [org.gradle.execution.plan.TaskNode] Checking if all must successors are complete for :xxxx-compose-app:debugRemoveScreenshotsAfter
[DEBUG] [org.gradle.execution.plan.TaskNode] Checking if all finalizing successors are complete for :xxxx-compose-app:debugRemoveScreenshotsAfter
[DEBUG] [org.gradle.execution.plan.TaskNode] All task dependencies are complete for :xxxx-compose-app:debugRemoveScreenshotsAfter
[DEBUG] [org.gradle.execution.plan.Node] Checking if all dependencies are complete for :xxxx-compose-app:debugExecuteScreenshotTests
[DEBUG] [org.gradle.execution.plan.Node] Dependency :xxxx-compose-app:debugRemoveScreenshotsAfter for :xxxx-compose-app:debugExecuteScreenshotTests not yet completed
[DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker for ':' Thread 2: released lock on :xxxx-compose-app
[DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.88 completed (1 worker(s) in use)
2022-01-21T22:37:47.024+0800 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker for ':' Thread 2: released lock on root.1.88
[DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker for ':' Thread 2: acquired lock on :xxxx-compose-app
 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.88 started (1 worker(s) in use).
[DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker for ':' Thread 2: acquired lock on root.1.88
 [INFO] [org.gradle.execution.plan.DefaultPlanExecutor] :xxxx-compose-app:debugRemoveScreenshotsAfter (Thread[Execution worker for ':' Thread 2,5,main]) started.
[DEBUG] [org.gradle.execution.plan.DefaultExecutionPlan] No node could be selected, nodes ready: false
2022-01-21T22:37:47.024+0800 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Task :xxxx-compose-app:debugRemoveScreenshotsAfter' started
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Snapshot task inputs for :xxxx-compose-app:debugRemoveScreenshotsAfter' started
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Completing Build operation 'Snapshot task inputs for :xxxx-compose-app:debugRemoveScreenshotsAfter'
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Executing task ':xxxx-compose-app:debugRemoveScreenshotsAfter'' started
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Execute clearScreenshots for :xxxx-compose-app:debugRemoveScreenshotsAfter' started
[QUIET] [system.out] Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/com.*.compose.app.test.uid/screenshots-compose-default/: No such file or directory

@mariuszmarzec
Copy link
Contributor

@zoey-juan Thanks for logs, yea shot is trying get screenshots from screenshot-compose-default and it failed because it is empty or doesn't exist. Lack of message for screenshot-default means that images are loaded but something went wrong in next stages and final screenshot are not generated.

Are you able build on your local machine shot library with commented out lines:
https://github.com/pedrovgs/Shot/blob/master/core/src/main/scala/com/karumi/shot/Shot.scala#L272-L273

Or you can try locally fetch my branch from this PR #273 and check it if issue still occurs.

@zoey-juan
Copy link

zoey-juan commented Jan 24, 2022

@mariuszmarzec thanks for the suggestion, unfortunately no luck to me. I have tried both suggestions.
May I ask what's the expectation of the output?
Actually we have another two android lib modules with screenshot tests which are working properly. However, I am adding this new application module into our project with screenshot tests, it always not working.

As you can see after running -Precord, the output is as the image below. However, the output from the other two android lib modules, the images go directly into screenshots/debug/*.png instead of creatingscreenshots/debug/screenshots-default/ and screenshots/debug/screenshots-compose-default/. any idea why the behaviours are different?
Screenshot 2022-01-24 at 22 01 59

hot ADB warning: rm: /storage/emulated/0/Download/screenshots/com.xxx.compose.app.test.uid/screenshots-default/: No such file or directory
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/com.xxx.compose.app.test.uid/screenshots-compose-default/: No such file or directorytsBefore

> Task :xxx-compose-app:connectedDebugAndroidTest
Starting 20 tests on Pixel_2_API_27(AVD) - 8.1.0

> Task :xxx-compose-app:debugDownloadScreenshots
⬇️  Pulling screenshots from your connected devices!
Shot ADB warning: We could not pull screenshots from folder: /storage/emulated/0/Download/screenshots/com.xxx.compose.app.test.uid/screenshots-default/
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/com.xxx.compose.app.test.uid/screenshots-default/: No such file or directory

> Task :xxx-compose-app:debugExecuteScreenshotTests FAILED
💾  Saving screenshots.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task 'xxx-compose-app:debugExecuteScreenshotTests'.
> 'com.fasterxml.jackson.databind.ObjectReader com.fasterxml.jackson.databind.ObjectMapper.readerFor(java.lang.Class)'

@mariuszmarzec
Copy link
Contributor

@zoey-juan Ok, now it is clear. Something goes wrong during processing metadata.xml file which is intermediate file. screenshots-compose-default and screenshots-default are intermediate directors used to process pulled images from device.

Could you try new released version 5.13.0? In new version there is no xml processing, because facebook screenshot testing used under the hood change metadata to json format. If any issue will occurs again, please share whole stacktrace (usage of --stacktrace flag will make gradle stacktrace printing).

@zoey-juan
Copy link

zoey-juan commented Jan 25, 2022

@mariuszmarzec hi! I have tried this PR #273 and I think it's the same as version 5.13.0. the log above was from the change.

@mariuszmarzec
Copy link
Contributor

@zoey-juan Log is from 5.12.2 probably, because in PR #273 don't use xml parser. Probably during trying code from PR in your test project mavenLocal() repository was not defined before remote repository and 5.12.2 with old code was used. I think you can try 5.13.0 from remote maven repository.

@zoey-juan
Copy link

zoey-juan commented Jan 26, 2022

@mariuszmarzec logs and image output by using 3.13.0

Screenshot 2022-01-26 at 22 40 18

$ ./gradlew xxxx-compose-app:debugExecuteScreenshotTests -Precord --stacktrace
Type-safe project accessors is an incubating feature.
Configuration on demand is an incubating feature.

> Configure project :xxxx-compose-app
WARNING:: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 7.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Project property 'kotlin.parallel.tasks.in.project' is deprecated.
By default it depends on Gradle parallel project execution option value.
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/com.x.xxxx.compose.app.test.uid/screenshots-default/: No such file or directory
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/com.x.xxxx.compose.app.test.uid/screenshots-compose-default/: No such file or directory

> Task :xxxx-compose-app:kaptDebugAndroidTestKotlin
warning: Supported source version 'RELEASE_8' from annotation processor 'org.jetbrains.kotlin.kapt3.base.ProcessorWrapper' less than -source '11'

> Task :xxxx-compose-app:compileDebugAndroidTestKotlin
w: Flag is not supported by this version of the compiler: -Xallow-jvm-ir-dependencies
w: ATTENTION!
This build uses unsafe internal compiler arguments:

-XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes

This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!


> Task :xxxx-compose-app:connectedDebugAndroidTest
Starting 20 tests on Pixel_2_API_27(AVD) - 8.1.0

> Task :xxxx-compose-app:debugDownloadScreenshots
⬇️  Pulling screenshots from your connected devices!
Shot ADB warning: We could not pull screenshots from folder: /storage/emulated/0/Download/screenshots/com.x.xxxx.compose.app.test.uid/screenshots-default/
Shot ADB warning: rm: /storage/emulated/0/Download/screenshots/com.x.xxxx.compose.app.test.uid/screenshots-default/: No such file or directory

> Task :xxxx-compose-app:debugExecuteScreenshotTests FAILED
💾  Saving screenshots.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':xxxx-compose-app:debugExecuteScreenshotTests'.
> 'com.fasterxml.jackson.databind.ObjectReader com.fasterxml.jackson.databind.ObjectMapper.readerFor(java.lang.Class)'

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':xxxx-compose-app:debugExecuteScreenshotTests'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:187)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:268)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:185)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.NoSuchMethodError: 'com.fasterxml.jackson.databind.ObjectReader com.fasterxml.jackson.databind.ObjectMapper.readerFor(java.lang.Class)'
        at org.json4s.jackson.JsonMethods.parse(JsonMethods.scala:20)
        at org.json4s.jackson.JsonMethods.parse$(JsonMethods.scala:19)
        at org.json4s.jackson.JsonMethods$.parse(JsonMethods.scala:62)
        at com.karumi.shot.json.ScreenshotsComposeSuiteJsonParser$.parseScreenshots(ScreenshotsComposeSuiteJsonParser.scala:16)
        at com.karumi.shot.Shot.$anonfun$readComposeScreenshotsMetadata$2(Shot.scala:327)
        at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:293)
        at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)
        at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
        at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:198)
        at scala.collection.TraversableLike.flatMap(TraversableLike.scala:293)
        at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:290)
        at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:198)
        at com.karumi.shot.Shot.readComposeScreenshotsMetadata(Shot.scala:320)
        at com.karumi.shot.Shot.recordComposeScreenshots(Shot.scala:213)
        at com.karumi.shot.Shot.recordScreenshots(Shot.scala:58)
        at com.karumi.shot.tasks.ExecuteScreenshotTests.executeScreenshotTests(Tasks.scala:77)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:498)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:483)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:466)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:105)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:270)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:248)
        at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:83)
        at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:37)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:47)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:47)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:37)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:50)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
        at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:54)
        at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:35)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:60)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:27)
        at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:174)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:74)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:45)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:40)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:29)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
        at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:99)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:92)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:84)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:41)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:91)
        at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:78)
        at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:49)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:105)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:50)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:86)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
        at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
        at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:43)
        at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:31)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:283)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40)
        at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:49)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35)
        at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:184)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173)
        at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
        at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)


* Get more help at https://help.gradle.org

BUILD FAILED in 44s

@mariuszmarzec
Copy link
Contributor

@zoey-juan Thanks for effort. Looks like clue of this issue is here:

Caused by: java.lang.NoSuchMethodError: 'com.fasterxml.jackson.databind.ObjectReader com.fasterxml.jackson.databind.ObjectMapper.readerFor(java.lang.Class)'
        at org.json4s.jackson.JsonMethods.parse(JsonMethods.scala:20)

@pedrovgs i'm not experienced in scala, but for me it looks like missing dependency, not sure why is missing. It wasn't never declared in build.gradle file i think and it doesn't break tasks on my machine or CI. Is it connected with scala version? JVM implementation?

@olegosipenko
Copy link
Contributor

Yep, you came to the same error that I mentioned here #274

@pedrovgs
Copy link
Owner

@mariuszmarzec looks like there is an issue with the jackson library, like if the dependency is not included as expected or something like that. We could try updating the library we use to decode JSON.

@olegosipenko
Copy link
Contributor

Could this be related to the fact of using JDK 11?

@pedrovgs
Copy link
Owner

It could be if I've deployed the artifact using java 11 for the final build, but I don't think this is the case. Anyway, our tests are executed using java 11 on linux OS images so it can be something specific to the windows JDK.

@zoey-juan
Copy link

zoey-juan commented Feb 4, 2022

Hi,
Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.ObjectReader com.fasterxml.jackson.databind.ObjectMapper.readerFor(java.lang.Class)
This issue is fixed for me. I finally found it's bcoz

  1. we add implmentationAndroidTest("...shot-android") cause the dependencies issue.
  2. I replaced fun compareScreenshot(bitmap: Bitmap, name: String? = null) with this fun compareScreenshot(view: View, heightInPx: Int? = null, widthInPx: Int? = null, name: String? = null)
    with this two actions, it works now

@pedrovgs
Copy link
Owner

Releasing a tentative fix for this one right now. Version 5.14.1. Please, if this is still reproducible, feel free to reopen this issue after testing with the new release provided. Thanks!

@badoualy
Copy link
Contributor

@pedrovgs As mentionned in the PR, the fix will only fix the Cannot delete directory failing the task and not generating the report.

The next run will still throw the File already exist error

@Venkat-juju
Copy link

version 5.14.1 still have this issue in my mac machine. and, the problem is, We are having this issue intermittently. now it constantly occurs when i record in one branch and then switched to another branch and run the tests. then this issue occured me... 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants