# Can't download new add-ons and themes

**URL:** https://forums.concretecms.org/t/cant-download-new-add-ons-and-themes/7433
**Category:** Marketplace
**Tags:** bug
**Created:** [May 18, 2024, 4:43am UTC](https://forums.concretecms.org/t/cant-download-new-add-ons-and-themes/7433 "2024-05-18T04:43:22Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![yusuke10](https://forums.concretecms.org/user_avatar/forums.concretecms.org/yusuke10/32/3495_2.png) [@yusuke10](https://forums.concretecms.org/u/yusuke10)
#### Post date: [May 18, 2024, 4:43am UTC](https://forums.concretecms.org/t/cant-download-new-add-ons-and-themes/7433/1 "2024-05-18T04:43:22Z")

</div>

I updated concreteCMS 9.3.1. and now I can’t download new add-ons and themes in the Add Functionality page. When I click the download button in the waiting list, the error below occurs.

Whoops \ Exception \ ErrorException (E\_WARNING)  
rename(): The first argument to copy() function cannot be a directory

**concrete-cms-9.3.1/concrete/src/Marketplace/PackageRepository.php**

```auto
        $archive->open($output);
        $archive->extractTo($unzipPath);
        $archive->close();
 
        // Delete the temp file
        unlink($output);
 
        if (!file_exists($unzipPath . '/' . $package->handle . '/controller.php')) {
            throw new InvalidPackageException();
        }
 
        // Move the files into place
        $packageDir = DIR_PACKAGES . '/' . $package->handle;
        if ($overwrite && file_exists($packageDir)) {
            if (!rename($packageDir, $packageDir . '.old')) {
                throw new UnableToPlacePackageException();
            }
        }
 
        if (!rename($unzipPath . '/' . $package->handle, $packageDir)) {
            if ($overwrite) {
                rename($packageDir . '.old', $packageDir);
            }
            throw new UnableToPlacePackageException();
        }
 
        $this->rimraf($package->handle . '.old');
        rmdir($unzipPath);
    }
 
    protected function rimraf(string $handle)
    {
        // Make sure we're working with a valid dir
        if (!DIR_PACKAGES || !$handle || substr($handle, -4) !== '.old') {
            trigger_error('Invalid handle provided to delete.');
        }
 
        $path = DIR_PACKAGES . '/' . $handle;
 
        if (is_file($path)) {

```

Arguments

1. “rename(): The first argument to copy() function cannot be a directory”

## Environment & details:

Concrete CMS

| Version | “9.3.1” |
| --- | --- |
| Installed Version | “9.3.1” |
| Database Version | “20240515173142” |

PHP

| Version | “8.2.19” |
| --- | --- |
| Extensions | array:56 [▶] |

Concrete Configuration

| concrete | array:56 [▶] |
| --- | --- |
| app | array:20 [▶] |

GET Data empty

POST Data empty

Files empty

Cookies

| dashboardPanelStatus | “\*\*\*\*” |
| --- | --- |
| CONCRETE | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| CONCRETE\_LOGIN | “\*” |

Session

| \_sf2\_attributes | array:14 [▶] |
| --- | --- |
| \_symfony\_flashes | |
| \_sf2\_meta | array:3 [▶] |

Server/Request Data

| PATH | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| --- | --- |
| HTTP\_ACCEPT | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_ACCEPT\_ENCODING | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_ACCEPT\_LANGUAGE | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_COOKIE | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_HOST | “\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_USER\_AGENT | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_CACHE\_CONTROL | “\*\*\*\*\*\*\*\*\*” |
| HTTP\_X\_FORWARDED\_FOR | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_REMOTE\_ADDR | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_X\_FORWARDED\_HOST | “\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_X\_FORWARDED\_PROTO | “\*\*\*\*\*” |
| HTTP\_X\_BACKEND | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_SEC\_CH\_UA | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTP\_SEC\_CH\_UA\_MOBILE | “\*\*” |
| HTTP\_SEC\_CH\_UA\_PLATFORM | “\*\*\*\*\*\*\*” |
| HTTP\_UPGRADE\_INSECURE\_REQUESTS | “\*” |
| HTTP\_SEC\_FETCH\_SITE | “\*\*\*\*” |
| HTTP\_SEC\_FETCH\_MODE | “\*\*\*\*\*\*\*\*” |
| HTTP\_SEC\_FETCH\_USER | “\*\*” |
| HTTP\_SEC\_FETCH\_DEST | “\*\*\*\*\*\*\*\*” |
| HTTP\_DNT | “\*” |
| HTTP\_PRIORITY | “\*\*\*\*\*\*” |
| DOCUMENT\_ROOT | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| REMOTE\_ADDR | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| REMOTE\_PORT | “\*\*\*\*\*” |
| SERVER\_ADDR | “\*\*\*\*\*\*\*\*\*\*\*\*” |
| SERVER\_NAME | “\*\*\*\*\*\*\*\*\*\*” |
| SERVER\_ADMIN | “” |
| SERVER\_PORT | “\*\*\*” |
| REQUEST\_SCHEME | “\*\*\*\*\*” |
| REQUEST\_URI | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| PATH\_INFO | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| PATH\_TRANSLATED | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| PROXY\_REMOTE\_ADDR | “\*\*\*\*\*\*\*\*\*\*\*\*” |
| HTTPS | “\*\*” |
| SSL\_PROTOCOL | “\*\*\*\*\*\*\*” |
| SSL\_CIPHER | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| SSL\_CIPHER\_USEKEYSIZE | “\*\*\*” |
| SSL\_CIPHER\_ALGKEYSIZE | “\*\*\*” |
| SCRIPT\_FILENAME | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| QUERY\_STRING | “” |
| SCRIPT\_URI | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| SCRIPT\_URL | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| SCRIPT\_NAME | “\*\*\*\*\*\*\*\*\*\*” |
| SERVER\_PROTOCOL | “\*\*\*\*\*\*\*\*” |
| SERVER\_SOFTWARE | “\*\*\*\*\*\*\*\*\*” |
| REQUEST\_METHOD | “\*\*\*” |
| X-LSCACHE | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| PHP\_SELF | “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*” |
| REQUEST\_TIME\_FLOAT | “\*\*\*” |
| REQUEST\_TIME | “\*\*\*” |

Environment Variables empty

Registered Handlers

1. Concrete\Core\Error\Handler\ErrorHandler

2. Concrete\Core\Error\Handler\JsonErrorHandler

Anyone can solve it?

---

<div class="post-metadata">

### Author: ![darkmatter](https://forums.concretecms.org/user_avatar/forums.concretecms.org/darkmatter/32/4372_2.png) [@darkmatter](https://forums.concretecms.org/u/darkmatter)
#### Post date: [May 18, 2024, 2:38pm UTC](https://forums.concretecms.org/t/cant-download-new-add-ons-and-themes/7433/2 "2024-05-18T14:38:50Z")

</div>

I have the same problem with 9.31. upgraded from 8.5.17 cannot download any theme or addon from marketplace.

Did you find a fix?

---

<div class="post-metadata">

### Author: ![alcopros](https://forums.concretecms.org/user_avatar/forums.concretecms.org/alcopros/32/3495_2.png) [@alcopros](https://forums.concretecms.org/u/alcopros)
#### Post date: [May 22, 2024, 2:11pm UTC](https://forums.concretecms.org/t/cant-download-new-add-ons-and-themes/7433/3 "2024-05-22T14:11:16Z")

</div>

I’ve also got the same issue after upgrading from 9.2.9 to 9.3.1.

I noticed that 9.3.1 was available for download, but it wasn’t being pushed via the auto updater in the admin area of the site.

I went a head and downloaded the new update, unzipped it, moved it into the updates directory and then performed the update via the admin interface in concrete.

Seemed to go smoothly except that attempting to install addons from the new marketplace result in the problem outlined in this thread.

---

<div class="post-metadata">

### Author: ![alcopros](https://forums.concretecms.org/user_avatar/forums.concretecms.org/alcopros/32/3495_2.png) [@alcopros](https://forums.concretecms.org/u/alcopros)
#### Post date: [May 22, 2024, 2:19pm UTC](https://forums.concretecms.org/t/cant-download-new-add-ons-and-themes/7433/4 "2024-05-22T14:19:08Z")

</div>

I just found the github issue for this problem:

> <https://github.com/concretecms/concretecms/issues/12084>
>
> \### Affected Version of Concrete CMS
> 
> 9.x
> 
> \### Description
> 
> Similar to #12…074, but the problem still exists in 9.3.1 in some cases
> 
> \### How to reproduce
> 
> \* connect to marketplace
> \* install package
> 
> \### Possible Solution
> 
> \`@rename()\`
> 
> \### Additional Context
> 
> \<img src="https://forums.concretecms.org/uploads/default/optimized/2X/8/805009b6b4b35a51de3e6fee4eb0ad95868a8395\_2\_1380x878.jpeg"/\>

The problem has been fixed in version 9.3.2.

---

<div class="post-metadata">

### Author: ![Myq](https://forums.concretecms.org/user_avatar/forums.concretecms.org/myq/32/4281_2.png) [@Myq](https://forums.concretecms.org/u/Myq)
#### Post date: [May 28, 2024, 10:10pm UTC](https://forums.concretecms.org/t/cant-download-new-add-ons-and-themes/7433/5 "2024-05-28T22:10:45Z")

</div>

9.3.2 has been released and should solve this problem: [GitHub - concretecms/concretecms at 9.3.2](https://github.com/concretecms/concretecms/tree/9.3.2)

---

<div class="post-metadata">

### Author: ![WMFC\_Admin](https://forums.concretecms.org/user_avatar/forums.concretecms.org/wmfc_admin/32/3495_2.png) [@WMFC\_Admin](https://forums.concretecms.org/u/WMFC_Admin)
#### Post date: [September 4, 2024, 8:42pm UTC](https://forums.concretecms.org/t/cant-download-new-add-ons-and-themes/7433/6 "2024-09-04T20:42:50Z")

</div>

I’m running 9.3.3 and I cannot access the repository I get an error list the length of my arm…

Concrete\Core\Marketplace\PackageRepository::validate(): Argument #1 ($connection) must be of type Concrete\Core\Marketplace\ConnectionInterface, null given, called in /home8/allianc2/public\_html/concrete/src/Page/Controller/MarketplaceDashboardPageController.php on line 23

---

<div class="post-metadata">

### Author: ![WMFC\_Admin](https://forums.concretecms.org/user_avatar/forums.concretecms.org/wmfc_admin/32/3495_2.png) [@WMFC\_Admin](https://forums.concretecms.org/u/WMFC_Admin)
#### Post date: [September 4, 2024, 9:01pm UTC](https://forums.concretecms.org/t/cant-download-new-add-ons-and-themes/7433/7 "2024-09-04T21:01:33Z")

</div>

I did figure this out. The basic introduction video by Concrete skips over entirely the need to link your site to the repository. If your getting an error msg when you try to access the Marketplace go to “System & Settings” then click “Marketplace” under the “Basics” Column.
