What is the current version of the corda accounts library? - corda

I cannot create a new AccountInfo. I have set up the corda accounts library to version 1.0-RC01 and am running into:
java.lang.NoClassDefFoundError: com/r3/corda/lib/accounts/contracts/states/AccountInfo

Accounts SDK is still at the development stage. There is no guarantee of functional stability. We also did not release any official "versions" with the account SDK.

Related

Cordapp migration from open source to enterprise

We are looking for migration of Corda open source to Enterprise. As part of this migration we need to deploy the Cordapp which was there in the open source to Enterprise. Are there any document available for reference on the challenges or issues faced during Cordapp deployment.
When you want to upgrade from Corda OS to Corda Enterprise you have to consider following items:
1. Corda Node Upgrade
2. Corda Database Upgrade
3. CorDapp Upgrade
4. Corda Constraint Migration (if you are not using Signature Constraints)
For Corda node and CordDapp upgrade refer to this [blog][1].
For Database migration refer to [this][2] and [this][3] blog.
For Corda Constarint migration refer to [this][4] blog.
There are also some videos which show you how to perform the migration. take a look here-
1. https://www.youtube.com/watch?v=rWyJRaoWNhc&t=1186s
2. https://www.youtube.com/watch?v=gs6yGZnDW5g
3. https://www.youtube.com/watch?v=0BKUUY4Tg20&t=84s
4. https://www.youtube.com/watch?v=69un7I-Amwc&t=622s
If you face any difficulty you can get in touch with me on [slack][5].
[1]: https://medium.com/corda/contract-upgrades-and-constraints-in-corda-425055a9a47f
[2]: https://medium.com/corda/cordapp-database-upgrade-migration-development-perspective-c2931e28b9b4
[3]: https://medium.com/corda/cordapp-database-upgrade-migration-production-perspective-5f655838492d
[4]: https://medium.com/corda/unconstraint-signature-constraint-migration-e95a66789eab
[5]: https://join.slack.com/t/cordaledger/shared_invite/zt-qg4fft35-ldb97HIf74gImY9XuGybUg

Unity Firebase Crashlytics not sending any crash reports, getting "failed to retrieve settings" error on logcat

Unity editor version: 2019.3.15f1
Firebase Unity SDK version: firebase_unity_sdk_6.15.2
Additional SDKs im using: Unity IAP, Gamesparks, Ironsource, Facebook, Appsflyer, GameAnalytics
Platform im using the Unity editor on: Windows
Platform im targeting: Android
Scripting Runtime: IL2CPP
Problem
I am getting data on firebase analytics, but I cannot get crashlytics to report anything. Im stuck on this...
Steps to reproduce:
Add the firebase analytics and crashlytics sdks.
Add the google-services.json GoogleService-Info.plist files somewhere in assets folder
Add this code to initialise the firebase
// Use this for initialization
void Start ()
{
// Initialize Firebase
Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => {
var dependencyStatus = task.Result;
if (dependencyStatus == Firebase.DependencyStatus.Available)
{
// Create and hold a reference to your FirebaseApp,
// where app is a Firebase.FirebaseApp property of your application class.
// Crashlytics will use the DefaultInstance, as well;
// this ensures that Crashlytics is initialized.
Firebase.FirebaseApp app = Firebase.FirebaseApp.DefaultInstance;
// Set a flag here for indicating that your project is ready to use Firebase.
VisualDebugger.SetText("crashlytics initialised");
}
else
{
UnityEngine.Debug.LogError(System.String.Format(
"Could not resolve all Firebase dependencies: {0}",dependencyStatus));
VisualDebugger.SetText("crashlytics NOT initialised: " + dependencyStatus);
// Firebase Unity SDK is not safe to use here.
}
});
Invoke("IsCrashEnabled", 5f);
}
void IsCrashEnabled()
{
VisualDebugger.AddLine("IsCrashlyticsCollectionEnabled: "+Firebase.Crashlytics.Crashlytics.IsCrashlyticsCollectionEnabled);
}
In order to get the app to run with the facebook sdk installed Ive added these two lines to proguard-user.txt
-keep public class com.facebook.**{public *; }
-keep public class com.facebook.internal.**{ public *; }
and commented out the following lines from mainTemplate.gradle
//implementation 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
//implementation 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
//implementation 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
When I run the app, firebase is initialised successfully. Also Firebase.Crashlytics.Crashlytics.IsCrashlyticsCollectionEnabled returns true.
I crash the app in a number of different ways, then open it again without reinstalling. But no crash reports are sent.
When I watch logcat when starting the app I see this error from firebase each time the app is opened
2020-09-28 16:18:59.332 25773-25847/? E/FirebaseCrashlytics: Failed to retrieve settings from https://firebase-settings.crashlytics.com/spi/v2/platforms/android/gmp/REDACTEDblahblahblah/settings
Update Oct 19, 2020:
Today a developer updated the issue I linked in this answer saying the Firebase team fixed a backend bug last Friday (Oct 16) that was affecting some new Unity Android apps registering w/ Firebase - likely the bug behind your issue. I had already solved the issue in my own project using the below solution, but if you haven't yet updated your project, I recommend running it again and seeing if Crashlytics is working for you now..
I've been dealing with the same issue this week in Unity 2019.4.11f1 - i see the same error message about not being able to retrieve settings, but with my specific project and appIds in the URL.
I found a solution in this Github issue, which suggests the problem is caused by the version of an android library that is a dependency for the Unity Firebase Crashlytics package. My rough understanding is that the firebase-crashlytics-unity library is a wrapper around android library firebase:firebase-crashlytics, and the unity package allows the underlying native Android code to be used from Unity. Version com.google.firebase:firebase-crashlytics:17.10.0 has issues with getting the settings for some Firebase projects on Android. Myself and several others following this issue found forcing Unity to use this specific dependency at version 17.1.1 resolved the issue.
Someone else with the same issue in the thread contacted Firebase support and was told:
The error you are seeing "Failed to retrieve settings" is related to
the SDK version being used. If you go to "Assets > Firebase > Editor>
CrashlyticsDependencies" you can manually update the SDK to point to
the latest Crashlytics SDK version 17.2.2. Please give it a try and if
you continue having issues, let me know.
It turned out this advice wasn't quite right - some of us following the thread then experienced a different issue when using the Android Crashlytics SDK version 17.2.2 with Unity crashlytics version 6.16.0. So I'd specifically recommend trying out the below suggestion or other solutions in the thread to set your Android crashlytics library to v17.1.1.
Changes I made in my project to address this:
First, I updated my unity firebase packages in the package manager to use version 6.16.0. In my project 4 packages were installed - core, analytics, crashlytics, and messaging.
Then I searched for the the Crashlytics package's dependency file - Crashlytics-Dependencies.xml (found by searching project - was in /Library/PackageCache/com.google.firebase.crashlytics#6.16.0/Firebase/Editor/ for me). This file initally had "com.google.firebase:firebase-crashlytics:17.0.0" listed, which I updated to be: "com.google.firebase:firebase-crashlytics:17.1.1".
As an extra precaution, I also added created a MyProject-Dependencies.xml file, as was suggested by a user in the thread - this file also specifies version "com.google.firebase:firebase-crashlytics:17.1.1".
Next, I modified the Unity build process to use a custom mainTemplate.gradle file to specify dependencies,
rather than using the External Dependency Resolver to manage and
embed unity packages (option in Build Settings > PlayerSettings >
Android).
I also updated the settings on the External Dependency Manager Android Ressolver:
Disabled AutoResolve and Disabled Resolve on Build (we dont want EDM updating dependencies without our knowledge when building)
I also turned disabled AndroidPackageInstallationEnabled - this has made the resolution process much faster and removed a bunch of .aar files from the android dependencies list, and hasn't caused any problems in my project.
I then ran External Dependency Resolver > Android > Force Resolve, which after the settings changes above, should now embed a list of the dependencies for the Android build into the mainTemplate.gradle file - Check this file (its in Assets/Plugins/Android) and you should now see com.google.firebase:firebase-crashlytics:17.1.1 in that list.
Also, I recommend reading this article about managing Unity Firebase dependencies from one of the Firebase developer advocates, Patrick Martin. It helped me wrap my head around how Android dependency management in Unity works, as well as how the Android gradle build process works.

Unity's ResolutionFailedException

I have an old Asp.Net web application using Unity for dependency injection.
Today I updated the Unity using NuGet to the latest version. On trying to run the application, I am getting an exception:
Unity.Exceptions.ResolutionFailedException: 'Resolution of the dependency failed, type = 'SOME.Services.ISomeService', name = '(none)'.
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The property converter on type DAL.Repositories.SomeRepository is not settable.
The exception happened on line
_someService = container.Resolve<ISomeService>();
I am very new to Unity. Could you please help?
The newer versions of Unity have breaking changes.
You may want to stick with the older versions of the DLL until you refactor the changes.
v4.0.1 Version 4.x is dead. Loss of original signing certificate made
it impossible to release anything compatible with v4.0.1 release. To
give original developers a credit only about 60 issues were found
during two years in production. To move on and enable further
development version v5 has been created.
v5.x Version 5.x is created as replacement for v4.0.1. Assemblies and
namespaces are renamed and refactored but otherwise it is compatible
with the original. v5.0.0 release fixes most of the issues found in
v4.0.1 and implements several optimizations but the accent was on
compatibility and if optimization would break API it was omitted. Once
stabilized, this version will enter LTS status and will be patched and
fixed for the next few years. There will be no significant development
in this line.
Check their road map here.

Changing certificate for live application and purchases

I have a live app in the Xamarin UWP store and I have implemented the trial and a paid version which is working fine. Now I want to publish a new update of the app after I converted from PCL to.Net Standard 2.0. when I build, I get the certificate error and it asks me to enter the password for the certificate I uploaded to the server.
It doesn't accept my password. I am pretty sure that I enter a correct password. I don't know the reason. So my questions are;
Does certificate play any role in LicenseInformation? I am basically checking if it is trial or not with the code below. If I create a new certificate, will that cause any effect on existing purchases?
I tried with the new certificate using local CurrentAppSimulator, all works fine but although I re-associated to store app, I get exception using CurrentApp as below. Is it because of I am using different certificate than in the store? So if I provide a new submission with a new certificate, the problem will be solved?
System.ExceptionException from HRESULT: 0x803F6107 Raw at
Windows.ApplicationModel.Store.CurrentApp.get_LicenseInformation()
#if !DEBUG
licenseInformation = CurrentApp.LicenseInformation;
#else
licenseInformation = CurrentAppSimulator.LicenseInformation;
#endif
licenseInformation.LicenseChanged +=LicenseInformation_LicenseChanged;
if (licenseInformation.IsActive)
{
if (licenseInformation.IsTrial)
{
Now I want to publish a new update of the app after I converted from PCL to .Net Standard 2.0.
If you switch to the latest .NET Standard 2.0, you'd better use the Windows.Services.Store namespace relevant APIs instead. The Windows.ApplicationModel.Store Namespace document has explained clearly.
The Windows.ApplicationModel.Store namespace is no longer being updated with new features. If your project targets Windows 10 Anniversary Edition (10.0; Build 14393) or a later release in Visual Studio (that is, you are targeting Windows 10, version 1607, or later), we recommend that you use the Windows.Services.Store namespace instead. For more information, see In-app purchases and trials. The Windows.ApplicationModel.Store namespace is not supported in Windows desktop applications that use the Desktop Bridge or in apps or games that use a development sandbox in Dev Center (for example, this is the case for any game that integrates with Xbox Live). These products must use the Windows.Services.Store namespace to implement in-app purchases and trials.

kaa_profile.h in generated SDK

Run into the following problem while running test program on Kaa SDK in C:
"[ERROR] [kaa.c:233] (-18) - Profile isn't set"
Try to initialize the "Profile" but can't found profile.h. Anyone has any ideas?
The 'profile' is a Kaa extention and thus is located separately:
https://github.com/kaaproject/kaa/blob/master/client/client-multi/client-c/src/extensions/profile/kaa_profile.h
You might find examples on the extention(s) usage in the Kaa Sample Application repository on GitHub. Also, try Kaa Sandbox that was specially developed for fast and easy startup with Kaa.

Resources