Getting java.lang.OutOfMemoryError while running app:connectedAndroidTest to execute flutter integration tests - flutter

Error details below
Execution optimizations have been disabled for task ':app:compressDevelopmentDebugAssets' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: 'C:\Users\LAP\Documents\myapp\build\app\intermediates\merged_assets\developmentDebug\out'. Reason: Task ':app:compressDevelopmentDebugAssets' uses this output of task ':app:copyFlutterAssetsDevelopmentDebug' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#implicit_dependency for more details about this problem.
> Task :app:compressDevelopmentDebugAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compressDevelopmentDebugAssets'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction
> java.lang.OutOfMemoryError (no error message)
I have already added below in my build.gradle
dexOptions {
javaMaxHeapSize "4G"
}
End goal is to be able to run the integration tests I have on firebase test lab
Following this doc steps been shared on firebase
https://github.com/flutter/flutter/tree/main/packages/integration_test#android-device-testing

Related

Error "Could not create task ':generateLockfiles'"

The supplied phased action failed with an exception.
Could not create task ':generateLockfiles'.
Process 'command '/Users/.../StudioProjects/../android/gradlew'' finished with non-zero exit value 1
I was adding Firebase to my Flutter project. When I changed the build.gradle files in the app, as well as Application, this happened.

How to fix error: Could not compute signing task inputs - operation was cancelled?

I have a swift package manager project and I am trying to run unit tests with Fastlane on GitHub actions.
My fastfile looks like
desc('Unit test with spm')
lane :spm_test do
scan(
workspace: ".swiftpm/xcode/package.xcworkspace",
package_path: ".",
device: "iPhone 11",
scheme: SCHEME,
clean: false,
code_coverage: true,
derived_data_path: ".build"
)
end
But time to time I am getting this error,
error: Could not compute signing task inputs - operation was cancelled. (in target 'Scheme_Scheme' from project 'Scheme') - same for multiple dependencies and test target then finally
Testing failed:
Could not compute signing task inputs - operation was cancelled.
Testing cancelled because the build failed.
Last part of build log
3499 ▸ Build Succeeded
3500 2022-04-08 10:53:25.292 xcodebuild[2468:12022] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-19466/IDEFoundation/Execution/RunContextManager/IDERunContextManager.m:823
3501 Details: Error deleting scheme: Cannot modify data because the process disallows saving.
3502 Object: <IDERunContextManager: 0x7fdaacb72e50>
3503 Method: -deleteRunContexts:completionQueue:completionBlock:
3504 Thread: <NSThread: 0x7fdaa97170e0>{number = 1, name = main}
3505 Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
3506 2022-04-08 10:53:25.293 xcodebuild[2468:12022] could not delete old scheme: Error Domain=DVTCustomDataStoringErrors Code=0 "Cannot modify data because the process disallows saving." UserInfo={NSLocalizedDescription=Cannot modify data because the process disallows saving.}
3507
3508 ❌ error: Could not compute signing task inputs - operation was cancelled. (in target 'MyProjectDependency_MyProjectDependency' from project 'MyProjectDependency')
3509
3510
3511
3512 ❌ error: Could not compute signing task inputs - operation was cancelled. (in target 'MyProject_MyProject' from project 'MyProject')
3513
3514
3515
3516 ❌ error: Could not compute signing task inputs - operation was cancelled. (in target 'MyProjectTests' from project 'MyProject')
3517
3518
3519
3520 ❌ error: Could not compute signing task inputs - operation was cancelled. (in target 'MyProject_MyProjectTests' from project 'MyProject')
3521
3522
3523 Testing failed:
3524 Could not compute signing task inputs - operation was cancelled.
3525 Testing cancelled because the build failed.
3526
3527 ** TEST FAILED **
This is running perfectly when I run on my local machine. I have another set of tests that uses a normal Xcode project(not SPM) that also works fine.
What could be the reason for this error and how can I fix it?
UPD: This is happening only with Xcode 13.x, Xcode 12.x is working fine.

Azure Devops - Release Pipeline when re-running failed tests azure devops shows failure status even if re-run succeeded

I use Specflow with SpecRunner+ I am using the Deafult.srprofile to to re-run failed tests 3 times in visual studio it shows 2passed 1 failed but the status of the test is a failure, the same goes for azure devops if a re-ran test passes the outcome of the run is a failure. The Failures are sometimes caused by locator timeouts or server timeouts not often but saw it happen few time thats why we decided to implement a re-run.
Could anyone help on this?
022-02-09T12:40:13.8607507Z Test Run Failed.
2022-02-09T12:40:13.8608607Z Total tests: 37
2022-02-09T12:40:13.8609271Z Passed: 36
2022-02-09T12:40:13.8609858Z Failed: 1
2022-02-09T12:40:13.8617476Z Total time: 7.4559 Minutes
2022-02-09T12:40:13.9226929Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
2022-02-09T12:40:14.0075402Z ##[error]Error: The process 'D:\Microsoft_Visual_Studio\2019\Common7\IDE\Extensions\TestPlatform\vstest.console.exe' failed with exit code 1
2022-02-09T12:40:14.8164576Z ##[error]VsTest task failed.
But then the report states that it was retried 3 times which 2 of the retries were seccusefull but still a failure status on the azure devops run.
The behavior of the report is the correct one and sadly this can't be configured to be changed.
What you can do is to adjust how the results are reported back to Azure DevOps.
You can configure it via the VSTest element in the srProfile- File.
This example means, that at least one retry has to be passing:
<VSTest testRetryResults="Unified" passRateAbsolute="1"/>
Docs: https://docs.specflow.org/projects/specflow-runner/en/latest/Profile/VSTest.html
Be aware that we have stopped the development of the SpecFlow+ Runner. More details here: https://specflow.org/using-specflow/the-retirement-of-specflow-runner/

The slice of type 'Discovery' is 'Aborted' because of the error : System.Exception: NUnit Adapter 4.0.0.0: Test discovery complete

I tried to run Azure DevOps tests in a build pipeline.
Tests are executed on a new agent, i got the following error.
Setup Azure DevOps
##[error]The slice of type 'Discovery' is 'Aborted' because of the error : System.Exception: NUnit Adapter 4.0.0.0: Test discovery complete
Received the command : Stop
TestExecutionHost.ProcessCommand. Stop Command handled
SliceFetch Aborted. Moving to the TestHostEnd phase
Test run '1007278' is in 'Aborted' state.
##[error]Test run is aborted. Logging details of the run logs.
##[error]System.Exception: The test run was aborted, failing the task.
The Problem is that after slice process the test case filter isn't working, solution was the rename to “TestCategory”, before it was “Category“ for TestCaseFilter

Starting Parpool in MATLAB

I tried starting parpool in MATLAB 2015b. Command as follows,
parpool('local',3);
This command should allocate 3 workers. Whereas I received an error stating failure to start parpool. The error message as follows,
Error using parpool (line 94)
Failed to start a parallel pool. (For information in addition to
the causing error, validate the profile 'local' in the Cluster Profile
Manager.)
A similar query was posted in (https://nl.mathworks.com/matlabcentral/answers/196549-failed-to-start-a-parallel-pool-in-matlab2015a). I followed the same procedure, to validate the local profile as per the suggestions.
Using distcomp.feature( 'LocalUseMpiexec', false); or distcomp.feature( 'LocalUseMpiexec', true) in startup.m didn't create any improvement. Also when attempting to validate local profile still gives error message as follows,
VALIDATION DETAILS
Profile: local
Scheduler Type: Local
Stage: Cluster connection test (parcluster)
Status: Passed
Description:Validation Passed
Command Line Output:(none)
Error Report:(none)
Debug Log:(none)
Stage: Job test (createJob)
Status: Failed
Description:The job errored or did not reach state finished.
Command Line Output:
Failed to determine if job 24 belongs to this cluster because: Unable to
read file 'C:\Users\varad001\AppData\Roaming\MathWorks\MATLAB
\local_cluster_jobs\R2015b\Job24.in.mat'. No such file or directory..
Error Report:(none)
Debug Log:(none)
Stage: SPMD job test (createCommunicatingJob)
Status: Failed
Description:The job errored or did not reach state finished.
Command Line Output:
Failed to determine if job 25 belongs to this cluster because: Unable to
read file 'C:\Users\varad001\AppData\Roaming\MathWorks\MATLAB
\local_cluster_jobs\R2015b\Job25.in.mat'. No such file or directory..
Error Report:(none)
Debug Log:(none)
Stage: Pool job test (createCommunicatingJob)
Status: Skipped
Description:Validation skipped due to previous failure.
Command Line Output:(none)
Error Report:(none)
Debug Log:(none)
Stage: Parallel pool test (parpool)
Status: Skipped
Description:Validation skipped due to previous failure.
Command Line Output:(none)
Error Report:(none)
Debug Log:(none)
I am receiving these error only in my cluster machine. But launching parpool in my standalone PC is working perfectly. Is there a way to rectify this issue?