Flutter build fails due to Amplify_core - amazon-web-services

I recently upgraded my flutter application to Android V2, and also made my code null safe.
Now when I try to run my code I get the below build error:
e: C:\flutter\.pub-cache\hosted\pub.dartlang.org\amplify_core-
0.4.0\android\src\main\kotlin\com\amazonaws\amplify\amplify_core\AtomicResult.kt: (26, 1):
Class 'AtomicResult' is not abstract and does not implement abstract member public abstract
fun error(p0: String, p1: String?, p2: Any?): Unit defined in
io.flutter.plugin.common.MethodChannel.Result
e: C:\flutter\.pub-cache\hosted\pub.dartlang.org\amplify_core-
0.4.0\android\src\main\kotlin\com\amazonaws\amplify\amplify_core\AtomicResult.kt: (54, 5):
'error' overrides nothing
e: C:\flutter\.pub-cache\hosted\pub.dartlang.org\amplify_core-
0.4.0\android\src\main\kotlin\com\amazonaws\amplify\amplify_core\AtomicResult.kt: (66, 26):
Type mismatch: inferred type is String? but String was expected
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':amplify_core:compileDebugKotlin'.
> Compilation error. See log for more details
* 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 15s
Exception: Gradle task assembleDebug failed with exit code 1
Things I tried that did not work:
Clearing build and cache and restarting
Deleted the amplify_core-0.4.0 from the pub.dartlang.org folder and tried again
Initialized Amplify again and pulled the environment from the Launch Studio again
Any help would be greatly appreciated!
Thanks

I was able to solve this issue by changing my channel from Master to Stable.
In the next release of Amplify staying on the Master channel won't present this issue.

run this command -->>
dart pub upgrade --major-versions

Related

mlUnitTest throws a java.nio.file.NoSuchFileException at the end of the tests

I try to use mlunitTest with ml-gradle 3.17.1 and Marklogic marklogic-unit-test-client:1.0.0
All the tests are OK, I test with my test user on the UI and with ml-gradle.
But when ml-gradle wants to access the results in a directory [build\test-results\marklogic-unit-test\TEST-{test-name}], java throws an error because the file isn't there.
Just before there is a comment who precises that it clears the directory.
Does anyone use the mlunitTest without this problem?
it's the same if i give the name of the result directory with the parameter : -PunitTestResultsPath=testML
Here are the traces of this part of execution :
Done running all suites; time: 82ms
4 tests completed, 0 failed
Deleted existing results directory: build\test-results\marklogic-unit-test
Releasing connection
:mlUnitTest (Thread[Execution worker for ':',5,main]) completed. Took 0.093 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mlUnitTest'.
> java.nio.file.NoSuchFileException: build\test-results\marklogic-unit-test\TEST-historicId.xml
Try release 4.3.0 - it includes the following fix - https://github.com/marklogic-community/ml-gradle/issues/599

PHPUnit "Unknown option "--configuration" Process finished with exit code 1" in PhpStorm

I am able to execute unit tests in the CLI using the following command:
/usr/local/Cellar/php#7.4/7.4.27/bin/php /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/vendor/phpunit/phpunit/phpunit /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/tests
However, i want to fire the tests from inside PhpStorm, but the IDE is automatically adding parameters to the executing command which causes an instant execute fail:
/usr/local/Cellar/php#7.4/7.4.27/bin/php /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/vendor/phpunit/phpunit/phpunit --configuration /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/phpunit.xml /Users/USERNAME/PhpstormProjects/PROJECT_FOLDER/tests --teamcity
Testing started at 11:51 ...
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.
Unknown option "--configuration"
Process finished with exit code 1
When i disable the "Default configuration file" checkbox in Preferences > PHP > Test Frameworks > {current project config} - it says:
Unknown option "--no-configuration"
Process finished with exit code 1
Is there a way to disable the configuration parameter at all? I'm pretty new to unit tests and i don't even know which purpose this configuration file would even has...
I hope someone can help me - thanks in advance !!

Error MSB3073: The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2

I'm building web application using asp.net core 2x and angular 5,during development/debug mode everything is getting build well.But when i try to publish it with release mode in visual studio 2017 am getting this error.please help me to resolve this.Am not using this in my code but it exists. Function calls are not supported in decorators but 'makeParamDecorator' was called in 'Injectable'
'Injectable' calls 'makeParamDecorator'.Please help.Thanks in advance.Screenshot of my error message
You need to run this on console:
node node_modules/webpack/bin/webpack.js --env.prod
then you will get the list of all the issues, and need to solve all of them, someone gonna be like:
ERROR in navmenu.component.html: Property 'auth' is protected and only accessible within class 'NavMenuComponent' and its subclasses.
another case:
ERROR in Error at estados.component.html(19,72): Expected 0 arguments, but got 1.
Error at home.component.html(8,12): Property 'selectedCharacter' does not exist on type 'HomeComponent'. Did you mean 'selectedCharacters'?
Each error have a different solution, you need to solve them all.
You can check this link:
Angular – The command “node node_modules/webpack/bin/webpack.js –env.prod” exited with code 2 and similar errors: how to fix them

ionic 2 execution android failed

C:\Users\ADMIN\Documents\dev\Breakingnews\trunk\Tawary\platforms\android\res\values\strings.xml: Error: Found item String/google_app_id more than one time
:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
BUILD FAILED
Total time: 12.285 secs
Execution failed for task ':mergeDebugResources'.
C:\Users\ADMIN\Documents\dev\Breakingnews\trunk\Tawary\platforms\android\res\values\strings.xml: Error: Found item String/google_app_id more than one time
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':mergeDebugResources'.
C:\Users\ADMIN\Documents\dev\Breakingnews\trunk\Tawary\platforms\android\res\values\strings.xml: Error: Found item String/google_app_id more than one time
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Cause of error is under the path \your project root\platforms\android\res\values then check in strings.xml, there are two with same attribute. You need to fix this according to your plugins definition.

MSBuild: build results shows 'no code coverage' while importing test-result does

I have a strange problem,
my MSBuild runs tests, code-coverage and publishing fine (part of the build.txt shown):
Results Top Level Tests
------- ---------------
Passed BuildTestProject.UnitTest1.TestMethod1
Passed BuildTestProject.UnitTest1.TestMethod2
2/2 test(s) Passed
...
Results file: W:\BuildWorkspace\XXX\Test Release\TestResults\XXX_XXX 2009-08-20 11_47_09_Any CPU_Release.trx
Run Configuration: Local Test Run
Waiting to publish...
Publishing results of test run XXX#XXX 2009-08-20 11:47:09_Any CPU_Release to http://XXX:8080/Build/v1.0/PublishTestResultsBuildService2.asmx...
....Publish completed successfully.
When I import these testresults on my local machine i get to see the code coverage-data as expected. But the code-coverage details are not shown in the details of the build that Visual Studio shows when you expand the 'results details'.
Any tips?
Finally found the solution today, found out that my TeamFoundationServer itself had problems with publishing the results to my buildAgent. I read somewhere (after searching for CoverAn.exe) that it is installed as a service, then i checked the credentials for the service 'Code Coverage Analysis Service'.
These were running under TFSMachine\NETWORK instead of our service-account for the TeamFoundationServer. Changed this, reran a build with tests in it and it now publishes the results.
W00t!
Check that the .testrunconfig used by the server has coverage enabled. It may be different than your local .testrunconfig.