crowdin / crowdin-cli

A command-line client for the Crowdin API
https://crowdin.github.io/crowdin-cli
MIT License
245 stars 92 forks source link

crowdin upload initialization failure on Ubuntu 18.04 #80

Closed bolelamx closed 4 years ago

bolelamx commented 6 years ago

It shows an error

"Initialization Crowdin Cli failed. Please check your configuration file and credentials."

when I run

crowdin upload -b test

crowdin.yml

"project_identifier" : MY_PROJECT
"api_key" : MY_API_KEY
"base_path" : ""

files: [
 {
  "source" : "/src/i18n/en.json",
  "translation" : "/src/i18n/%two_letters_code%.json"
 }
]

OS

Ubuntu 18.04 LTS (Bionic Beaver)

crowdin --version

Crowdin CLI version is 2.0.22

java -version

openjdk 10.0.1 2018-04-17 OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1) OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

Andrulko commented 6 years ago

@bolelamx The configuration itself looks simple & valid. It worked fine on Windows machine, CLI 2.0.20 / CLI 2.0.22.

Can you please try to specify the base path as "base_path" : "." or remove it completely?

Please make sure that valid project API credentials are specified in the configuration. You can find them in the project settings -> API tab

bolelamx commented 6 years ago

@Andrulko I have valid credentials in the config file and I tried to change/remove base_path from there, but it still doesn't work btw it worked on Ubuntu 16.04 for me

Andrulko commented 6 years ago

@bolelamx The crowdin lint command is not helpful either? @ihor-popyk any ideas? 💡

bolelamx commented 6 years ago

@Andrulko Unfortunately no

crwodin lint returns the same error

Initialization Crowdin Cli failed. Please check your configuration file and credentials.

bolelamx commented 6 years ago

Also I tried run it in debug mode

java -jar ../../Downloads/crowdin-cli/2.0.22/crowdin-cli.jar upload -b test --debug

and it outputs

Initialization Crowdin Cli failed. Please check your configuration file and credentials.
com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)
    at com.sun.jersey.api.client.Client.handle(Client.java:652)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509)
    at com.crowdin.utils.HttpRequest.get(HttpRequest.java:70)
    at com.crowdin.client.CrowdinApiClientImpl.proccesing(CrowdinApiClientImpl.java:345)
    at com.crowdin.client.CrowdinApiClientImpl.init(CrowdinApiClientImpl.java:248)
    at com.crowdin.cli.commands.Commands.initCli(Commands.java:850)
    at com.crowdin.cli.commands.Commands.initialize(Commands.java:127)
    at com.crowdin.cli.commands.Commands.run(Commands.java:211)
    at com.crowdin.cli.Cli.main(Cli.java:17)
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1964)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1921)
    at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1904)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1420)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347)
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:253)
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)
    ... 11 more
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:91)
    at sun.security.validator.Validator.getInstance(Validator.java:179)
    at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312)
    at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1596)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:987)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
    ... 20 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
    at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
    at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
    at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:89)
    ... 32 more
Andrulko commented 6 years ago

@bolelamx Can you please send me your config (crowdin.yml) privately via email? It's andriy@crowdin.com

Not sure, probably there are some invisible chars in the config? The one I've copied from your previous message worked fine on Windows. You can find it here: https://drive.google.com/file/d/1vEThv1YzyzEbIW39trQOcRgPS9byK_Kd/view?usp=sharing

Did you try to update Java? 😄 sudo apt-get install default-jdk

bolelamx commented 6 years ago

@Andrulko I don't think that there is a problem with config file because it works on VM with Ubuntu 16.04 I even tried to downgrade it ) the same as on Ubuntu 16.04 openjdk version "1.8.0_162"

Andrulko commented 6 years ago

@bolelamx I'm trying to suggest any possible workarounds, sorry :) Trying to reproduce on my end, also CLI developer will check this too of course

bolelamx commented 6 years ago

np, thank you!

ihor-popyk commented 6 years ago

@bolelamx , @Andrulko
TX for report, I'll check it.

JC5 commented 6 years ago

Same problem here. I've freshly installed Crowdin using this piece of code:

Code:

# Install crowdin tool
wget -qO - https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
sudo touch /etc/apt/sources.list.d/crowdin.list
sudo add-apt-repository "deb https://artifacts.crowdin.com/repo/deb/ /" 
sudo apt-get update
sudo apt-get install crowdin -y

Error:

vagrant@ubuntu-bionic:/sites/FF3/help$ java -jar /usr/local/bin/crowdin-cli.jar upload -b test --debug
Initialization Crowdin Cli failed. Please check your configuration file and credentials.
com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)
    at com.sun.jersey.api.client.Client.handle(Client.java:652)
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509)
    at com.crowdin.utils.HttpRequest.get(HttpRequest.java:70)
    at com.crowdin.client.CrowdinApiClientImpl.proccesing(CrowdinApiClientImpl.java:345)
    at com.crowdin.client.CrowdinApiClientImpl.init(CrowdinApiClientImpl.java:248)
    at com.crowdin.cli.commands.Commands.initCli(Commands.java:850)
    at com.crowdin.cli.commands.Commands.initialize(Commands.java:127)
    at com.crowdin.cli.commands.Commands.run(Commands.java:211)
    at com.crowdin.cli.Cli.main(Cli.java:17)

System:

vagrant@ubuntu-bionic:/sites/FF3/help$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:    18.04
Codename:   bionic

Java:

vagrant@ubuntu-bionic:/sites/FF3/help$ java -version
openjdk version "10.0.1" 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)
Andrulko commented 6 years ago

@JC5 Just for a test, can you please try to install it not from terminal directly, but this way: https://support.crowdin.com/cli-tool/#standalone-version

1. Download crowdin-cli.zip from here: https://downloads.crowdin.com/cli/v2/crowdin-cli.zip 2. Unpack it 3. Run . crowdin.sh in the terminal with sudo rights in order to add crowdin command to your terminal

Not sure if there is a big difference between package on Debian / available on Crowdin, I'm also trying to compare

JC5 commented 6 years ago

Sorry, no luck. I had to disable the Java check because it got stuck on "10.0.1". Here's the full output.

vagrant@ubuntu-bionic:~$ wget https://downloads.crowdin.com/cli/v2/crowdin-cli.zip
--2018-05-23 10:48:02--  https://downloads.crowdin.com/cli/v2/crowdin-cli.zip
Resolving downloads.crowdin.com (downloads.crowdin.com)... 52.45.119.182, 50.17.162.173
Connecting to downloads.crowdin.com (downloads.crowdin.com)|52.45.119.182|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7113126 (6.8M) [application/zip]
Saving to: ‘crowdin-cli.zip’

crowdin-cli.zip                    100%[================================================================>]   6.78M  3.65MB/s    in 1.9s

2018-05-23 10:48:06 (3.65 MB/s) - ‘crowdin-cli.zip’ saved [7113126/7113126]

vagrant@ubuntu-bionic:~$ unzip crowdin-cli.zip
Archive:  crowdin-cli.zip
   creating: 2.0.22/
  inflating: 2.0.22/setup_crowdin.bat
  inflating: 2.0.22/crowdin-cli.jar
  inflating: 2.0.22/crowdin.bat
  inflating: 2.0.22/crowdin.sh
vagrant@ubuntu-bionic:~/2.0.22$ . crowdin.sh
/usr/bin/java
Your Java version is 10.0.1 - needs to be updated. You can download it from https://www.java.com/
vagrant@ubuntu-bionic:~/2.0.22$ sudo su
root@ubuntu-bionic:/home/vagrant/2.0.22# . crowdin.sh
/usr/bin/java
Your Java version is 10.0.1 - needs to be updated. You can download it from https://www.java.com/
root@ubuntu-bionic:/home/vagrant/2.0.22# exit
exit
vagrant@ubuntu-bionic:~/2.0.22$ nano crowdin.sh
vagrant@ubuntu-bionic:~/2.0.22$ sudo su
root@ubuntu-bionic:/home/vagrant/2.0.22# . crowdin.sh
/usr/bin/java
Your Java version is 10.0.1 - OK
root@ubuntu-bionic:/home/vagrant/2.0.22# exit
exit
vagrant@ubuntu-bionic:~/2.0.22$ cd /sites/FF3/firefly-iii
vagrant@ubuntu-bionic:/sites/FF3/firefly-iii$ crowdin
crowdin: command not found
vagrant@ubuntu-bionic:/sites/FF3/firefly-iii$ cd ~
vagrant@ubuntu-bionic:~$ cd 2.0.22/
vagrant@ubuntu-bionic:~/2.0.22$ . crowdin.sh
/usr/bin/java
Your Java version is 10.0.1 - OK
vagrant@ubuntu-bionic:~/2.0.22$ cd /sites/FF3/firefly-iii
vagrant@ubuntu-bionic:/sites/FF3/firefly-iii$ crowdin upload
Initialization Crowdin Cli failed. Please check your configuration file and credentials.

I also had to run the . crowdin.sh under the vagrant user to get the command to work.

I'll try next with Oracle Java.

JC5 commented 6 years ago

Sorry, nothing.

vagrant@ubuntu-bionic:/sites/FF3/firefly-iii$ java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
vagrant@ubuntu-bionic:/sites/FF3/firefly-iii$ crowdin upload
Initialization Crowdin Cli failed. Please check your configuration file and credentials.
vagrant@ubuntu-bionic:/sites/FF3/firefly-iii$
Andrulko commented 6 years ago

@ihor-popyk Might it be somehow linked with Java version? @JC5 Sorry to hear it didn't help, we are working on that and solution will be delivered soon

balderdash commented 6 years ago

There are a couple workarounds for this problem at https://stackoverflow.com/a/50103533.

I got around it by invoking Java with the option -Djavax.net.ssl.trustStorePassword=changeit, i.e.

java -Djavax.net.ssl.trustStorePassword=changeit -jar ~/Downloads/2.0.22/crowdin-cli.jar --config path/to/crowdin_config.yml <command>

The underlying issue is fixed in the most recent version of the ca-certificates-java package. That should come out with Ubuntu 18.04.1 next week.

Thanks @bolelamx for the stacktrace above, that's what led me to the answer on stackoverflow.

Maksym5732005 commented 6 years ago

Ubuntu 18.04 LTS GNOME 3.28.2 OS type 64-bit java version "1.8.0_181"

"project_identifier" : "gl1d"
"api_key" : "e6332cd074b7f6f07281677f00051fa7"
"base_path" : ""

"preserve_hierarchy": true

files: [
 {
  "source" : "/presentation/src/main/res/values/*.xml",

  "translation" : "/presentation/src/main/res/values-%android_code%/%original_file_name%",
    "languages_mapping" : {
      "android_code" : {
        "de" : "de",
        "ru" : "ru",
        "fr" : "fr"
      }
  }

  #"ignore" : ["/**/?.txt"],
  }
]

Doesn't work on Ubuntu but works on Windows 10. When I uncomment ignore line - it doesn't work on windows to.

yavorysynka commented 6 years ago

Hi Maksym!

Could you please give it a try?

"project_identifier" : "gl1d"
"api_key" : "e6332cd074b7f6f07281677f00051fa7"
"base_path" : ""

"preserve_hierarchy": true

files: [
 {
  "source" : "/presentation/src/main/res/values/*.xml",

  "translation" : "/presentation/src/main/res/values-%android_code%/%original_file_name%",
    "languages_mapping" : {
      "android_code" : {
        "de" : "de",
        "ru" : "ru",
        "fr" : "fr"
      }
  },
  "ignore" : ["/**/?.txt"],
  }
]

I added one comma before ignore parameter, should work fine right now :)

Maksym5732005 commented 6 years ago

OK, I'll try but it dosn't work on Ubuntu at all!

yavorysynka commented 6 years ago

Could share the output you see in the console? What is the command you run?

Maksym5732005 commented 6 years ago

$ crowdin lint Loading config failed. Please, check your configuration file.

Andrulko commented 6 years ago

@Maksym5732005 Thanks a lot, trying to find the exact reason. Similar cases were caused by network settings earlier. Do you use proxy? Do you use a firewall? If so, can you please try to set a rule to allow HTTPS traffic towards api.crowdin.com for your firewall?

Maksym5732005 commented 6 years ago

No, I don't use any.

Andrulko commented 6 years ago

Thanks for the details, we will look into this furthermore! Not sure, probably something related to Java. Hopefully @ihor-popyk can clarify. You may also try Ruby client meantime (be aware that configuration is a bit different): https://github.com/crowdin/crowdin-cli

Andrulko commented 6 years ago

@Maksym5732005 While we are testing for a solution, I'd strongly recommend regenerating the API key via your project settings ->API tab :)

Andrulko commented 6 years ago

CLI was updated several times and fortunately, we did not receive issue reports from Ubuntu users. Can you please let me know if the latest CLI works great for you too?

@bolelamx @JC5 @balderdash @Maksym5732005

JC5 commented 6 years ago

Apologies yes, it works again. Let me double-check the version tonight.

Andrulko commented 6 years ago

Great, thanks a lot for confirming! Looking forward to hearing from you and hope to close the issue soon :)

amad commented 5 years ago

I have the same issue on macOS Mojave 10.14.4.

Tried latest stand-alone and installed via brew.

$ java -version
java version "11.0.2" 2019-01-15 LTS

$ crowdin upload sources
Initialization Crowdin Cli failed. Please check your configuration file and credentials.
$ ./crowdin.sh
/usr/bin/java
Your Java version is 11.0.2 - OK

$ java -jar crowdin-cli.jar lint
Initialization Crowdin Cli failed. Please check your configuration file and credentials.
amad commented 5 years ago

After debugging it turns out that I left a space character on project identifier causing the error.

chris1248 commented 4 years ago

Exact same problem here running on windows:

C:\code\desktop\xactimate2\skt>java -jar build\tools\bin\crowdin-cli.jar lint
Initialization Crowdin Cli failed. Please check your configuration file and credentials.

C:\code\desktop\xactimate2\skt>java -jar build\tools\bin\crowdin-cli.jar list <myprojectname>
Initialization Crowdin Cli failed. Please check your configuration file and credentials.

My config file:

"project_identifier" : "myprojectname"
"api_key" : "myapikey"
"base_path" : "."

"preserve_hierarchy": true

files: [
    {
        "source" : "Data.Res\\strings.resx",
        "translation" : "\\Data.Res\\%file_name%.%locale%.%file_extension%",
    }
]

No idea what to do now.

crowdin-support commented 4 years ago

Can you please try (it's compatible with Windows, backslashes are mainly required in base_path but you can freely use slashes in source and translation):

"api_key" : "myapikey"
"base_path" : "."

"preserve_hierarchy": true

files: [
    {
        "source" : "/Data.Res/strings.resx",
        "translation" : "/Data.Res/%file_name%.%locale%.%file_extension%"
    }
]
chris1248 commented 4 years ago

Doesn't work:

>java -jar build\tools\bin\crowdin-cli.jar lint
Initialization Crowdin Cli failed. Please check your configuration file and credentials.
JC5 commented 4 years ago

Out of the blue, I got stuck with this again:

Initialization Crowdin Cli failed. Please check your configuration file and credentials.

A debug run (java -jar "/usr/lib/crowdin/crowdin-cli.jar" upload --debug) revealed:

com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Diving into the issue it turns out that Pihole is blocking api.crowdin.com:

Screen Shot 2020-01-24 at 05 14 36

So make sure to put it on your whitelist.

Andrulko commented 4 years ago

@chris1248 Can you please let us know if the issue still persists? Running java -jar build\tools\bin\crowdin-cli.jar upload --debug or java -jar build\tools\bin\crowdin-cli.jar upload --verbose might bring more helpful technical information indeed

maaaaagda commented 4 years ago

Out of the blue I got this error too. It was working before but now I have Initialization Crowdin Cli failed. Please check your configuration file and credentials. when trying to pull translations. I generated the config file again, added and removed base_url param, reinstalled crowdin cli - nothing works. One thing I can think of which has changed is that I had big windows update. Any ideas?

Andrulko commented 4 years ago

Hey @maaaaagda, very sorry to hear that! It's difficult to troubleshoot indeed. Can you please try running "crowdin pull --debug" and check if any errors are displayed? Do you have any firewalls installed on machine? I'm running OpenJDK 11 at this moment on Windows, working good so far. CLI is the latest one (2.0.31).

There is already CLI 3 available, can you please try how it goes? It should work with CLI2 configuration, but you will need to add extra project_id (can be found in the project settings -> API) and api_token (personal access token is generated via profile settings) field to crowdin.yml. You can freely remove project_identifier and project_api_key from the configuration.

By the way, running crowdin generate in console in CLI 3 will launch configuration wizard, it's very convenient :)

maaaaagda commented 4 years ago

@Andrulko com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException: Connection reset at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155) at com.sun.jersey.api.client.Client.handle(Client.java:652) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:509) at com.crowdin.utils.HttpRequest.get(HttpRequest.java:76) at com.crowdin.client.CrowdinApiClientImpl.proccesing(CrowdinApiClientImpl.java:345) at com.crowdin.client.CrowdinApiClientImpl.init(CrowdinApiClientImpl.java:248) at com.crowdin.cli.commands.Commands.initCli(Commands.java:884) at com.crowdin.cli.commands.Commands.initialize(Commands.java:130) at com.crowdin.cli.commands.Commands.run(Commands.java:245) at com.crowdin.cli.Cli.main(Cli.java:21) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at sun.security.ssl.InputRecord.readFully(Unknown Source) at sun.security.ssl.InputRecord.read(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source) at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:253) at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153) ... 11 more

Andrulko commented 4 years ago

Thanks, @maaaaagda! Hmm, "Handshake" again... Probably, api.crowdin.com is blocked somehow, please see @JC5 comment: https://github.com/crowdin/crowdin-cli-2/issues/80#issuecomment-577984200

Can you please try CLI 3?

maaaaagda commented 4 years ago

I also have Crowdin CLI version 2.0.31. Windows is Windows 10 Enterprise version 1903 OS build 18362.30. I shouldn't have any firewalls installed too. What's strange is that I have a virtual machine also with Windows 10 1903 OS build 18362.657 and crowdin works there. I'll try CLI 3

maaaaagda commented 4 years ago

It works nicely with Crowdin CLI 3. Thanks!

Legion112 commented 2 years ago

Getting the following error

$ crowdin download --config=./crowdin-dynamic-content.yml --no-progress
✔️  Fetching project info
✔️  Building ZIP archive with the latest translations
✔️  Building translation (100%)
❌ Downloading translations
❌ Failed to download ZIP archive. Try to run the command once again
❌ Failed to write to the file '/builds/paxful/zendesk-crowdin-sync-php/CrowdinTranslations_858145291[42](https://gitlab.px.tools/paxful/zendesk-crowdin-sync-php/-/jobs/6342131#L42).zip'. Try to run the application with admin permission
❌ PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
❌ PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
❌ unable to find valid certification path to requested target

@andrii-bodnar could you assist?

Natalia936 commented 2 years ago

Hi @Legion112 ,

I've already consulted with our devs and they have a few suggestions here, could you please try the following options on your side:

1) Renew the certificate on your PC: the mentioned errors could be related to the old certificate version; 2) Run the same CLI commands using another PC or laptop; 3) Run the CLI from the same machine, but fully change the directory and path (as the example: run CLI from another local disk instead of the current one, because there is a chance it's connected with disk permissions); 4) Connect to another network and try to run the same command;

By the way, could you please also tell us if you've tried any option suggested in the following discussion thread? https://stackoverflow.com/questions/21076179/pkix-path-building-failed-and-unable-to-find-valid-certification-path-to-requ

Looking forward to your reply,