cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 Error While Installing Tawk.to extension

Magento 2 Error While Installing Tawk.to extension

I'm trying to install Tawk.to chat in my Magento 2 shopping site hosted on a cPanel shared server environment. And I downloaded the extension files following the guidelines given here:

https://www.tawk.to/knowledgebase/plugins-and-modules/magento-2-integration/

After extracting and copying the files to the root directory of my website, I requested my web host to run the needed command lines. After that my site went blank, and I when I inquired from the hosting provider, I was informed that the process was halted as it was requesting the login details for

http://repo.magento.com

. I then provided my Magento.com login details, but that failed to authenticate. The web host sent to me the following error message:

=============
[root@sixteen ~]# cd /home/hosting_username/public_html
[root@sixteen public_html]# php composer.phar require tawk/widget

Authentication required (repo.magento.com):
  Username: my_magento.com_email_address
  Password: my_magento.com_password

[Composer\Downloader\TransportException]
Invalid credentials for 'https://repo.magento.com/packages.json', aborting.

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

[root@sixteen public_html]#

==================

Does anyone know why this happened and what is the fix?

 

I will so much appreciate your time and help. Thanks.

 

 

12 REPLIES

Re: Magento 2 Error While Installing Tawk.to extension

The details required aren't your magento.com login details but your access keys. Details on how you can find these can be found on the developer docs http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: Magento 2 Error While Installing Tawk.to extension

@Tom Robertshaw, a million thanks for the insight - a huge nod in the right direction!

 

I've forwarded the newly-generated public and private keys to my web host, to use in place of username and password, respectively. I will update this post, as soon as I get a response from my web host.

 

I reiterate my heartfelt thanks.

Re: Magento 2 Error While Installing Tawk.to extension

@Tom Robertshaw, Surprisingly, my web hosting provider got back to me that using my public key as username and private key as password didn't work. They sent to me the following error message:

===================
[root@sixteen ~]# cd /home/hosting_username/public_html
[root@sixteen public_html]# php composer.phar require tawk/widget

Authentication required (repo.magento.com):
  Username:  my_magento_public_key
  Password:  my_magento_private_key

[Composer\Downloader\TransportException]
Invalid credentials for 'https://repo.magento.com/packages.json', aborting.

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

[root@sixteen public_html]#

===================

Please, what should I do next, to fix this issue? I so much appreciate your help. Thanks.

Re: Magento 2 Error While Installing Tawk.to extension

Unfortunately, the most likely problem here was that the wrong credentials were put in. I'd really recommend you get access to SSH yourself so that you can validate a mistake isn't made by your hosting company but also that this isn't really a task for your hosting company. It's going to take a while going back and forth each time you need to run a command.

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: Magento 2 Error While Installing Tawk.to extension

Thanks for your continued insight and help.

 

I'm on a shared hosting account, and my web host stated that my account wasn't entitled to be given SSH login details, when I asked earlier. Is there any other way around troubleshooting this issue, when SSH access is not available?

Re: Magento 2 Error While Installing Tawk.to extension

@Tom Robertshaw,

My web hosting provider got back to me and reiterated that they won't give me SSH access, since I'm on a shared server. However, they responded to another thing I told them to ascertain that Composer was successfully installed. As follows is their answer:

"Composer was installed but there was a function that was disabled. I now enabled the function and re-ran the commands.

Below is the output i'm now getting."

======================
[root@sixteen public_html]# php composer.phar require tawk/widget

Authentication required (repo.magento.com):
  Username:  my_magento_public_key
  Password: my_magento_private_key

Do you want to store credentials for repo.magento.com in /root/.composer/auth.json ? [Yn] y

[InvalidArgumentException]
Could not find package tawk/widget at any version for your minimum-stability (alpha). Check the package spelling or your minimum-stability

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

==========================================

Please, do you have any idea why the above error occurred and what is the fix?

 

Thanks once again for your help.

Re: Magento 2 Error While Installing Tawk.to extension

Sometimes this error can happen because of a problem with api keys, or a problem with your minimum stability declared in composer. Your min stability looks loose though at alpha so that should be fine. 

 

It looks like one other person had that problem with this package (https://github.com/tawk/tawk-magento-2/issues/3).

 

Sounds like the issue could still either be a problem with installation process on the host end and access keys or something wrong on the marketplace end for competability with your version of Magento.

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: Magento 2 Error While Installing Tawk.to extension

Thanks for your continued help and insight.

 

I came across that post on Github yesterday, but sadly, it didn't have any reply or a fix.

 

From my research, I suspect that the issue might be in composer.json. I've read a couple of tutorials that suggest setting minimum stability to -dev. But my composer.json file doesn't even have minimum stability setting, as shown in the code below:

{
  "name": "tawk/widget",
  "description": "Tawk live chat widget",
  "type": "magento2-module",
  "version": "1.0.0",
  "license": [
    "OSL-3.0"
  ],
  "require": {
    "php": "~5.6.0|7.0.2|7.0.4|~7.0.12"
  },
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "Tawk\\Widget\\": ""
    }
  }
}

Please, read this article that suggests using stability flags:

http://webtips.krajee.com/setting-composer-minimum-stability-application/

and this article too:

https://igor.io/2013/02/07/composer-stability-flags.html

If stability flag has to be used in my case, please, where do I place the minimum stability alpha and flag? I suspect this is how to place the flag:

"Tawk\\Widget\\": "@dev"

Any idea? Your insight will always be appreciated. Any suggestion what I can do next for a solution? Thanks once again.

Re: Magento 2 Error While Installing Tawk.to extension

Sorry, I'm not sure what to do next. 

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!