Downloader – Fix CONNECT ERROR: Unknown Resource Type

downloader

We have a Magento extension which is compatible with Magento 1.7+. I would like to make it compatible with Magento 1.5 and later.

But installation does not work on Magento Connect Manager / downloader it gives following error on console

CONNECT ERROR : Unsupported resource type

I was able to install it manually

  • download extension with freegento.com
  • unzip package
  • copy Eightdigits_MarketingSuite/app to MAGENTO_HOME/app
  • cd MAGENTO_HOME
  • ./mage sync (you need to make ./mage executable if it was not : chmod 750 mage)
  • I have cleaned cache on Cache Management page of Magento admin dashboard
  • I have logged out and logged in to Magento Admin (as there is bug on Magento, after new installation it keeps giving 404 for new menu item)
  • I have refreshed Magento store page so I could see 8digits comments in page source

    <!– 8digits Marketing Suite –>

Instead of manual installation, we would like to make the extension compatible with 1.5 too, and possible to install with Magento Connect Manager. Could you please help with the error?

Update

when I enabled log (System -> Configuration -> Developer -> Log), I saw these on system.log

2014-07-31T20:08:58+00:00 ERR (3): Warning: fopen(): Filename cannot be empty in /private/var/web/magento152/downloader/lib/Mage/Connect/Package/Reader.php on line 119
2014-07-31T20:08:58+00:00 ERR (3): Warning: get_resource_type() expects parameter 1 to be resource, boolean given in /private/var/web/magento152/downloader/lib/Mage/Connect/Package/Reader.php on line 140
2014-07-31T20:08:58+00:00 ERR (3): Warning: fclose() expects parameter 1 to be resource, boolean given in /private/var/web/magento152/downloader/lib/Mage/Connect/Package/Reader.php on line 123

ps: I get this error when I want to upload/install package file (Eightdigits_MarketingSuite-1.0.0.tgz)

I changed the method (Reader.php line 119) to

protected function _readFile()
{
$data = '';
if ($this->_file) {
$handle = fopen($this->_file, 'r');
try {
$data = $this->_loadResource($handle);
} catch (Mage_Exception $e) {
fclose($handle);
throw $e;
}
fclose($handle);
}
return $data;
}

When I tried upload again, now console printed out

CONNECT ERROR: Package file is invalid
Invalid package name, allowed: [a-zA-Z0-9_-] chars
Invalid version, should be like: x.x.x
Invalid stability
Invalid date, should be YYYY-DD-MM
Invalid channel URL
Empty authors section
Empty package contents section

this time system.log did not give any more logs on this issue… I assume it was not able to read package.xml file inside tgz file. I checked the package file and it has package.xml and looks like right. I have also tried package that was generated by Magento itself (using magento admin Package Extensions)

same environment if I try to install with Magento Connect, I get this error (now I cannot also install with Magento Connect, but today I installed at least on our test environment without problem)

CONNECT ERROR: Package 'Eightdigits_MarketingSuite' is invalid
Empty package contents section

Here also I do not get any error log on system.log file.

Update 2

I have created extension package from System -> Magento Connect -> Package Extensions on admin interfaces of Magento 1.9 and Magento 1.5.1 (a installation that I have integrated extension manually as described above). Both packages have resulted in same error when I try to upload to another Magento 1.5.1 installation.

Best Answer

You need to republish the extension using the appropriate settings, just as you did originally.

Related Topic