# Error (log): image not found: image:png webroot

**URL:** <https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094>\
**Category:** ℹ️ Support\
**Tags:** nc28, ldap\
**Created:** [April 3, 2024, 2:20pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094 "2024-04-03T14:20:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 3, 2024, 2:20pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/1 "2024-04-03T14:20:08Z")

</div>

Hello!

Nextcloud version: 28.0.4  
Operating system and version: ubuntu 22.04  
Apache or nginx version: Apache/2.4.52  
PHP version _(eg, 7.4)_: 8.3.4

The issue you are facing:

Is this the first time you’ve seen this error? _(Y/N)_: Y

Steps to replicate it:

1. Add new LDAP user
2. Login
3. Read entries in the log file Nextcloud

The output of your Nextcloud log in **Admin \> Logging** :

```auto
{"reqId":"4NYalyz1HRZWzNpjGHjT","level":3,"time":"2024-04-03T16:41:28+03:00","remoteAddr":"REPLACE","user":"RELPACE","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/activity/api/v2/activity/all?format=json&previews=true&since=0","message":"Exception thrown: RuntimeException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0","version":"28.0.4.1","exception":{"Exception":"RuntimeException","Message":"image not found: image:png webroot: serverroot:/var/www/nextcloud","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/circles/lib/Activity/Provider.php","line":96,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/apps/circles/lib/Activity/Provider.php","line":67,"function":"setIcon","class":"OCA\\Circles\\Activity\\Provider","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/GroupHelper.php","line":70,"function":"parse","class":"OCA\\Circles\\Activity\\Provider","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/Data.php","line":248,"function":"addActivity","class":"OCA\\Activity\\GroupHelper","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/Controller/APIv2Controller.php","line":205,"function":"get","class":"OCA\\Activity\\Data","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/Controller/APIv2Controller.php","line":152,"function":"get","class":"OCA\\Activity\\Controller\\APIv2Controller","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"getFilter","class":"OCA\\Activity\\Controller\\APIv2Controller","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/ocs/v1.php","line":65,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/URLGenerator.php","Line":274,"CustomMessage":"Exception thrown: RuntimeException"},"id":"660d62fe16bed"}
...
{"reqId":"byJUgHTM4XbLJRQBKtRX","level":3,"time":"2024-04-03T15:48:16+03:00","remoteAddr":"REPLACE","user":"--","app":"no app in context","method":"POST","url":"/apps/circles/async/1971e02f-d2a1-4477-96ec-799bdf6a8adb/","message":">> Member","userAgent":"--","version":"28.0.4.1","data":[],"id":"660d65df88040"}

```

More than 200 errors were generated in a few seconds:

RuntimeException  
image not found: image:png webroot: serverroot:/var/www/nextcloud

Any ideas?

---

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 4, 2024, 9:49am UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/2 "2024-04-04T09:49:38Z")

</div>

Today, this happened to my account. This is what the “Activities” app looks like

 ![image](https://help.nextcloud.com/uploads/default/original/3X/2/8/2868f63fe8337f6ca6513fb3b4267399a778149f.png)

---

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 4, 2024, 11:59am UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/3 "2024-04-04T11:59:00Z")

</div>

The code that causes the error

/var/www/nextcloud/apps/circles/lib/Activity/Provider.php

```auto
 private function setIcon(IEvent $event): void {
         $path = $this->urlGenerator->imagePath(
                 Application::APP_ID,
                 'circles.' . $this->activityManager->getRequirePNG() ? 'png' : 'svg'
         );
         $event->setIcon($this->urlGenerator->getAbsoluteURL($path));
 }

```

The error started to occur when I started testing the “collectives” and “circles” application

The workaround for now is to clean the DB

```auto
DELETE FROM oc_activity WHERE affecteduser = 'user';

```

---

<div class="post-metadata">

**Author:** ![jdbaron25](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jdbaron25/32/60383_2.png) [@jdbaron25](https://help.nextcloud.com/u/jdbaron25)\
**Post date:** [April 4, 2024, 12:09pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/4 "2024-04-04T12:09:07Z")

</div>

I’m seeing the same error as well in my error log.

Nextcloud v 28.0.2 running in docker on Unraid

“RuntimeException  
image not found: image:png webroot: serverroot:/app/www/public  
Exception thrown: RuntimeException”

---

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 4, 2024, 1:29pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/5 "2024-04-04T13:29:18Z")

</div>

**Steps to replicate it** :

1. Create “New collective”: Name “Test 5” → Create without members
2. Collective list: “Test 5” → Settings → Delete collective
3. Deleted collectives list: “Test 5” → Delete permanently: Collective and team  
3.1. or Delete permanently: Only collective  
3.2. Contacts app → Circles → “Test 5” → Delete circle
4. Open Activity app

**Update** :

1. Create new circle: Contacts app → Circles
2. Delete circle: Contacts app → Circles
3. Open Activity app

---

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 5, 2024, 9:03am UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/6 "2024-04-05T09:03:21Z")

</div>

**Update** :

1. Create new circle: Contacts app → Circles
2. Add a new user to the circle
3. Both users are getting errors in the Activity app

**Temporary solution** :  
vim /etc/crontab

```auto
* * * * * root mysql -u root nextcloud -e "DELETE FROM oc_activity WHERE app = 'circles';"
* * * * * root sed -i '/image not found\: image\:png webroot\: serverroot/d' REPLACE_ME_nextcloud_log_file

```

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [April 9, 2024, 1:33pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/7 "2024-04-09T13:33:03Z")

</div>

Tracking as an open bug here: [[Bug]: RuntimeException image not found: image:png With Circles Activated · Issue #44744 · nextcloud/server · GitHub](https://github.com/nextcloud/server/issues/44744)

---

<div class="post-metadata">

**Author:** ![simon-stucco](https://help.nextcloud.com/letter_avatar/simon-stucco/32/5_5575768a8748004e209b776fc1b2916d.png) [@simon-stucco](https://help.nextcloud.com/u/simon-stucco)\
**Post date:** [April 11, 2024, 11:00am UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/8 "2024-04-11T11:00:54Z")

</div>

This might be annoying, but would you mind explaining exactly what this SQL command does? I am not an experienced SQL person, and would love to take the chance to learn how this solves the issue.

Also, why are the two commands you’ve offered different, do they achieve the same thing, or slightly different things that both fix the problem?

Thanks so much!

---

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 11, 2024, 11:40am UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/9 "2024-04-11T11:40:47Z")

</div>

> [@simon-stucco](#):
>
> This might be annoying, but would you mind explaining exactly what this SQL command does? I am not an experienced SQL person, and would love to take the chance to learn how this solves the issue.
> 
> Also, why are the two commands you’ve offered different, do they achieve the same thing, or slightly different things that both fix the problem?
> 
> Thanks so much!

oc\_activity is a table in the database that contains all event records. The SQL command deletes all entries (for all users) from this table where the header is “app” = “circles”. This solves the problem where the user cannot use the activity app

The second line removes a mention of an error from the nextсloud log file. You must specify the path to your nextсloud log file (REPLACE\_ME\_nextcloud\_log\_file)

---

<div class="post-metadata">

**Author:** ![stepcellwolf](https://help.nextcloud.com/user_avatar/help.nextcloud.com/stepcellwolf/32/57905_2.png) [@stepcellwolf](https://help.nextcloud.com/u/stepcellwolf)\
**Post date:** [April 12, 2024, 1:34pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/10 "2024-04-12T13:34:34Z")

</div>

Hi team,

I’m also having the same issue. I will try the [temporary solution](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/6) later today and will let you know if it worked.

It will be nice if could be fixed with next patch.

Cheers

---

<div class="post-metadata">

**Author:** ![stepcellwolf](https://help.nextcloud.com/user_avatar/help.nextcloud.com/stepcellwolf/32/57905_2.png) [@stepcellwolf](https://help.nextcloud.com/u/stepcellwolf)\
**Post date:** [April 16, 2024, 2:36pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/11 "2024-04-16T14:36:28Z")

</div>

It did not worked for me. 😭

---

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 16, 2024, 2:48pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/12 "2024-04-16T14:48:55Z")

</div>

What exactly didn’t work for you? Are there any error messages?

---

<div class="post-metadata">

**Author:** ![stepcellwolf](https://help.nextcloud.com/user_avatar/help.nextcloud.com/stepcellwolf/32/57905_2.png) [@stepcellwolf](https://help.nextcloud.com/u/stepcellwolf)\
**Post date:** [April 16, 2024, 3:39pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/13 "2024-04-16T15:39:43Z")

</div>

Still I was getting the same Could not load activities pop-ups and same error messages:

```auto
RuntimeException image not found: image:png webroot: serverroot:/var/www/nextcloud
Exception thrown: RuntimeException

```

I stop the notification and activities for push and for mail for circle and how I do not get this pop-up any more.  
The cron solution above did not solved anything.

---

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 17, 2024, 9:26am UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/14 "2024-04-17T09:26:44Z")

</div>

Solving cron just removes the consequences of the problem. Did you wait a minute for the cron task to complete? Try running the command without cron, the console may display some kind of error.

Your installation may require you to specify a password to access the database.

---

<div class="post-metadata">

**Author:** ![Excho0](https://help.nextcloud.com/user_avatar/help.nextcloud.com/excho0/32/60790_2.png) [@Excho0](https://help.nextcloud.com/u/Excho0)\
**Post date:** [April 17, 2024, 7:33pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/15 "2024-04-17T19:33:35Z")

</div>

The code that causes the error:

## **/var/www/nextcloud/apps/circles/lib/Activity/Provider.php**

```
private function setIcon(IEvent $event): void {
	$path = $this->urlGenerator->imagePath(
		Application::APP_ID,
		'circles.' . $this->activityManager->getRequirePNG() ? 'png' : 'svg'
	);
	$event->setIcon($this->urlGenerator->getAbsoluteURL($path));
}

```

* * *

## **and here is the fix:**

```
private function setIcon(IEvent $event): void {
	$extension = $this->activityManager->getRequirePNG() ? 'png' : 'svg';
	$path = $this->urlGenerator->imagePath(
		Application::APP_ID,
		'circles.' . $extension
	);
	$event->setIcon($this->urlGenerator->getAbsoluteURL($path));
}

```

* * *

## **UPDATE:**

I was looking in to the source code and It appears that they have already fixed the bug using a different version from the provided fix above. You can either use my version or simply wait for an update. I believe both versions should work. 🤗

---

<div class="post-metadata">

**Author:** ![rakekniven](https://help.nextcloud.com/user_avatar/help.nextcloud.com/rakekniven/32/67096_2.png) [@rakekniven](https://help.nextcloud.com/u/rakekniven)\
**Post date:** [April 17, 2024, 7:34pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/16 "2024-04-17T19:34:54Z")

</div>

Please provide code changes it GitHub.  
As soon as they are merged users should adapt it.

---

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 18, 2024, 8:56am UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/18 "2024-04-18T08:56:07Z")

</div>

> [@Excho0](#):
>
> ```auto
> private function setIcon(IEvent $event): void {
> $extension = $this->activityManager->getRequirePNG() ? 'png' : 'svg';
> $path = $this->urlGenerator->imagePath(
> Application::APP_ID,
> 'circles.' . $extension
> );
> $event->setIcon($this->urlGenerator->getAbsoluteURL($path));
> }
> 
> ```

This works for me, thanks!

---

<div class="post-metadata">

**Author:** ![X3PPY](https://help.nextcloud.com/user_avatar/help.nextcloud.com/x3ppy/32/59632_2.png) [@X3PPY](https://help.nextcloud.com/u/X3PPY)\
**Post date:** [April 19, 2024, 8:52am UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/19 "2024-04-19T08:52:54Z")

</div>

> [@Excho0](#):
>
> ```auto
> private function setIcon(IEvent $event): void {
> $extension = $this->activityManager->getRequirePNG() ? 'png' : 'svg';
> $path = $this->urlGenerator->imagePath(
> Application::APP_ID,
> 'circles.' . $extension
> );
> $event->setIcon($this->urlGenerator->getAbsoluteURL($path));
> }
> 
> ```

With this code, the activity application works without problems, but the following message still appears in the nextcloud logs:

```auto
{"reqId":"qpPJjCuTPLvk4FjDeEpw","level":3,"time":"2024-04-19T06:50:01+03:00","remoteAddr":"","user":"--","app":"activity","method":"","url":"--","message":"Exception occurred while sending user digest email","userAgent":"--","version":"28.0.4.1","exception":{"Exception":"RuntimeException","Message":"image not found: image:circles.png webroot: serverroot:/var/www/nextcloud","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/circles/lib/Activity/Provider.php","line":106,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/apps/circles/lib/Activity/Provider.php","line":67,"function":"setIcon","class":"OCA\\Circles\\Activity\\Provider","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/GroupHelper.php","line":72,"function":"parse","class":"OCA\\Circles\\Activity\\Provider","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/Data.php","line":248,"function":"addActivity","class":"OCA\\Activity\\GroupHelper","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/DigestSender.php","line":139,"function":"get","class":"OCA\\Activity\\Data","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/DigestSender.php","line":88,"function":"sendDigestForUser","class":"OCA\\Activity\\DigestSender","type":"->"},{"file":"/var/www/nextcloud/apps/activity/lib/BackgroundJob/DigestMail.php","line":45,"function":"sendDigests","class":"OCA\\Activity\\DigestSender","type":"->"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/Job.php","line":54,"function":"run","class":"OCA\\Activity\\BackgroundJob\\DigestMail","type":"->"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php","line":60,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/lib/private/URLGenerator.php","Line":274,"message":"Exception occurred while sending user digest email","exception":[],"CustomMessage":"Exception occurred while sending user digest email"},"id":"66222ead39ce6"}

```

---

<div class="post-metadata">

**Author:** ![gonzalo.cao](https://help.nextcloud.com/user_avatar/help.nextcloud.com/gonzalo.cao/32/49509_2.png) [@gonzalo.cao](https://help.nextcloud.com/u/gonzalo.cao)\
**Post date:** [May 23, 2024, 12:28pm UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/20 "2024-05-23T12:28:38Z")

</div>

Seems to be an official fix https://github.com/nextcloud/circles/blob/master/lib/Activity/Provider.php

```
/**
 * @param IEvent $event
 */
private function setIcon(IEvent $event): void {
	$path = $this->urlGenerator->imagePath(Application::APP_ID, 'circles.svg');
	$event->setIcon($this->urlGenerator->getAbsoluteURL($path));
}

```

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 8:32am UTC](https://help.nextcloud.com/t/error-log-image-not-found-image-png-webroot/187094/21 "2025-01-16T08:32:34Z")

</div>


