Xamarin forms Droid : keytool error- cannot import existing keystore after archiving app .aab - xamarin.forms

I am using xamarin forms on MAC.
In my Mac, I'm trying to import an existing keystore that has been created in Windows 10 to publish my droid app but it gives me this error :
keytool error: java.lang.Exception: Alias <lealtd> does not exist
java.lang.Exception: Alias <lealtd> does not exist
at java.base/sun.security.tools.keytool.Main.doPrintEntry(Main.java:2038)
at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:1271)
at java.base/sun.security.tools.keytool.Main.run(Main.java:412)
at java.base/sun.security.tools.keytool.Main.main(Main.java:405)
I have tried to open my keystore using Keystore explore it works and I can see all the infos. I do not understand why it is not working on Xamarin
Thanks for your help

I have rename my alias because there were a space and it works :
keytool -changealias -alias "lealtd " -destalias "lealtd" -keystore lealtd.keystore

Related

Flutter - http.get fails on macos build target: Connection failed

I started porting my Flutter app to macos Desktop. The UI started fine. However, as soon as the app makes a network call, it fails instantly with Connection failed (OS Error: Operation not permitted).
Running a one-liner:
final response = await http.get('https://jsonplaceholder.typicode.com/posts/1');
fails with:
Unhandled Exception: SocketException: Connection failed (OS Error:
Operation not permitted, errno = 1),
address = jsonplaceholder.typicode.com, port = 443
#0 IOClient.send (package:http/src/io_client.dart:33:23)
The macos build target comes from Google's sample here.
Flutter (Channel master, v1.9.8-pre.108)
Per my comment on the other answer, you should not use the Xcode capabilities UI for this. It will not correctly handle the two separate entitlement files in a Flutter project.
You need to add:
<key>com.apple.security.network.client</key>
<true/>
to macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements.
This is documented here and here.
Your macOS XCode project lacks Internet permission called "Outgoing Connections (Client)".
Open your macos xcode project - [root]/macos/Runner.xcworkspace
Click "Runner" in Project navigator - general settings will show up. Select "Capabilities" from tabbar and tick option "Outgoing Connections (Client)".
Rebuild your application inside XCode and launch the project.
If you are getting this error Only in Android release then Internet permission must be missing from main manifest. You just need to add Internet permission in Manifest file.
Just add this permission in manifest <uses-permission android:name="android.permission.INTERNET"/>
There are three manifest file available in Android folder
app/src/debug
app/src/main
app/src/profile

Cannot import the following key file: tSQLtOfficialSigningKey.pfx when running building tSLQt

I am trying to run tSQLt solution locally by following instructions in the tSQLt\Build\Install the tSQLt build.docx.
Re-built tSQLtCLR solution:
1>------ Rebuild All started: Project: tSQLtCLR, Configuration: Debug Any CPU ------
2>------ Rebuild All started: Project: tSQLtTestUtilCLR, Configuration: Debug Any CPU ------
3>------ Rebuild All started: Project: tSQLtExternalAccessKey, Configuration: Debug Any CPU ------
4>------ Rebuild All started: Project: UnsignedEmpty, Configuration: Debug Any CPU ------
1> tSQLtCLR -> E:\Source\tSQLt\tSQLtCLR\tSQLtCLR\bin\Debug\tSQLtCLR.dll
2> tSQLtTestUtilCLR -> E:\Source\tSQLt\tSQLtCLR\tSQLtTestUtilCLR\bin\Debug\tSQLtTestUtilCLR.dll
3> tSQLtExternalAccessKey -> E:\Source\tSQLt\tSQLtCLR\tSQLtExternalAccessKey\bin\Debug\tSQLtExternalAccessKey.dll
4> UnsignedEmpty -> E:\Source\tSQLt\tSQLtCLR\UnsignedEmpty\bin\Debug\UnsignedEmpty.dll
========== Rebuild All: 4 succeeded, 0 failed, 0 skipped ==========
I've create self-signed certificate:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
Then I've created pfx file:
openssl pkcs12 -export -out E:\Source\tSQLt\tSQLtCLR\OfficialSigningKey\tSQLtOfficialSigningKey.pfx -inkey key.pem -in cert.pem
Then I double clicked on that new pfx file and imported it for current user.
Finally run Menu / Tools / tSQLt local Dev_tSQL and getting following error:
+-------------------+
: Starting BUILD :
+-------------------+
NAnt 0.92 (Build 0.92.4543.0; release; 2012-06-09)
Copyright (C) 2001-2012 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///E:/Source/tSQLt/Build/tSQLt.build
Target framework: Microsoft .NET Framework 4.0
Target(s) specified: all
init:
init.tSQLt:
[delete] Deleting directory 'E:\Source\tSQLt\Build\temp'.
[mkdir] Creating directory 'E:\Source\tSQLt\Build\temp'.
clr.compile:
[echo] Compile CLR Command: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" tSQLtCLR.csproj /p:Configuration=CruiseControl /nologo
[exec] Build started 2019-08-11 10:47:46 AM.
[exec] Project "E:\Source\tSQLt\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj" on node 1 (default targets).
[exec] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2482,5): error MSB3325: Cannot import the following key file: tSQLtOfficialSigningKey.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_C20B79DE0583A5C1 [E:\Source\tSQLt\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj]
[exec] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2482,5): error MSB3321: Importing key file "tSQLtOfficialSigningKey.pfx" was canceled. [E:\Source\tSQLt\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj]
[exec] Done Building Project "E:\Source\tSQLt\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj" (default targets) -- FAILED.
[exec]
[exec] Build FAILED.
[exec]
[exec] "E:\Source\tSQLt\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj" (default target) (1) ->
[exec] (ResolveKeySource target) ->
[exec] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2482,5): error MSB3325: Cannot import the following key file: tSQLtOfficialSigningKey.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_C20B79DE0583A5C1 [E:\Source\tSQLt\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj]
[exec] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2482,5): error MSB3321: Importing key file "tSQLtOfficialSigningKey.pfx" was canceled. [E:\Source\tSQLt\tSQLtCLR\tSQLtCLR\tSQLtCLR.csproj]
[exec]
[exec] 0 Warning(s)
[exec] 2 Error(s)
[exec]
[exec] Time Elapsed 00:00:00.49
BUILD FAILED
E:\Source\tSQLt\Build\tSQLt.build(53,4):
External Program Failed: cmd (return code was 1)
Total time: 0.8 seconds.
+-------------------+
: BUILD FAILED :
+-------------------+
UPDATE:
After pfx file was generated and 4 of them were replaced in the project. After that I open tSQLtCLR solution and went to each project properties (except UnsignedEmpty project), then to the Signing tab and there I tick `Sign the assembly" tick, choose the key. It asked for password I didn't entered any, just clicked OK as the key was created without password. Then I clean/rebuild the solution and got the errors:
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3214,5): error MSB3325: Cannot import the following key file: tSQLtOfficialSigningKey.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_FAD69C25E7450957
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3214,5): error MSB3321: Importing key file "tSQLtOfficialSigningKey.pfx" was canceled.
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3214,5): error MSB3325: Cannot import the following key file: tSQLtOfficialSigningKey.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_3A487AA7CCDAEF2F
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3214,5): error MSB3321: Importing key file "tSQLtOfficialSigningKey.pfx" was canceled.
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3214,5): error MSB3325: Cannot import the following key file: tSQLtOfficialSigningKey.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_5C6CEC0DAE821947
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3214,5): error MSB3321: Importing key file "tSQLtOfficialSigningKey.pfx" was canceled.
4> UnsignedEmpty -> E:\Source\tSQLt\tSQLtCLR\UnsignedEmpty\bin\Debug\UnsignedEmpty.dll
The key is indeed password protected. You need to overwrite it with your own key locally.
Make sure you mark the file as exception in Git should you plan to do a pull request in the future.

Swift authentication when try to connect via API

I am a team member of research group and my current research needs to use Openstack Swift.
We have installed Openstack Juno and it works perfectly. For installation Packstack have used used. The swift service is also installed on the server and it works! We have tried to access it from the console create container, upload a file etc. everything works.
So we went further and tried to access swift using its API. Here we faced a problem on the phase of authentication.
Below you can see the simple python code I am using to check if I can connect to Swift.
import swiftclient
import keystoneclient
conn = swiftclient.Connection(
authurl='http://*[server ip]*:5000/v2.0/',
user='account_name:username',
key='serverpassword',
auth_version="2.0").get_auth()[0]
for container in conn.get_account()[1]:
print container['name']
Before executing the cod on client computer, I have installed the following necessary packages.
sudo aptitude install python-pip
sudo pip install python-swiftclient
sudo pip install python-keystoneclient
Here you can see the error which occurs during execution of the code.
Traceback (most recent call last):
File "new.py", line 15, in <module>
auth_version="2.0").get_auth()[0]
File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 1332, in get_auth
timeout=self.timeout)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 463, in get_auth
auth_version=auth_version)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 366, in get_auth_keystone
ksclient, exceptions = _import_keystone_client(auth_version)
File "/usr/local/lib/python2.7/dist-packages/swiftclient/client.py", line 351, in _import_keystone_client
variables to be set or overridden with -A, -U, or -K.''')
swiftclient.exceptions.ClientException:
Auth versions 2.0 and 3 require python-keystoneclient, install it or use Auth
version 1.0 which requires ST_AUTH, ST_USER, and ST_KEY environment
variables to be set or overridden with -A, -U, or -K.
I have tried to find the solution searching in the Internet but I have not succeed.

Code signing error while building the realm framework for Swift 2.0

I'm trying to build the Realm framework for Swift 2.0 by following the steps mentioned in Realm Swift documentation. But as soon as I run the script to build the framework, the following error appears
Building with command: xcodebuild
-IDECustomDerivedDataLocation=build/DerivedData -project Realm.xcodeproj -scheme 'iOS' -configuration Release -sdk iphoneos
User defaults from command line:
IDECustomDerivedDataLocation = build/DerivedData
Build settings from command line:
SDKROOT = iphoneos8.4
=== BUILD TARGET iOS OF PROJECT Realm WITH CONFIGURATION Release ===
Check dependencies Code Sign error: No code signing identities found:
No valid signing identities (i.e. certificate and private key pair)
matching the team ID “(null)” were found. CodeSign error: code signing
is required for product type 'Framework' in SDK 'iOS 8.4'
** BUILD FAILED **
The following build commands failed: Check dependencies (1 failure)
Can someone help me to solve this error?
Thanks
Suraj

Error packaging and signing BlackBerry WebWorks SDK application for Playbook

I've been trying to follow the BlackBerry docs on signing a WebWorks SDK application on the command line and uploading to App World.
Here is a chart showing the high level picture, and here are the detailed instructions I am trying to follow.
I ran the first few steps successfully:
C:\MyDir>blackberry-signer -csksetup -cskpass <mypwd>
CSK file created.
C:\MyDir>blackberry-signer -register -csjpin <mypin> -cskpass <mypwd> client-RDK-<snip>.csj
Successfully registered with server.
C:\MyDir>blackberry-keytool -genkeypair -keystore sigtool.p12 -storepass <mypwd> -dname "cn=<My Company>" -alias author
<No output!>
The instructions now say I need to package my BAR file. It links to another web page that says to run a command like this:
blackberry-airpackager -package output_filename project_name-app.xml project_name.swf any_other_project_files
Although that sounds like it applies to an AIR application instead of a WebWorks SDK one I try it anyway, and I get an error:
C:\MyDir>blackberry-airpackager -package output\MyApp.bar config.xml input
C:\MyDir\config.xml: error 102: Invalid namespace http://www.w3.org/ns/widgets
Error: AIR validation failed
I then see if either of the blackberry-packager or blackberry-nativepackager commands is the right one. Running blackberry-nativepackager yields this error Error: not qnx tag or two many, and the usage of blackberry-packager seems to be inappropriate, e.g.
Usage:
blackberry-packager -generatemanifest [<manifest-file>]
blackberry-packager -verifymanifest <manifest-file>
blackberry-packager -metafolder <META-INF folder> [-javafolder <java-folder>] [-datafolder <data-folder>] [-nativefolder <native-folder>] [-airfolder <air-folder>] [-nocompression] <barfile.bar> (<inputfile>)*
So, I now revert back to packaging as I originally did during my testing, i.e. I create a ZIP file and use bbwp.exe:
C:\MyDir>bbwp.exe "MyApp.zip" -o "output"
[INFO] Parsing command line options
<snip>
[INFO] Packaging the bar file
[INFO] Bar packaging complete
[INFO] WebWorks application packaging complete
That looks good so I move onto the final two steps, which are:
blackberry-signer -verbose -cskpass <mypwd> -keystore sigtool.p12 -storepass <mypwd> output\MyApp.bar RDK
blackberry-signer -keystore sigtool.p12 -storepass <mypwd> output\MyApp.bar author
Unfortunately the first of these steps fails:
C:\MyDir>blackberry-signer -verbose -cskpass <mypwd> -keystore sigtool.p12 -storepass <mypwd> output\MyApp.bar RDK
<snip>
42 43 65 30 58 31 19 36 79 22 50 64 71 12 38 4e
74 68 78 34
Connecting to url http://www.rim.net/Websigner/servlet/RDK-Waterloo
Sending properties to server...
Properties of response := [
Version = 1
Response = Signature Response
Confirm = null
Error = Code signing request failed because Application-Development-Mode in Manifest is present and is not set to [false].
]
barsigner error: server error: Code signing request failed because Application-Development-Mode in Manifest is present and is not set to [false].
That exact error is documented here, along with this explanation of it:
Code signing request failed because Application-Development-Mode in Manifest is present and is not set to false
Description
This message appears when you try to sign a .bar file that
was packaged in Development mode.
Possible solution
Repackage the .bar file. If you use
blackberry-packager, or another
command line tool, do not include the
debug option in your command line.
Unfortunately that doesn't help me at all. My understanding is that the config.xml file in the WebWorks SDK replaces the need for a MANIFEST.MF file.
Can anybody help me with this misery?
You can try posting in the BlackBerry Web Development support forum, there is RIM staff monitoring that forum:
http://supportforums.blackberry.com/t5/Web-Development/bd-p/browser_dev
As I suspected, my problem appears to be that I was following the signing instructions for an AIR application, not a WebWorks SDK application.
Here are the WebWorks SDK instructions to follow, along with summary steps below.
blackberry-signer -csksetup -cskpass <mypwd>
blackberry-signer -register -csjpin <mypin> -cskpass <mypwd> client-RDK-<snip>.csj
blackberry-keytool -genkeypair -keystore sigtool.p12 -storepass <mypwd> -dname "cn=<My Company>" -alias author
bbwp.exe "MyApp.zip" -gcsk <mypwd> -gp12 <mypwd> -o "output"
I had originally followed these steps successfully, and my confusion started because BlackBerry sent me an e-mail after my first submission which said:
Also, to make your app available for
download, there is one additional
step. Each app must be “signed” and
resubmitted into BlackBerry App World;
if you haven’t signed your application
please review our blog post that
contains the needed information to
sign your application. Please sign
your application and resubmit to
BlackBerry App World. When
resubmitting add “_signed” to the end
of the bundle name and rest assured
you will not lose your spot in the
review queue.
I e-mailed them asking them to confirm if there was a problem with my signing, and I hadn't got a reply after 5 days, so I thought I may have followed the wrong instructions. :-(
FTR, this question was cross posted with the BlackBerry developer forum here.

Resources