Today, my Android build failed in the ProGuard optimization phase with a weird java.lang.ArrayIndexOutOfBoundsException error message.
Since my last successful build I hardly changed a thing. I tracked the problem to the version of the com.google.firebase:firebase-messaging api. Version 17.3.3 still works fine, version 17.3.4 is problematic.
I don't know if it is related, but note that the api com.google.firebase:firebase-core is not part of my project.
The issue seems fixed when using grade plugin 3.3 or later
Related
I updated IntelliJ and kotlin to their latest version a couple days ago. I assume it is one of these two actions that is causing my issue. IntelliJ started highlighting errors on my QueryCriteria statements that it didn’t previously:
QueryCriteria myQueryCriteria = new QueryCriteria.LinearStateQueryCriteria(null, singletonList(uuid), null, Vault.StateStatus.ALL);
Error:
Incompatible types. Found: 'net.corda.core.node.services.vault.QueryCriteria.LinearStateQueryCriteria', required: 'net.corda.core.node.services.vault.QueryCriteria'
I have always used this syntax because I then pass myQueryCriteria into a Query:
Vault.Page<myContractState> page = mockNodeA.getServices().getVaultService().queryBy(myContractState.class, myQueryCriteria);
The error doesn’t stop my tests from running. I’ve tried changing several settings but came to the realization I am better to ask people that are more familiar with java/kotlin/intelliJ/Corda before I make the problem worse.
Quick History:
Originally installed IntelliJ 2018.3 to 2019.3 – no issues
Upgraded to IntelliJ 2020.3.2 – no issues
Updated to IntelliJ 2021.1 – error appeared
I ended up going back to IntelliJ 2020.3.3 to make the error stop
Docs clearly say:
"Install the IntelliJ IDEA Community Edition. Corda supports IntelliJ IDEA versions 2017.x, 2018.x, 2019.x, and 2020.x; and Kotlin plugin version 1.2.71."
…so when I updated to 2021.1 I was out of the recommended version. When 2020.3.2 prompted me to update I didn’t realize it was going to take me to 2021.1 (my fault).
Background:
I am still really new to IntelliJ/Java but I tried everything I could think of the make the error go away and couldn’t fix it.
Kotlin Plugin:
2021.1 wouldn’t let me install the Kotlin Plugin 1.2.71 because it’s not supported.
IntelliJ 2019.3 Kotlin Plugin 1.3.61-release-IJ2019.3-1 = no error
IntelliJ 2020.3 Kotlin Plugin 203-1.4.10-release-IJ7717.8 = no error
IntelliJ 2021.1 Kotlin Plugin 211-1.4.32-release-IJ6693.72 = error
I tried downgrading the Kotlin Plugin to an older version but it would always ignore the older plugin and stay with the new one.
I tried changing the Inspections but the error doesn’t seem to be coming from an inspection.
Changing the Kotlin compiler under Build, Execution, Deployment had no effect.
The current supported version of Kotlin is 1.2.71 (you can check out the doc or the source code of Corda on github (github.com/corda/corda/constant.properties)).
I suggest you to downgrade the Kotlin version.
This does seem to be a compiler error in Intellij IDEA. I have the same issue as you, using code downloaded from Corda's repository.
IntelliJ IDEA 2021.3.1 (Ultimate Edition) = Error
IntelliJ IDEA 2021.3.1 (Community Edition) = Error
IntelliJ IDEA 2020.3.4 (Ultimate Edition) = WORKS!
First a little context to the problem:
My work can be divided into two categories:
Maintaining ASP.NET Web forms legacy projects
Building new ASP.NET Core 2/3.1 projects
When maintaining the web forms legacy projects, I get often a Git error the last couple of months. The following error occurs when I try to stage/add parts of code through GitExtensions:
error: patch failed: [FileName].aspx.cs:[LineNumber]
error: [FileName].aspx.cs: patch does not apply
The message is added with some code where the actual patch fail occurs (see example later in this post).
As mentioned before, the error only occurs in the web forms projects and this is the only correlation I can find between the errors. It seems that the error occurs at random pieces of code in random files that I try to stage/add.
I use the following tools for source control:
The most recent version of Git (2.25.0)
The most recent version of Git Extensions (3.3.1.7897)
Repositories are hosted by Bitbucket and developing happens in the most recent version of Visual Studio Professional
I already tried the following to solve the error:
Re-cloned all of my projects
Reinstalled Git
Reinstalled Git Extensions
git: patch does not apply
Example
In the example I tried to stage line 91 and 92. Then the error occurs as can be seen in the left part of the image. But when I stage line 182, everything is fine
I already looked with some colleagues what the problem could be. They also never encountered it and don't know how to solve it.
Oh yeah, a little disclaimer. This is my first post on SO. Please let me know if I didn't provide information in a desired or sufficient way so I can improve upcoming posts.
Kind regards
EDIT
The problem seems Git Extension related. I just installed Source Tree and there everything works fine.
I'm trying to use Xamarin.Firebase.Dynamic.Links, but I get a NULL object whenever the Xamarin.Firebase.lid package is included in the project. However, I need to use other packages that rely on Xamarin.Firebase.lid, and so the solution isn't as simple as just NOT USING it.
The project is built against MONOANDROID 9.0, and all of the installed packages are the MOST UP-TO-DATE as of Sep 20, 2019.
The default FirebaseApp object instance is valid (non-null), so all of my account information in google-services.json seems to be working as expected.
I've proven that the issue disappears the moment I remove Xamarin.Firebase.lid from the packages, and it returns the moment I put this package back in.
I of course hadn't expected this failure to tie so closely to another package that is ALSO from Google and meant for use with Firebase.
Has anyone else encountered this problem? If so, how did you work around it?
I eventually found that the ONLY way to fix this was to build against MONOANDROID 8.0. You can still TARGET Android 9.0 in your app, but all of your packages must be the older ones that work on MONOANDROID 8.0. If the package doesn't care, you can use the most recent of those.
I've read through all the posts and articles I can find, but I am still struggling to get my Actors building. As the title indicates, I've upgraded my app from .net core 2.2.7 to 3.0 and now the actors in my solution fail to build. The exact error is:
error MSB3073: The command "dotnet "obj\\FabActUtilTemp\FabActUtil.dll"
/spp:"PackageRoot" /t:manifest /sp:"[ProjectName]" /in:"bin\Debug\netcoreapp3.0\win7-x64\\[ProjectName].dll" /arp:
"[ProjectPath]\bin\Debug\netcoreapp3.0\win7-x64\\" /smep:Exe " exited with code
-2147450749. [ProjectPath].csproj]
Does anyone know why this might be?
Hit the same issue today, there are some possible reasons for this ticket293, ticket150.
Please make sure your projects are using the same latest version of service fabric libraries, e.g. Microsoft.ServiceFabric.Actors, and after updating the libraries, some break changes can be involved. Resolving the break changes (probably hence build errors) and run a clean build.
I am attempting to add a CefSharp control to an AnyCPU project. I have followed the instructions here: https://github.com/cefsharp/CefSharp/issues/1714 and I thought I had everything working correctly. I pushed my changes to to SVN and then checked out a clean copy.
The first time I attempted to build using that clean copy, I received this error:
error MC3074: The tag 'ChromiumWebBrowser' does not exist in XML namespace 'clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf'. Line 18 Position 14.
as a result of this error, several other libraries fail to compile. If I attempt to build again, everything compiles fine.
I ran a diagnostic build, and, it appears that the CefSharp packages are in fact being installed from NuGet prior to this error and, the error occurs during MarkupCompilePass1.
This seems very, very similar to this issue: https://github.com/dotnet/project-system/issues/4158, however, in that case, it sounds as if the problem was resolved by switching from package.config to PackageReference, but, that approach did not seem to fix my error.
I have read https://www.xavierdecoster.com/post/2014/03/06/migrate-away-from-msbuild-based-nuget-package-restore.html as amaintland suggested in the issue I mentioned above, and, unless I'm misunderstanding, it's not a solution that I can use. For the time being, out continuous integration runs on CruiseControl (which isn't mentioned as a tool that supports automatic package restore out of the box), and we're stuck on VS 2013.
Right now the only option that I can find that seems like it might work is checking the NuGet packages into SVN. This is a last resort solution for me, but, lacking a better option, I don't know what to do.
If anyone has any insights or suggested steps, I would really appreciate the advice.