Opening Calendar Webview results in "internal server error

Hi there,

on a fresh installation of nextcloud 18.0.3 (with migrated data from 18.0.1) I run into the following problem:

Steps to reproduce

Open nextcloud, e.g. https://next.cloud.com
Klick on calendar icon in top bar

Expected behaviour

Calendar should be displayed
Actual behaviour

Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
Technical details
Remote Address: ***
Request ID: ***

Calendar app

Calendar app version: 2.0.2

CalDAV-clients used: DAVx5 (this is working fine so far)
Client configuration

Browser: Firefox 74

Operating system: Win X
Server configuration

Database: MySQL

PHP version: 7.3

Nextcloud Version: 18.0.3

Updated from an older installed version or fresh install: fresh install and migrated data

List of activated apps:

Enabled:

accessibility: 1.4.0
activity: 2.11.0
apporder: 0.9.0
calendar: 2.0.2
cloud_federation_api: 1.1.0
comments: 1.8.0
contacts: 3.2.0
dav: 1.14.0
federatedfilesharing: 1.8.0
federation: 1.8.0
files: 1.13.1
files_pdfviewer: 1.7.0
files_rightclick: 0.15.2
files_sharing: 1.10.1
files_trashbin: 1.8.0
files_versions: 1.11.0
files_videoplayer: 1.7.0
logreader: 2.3.0
lookup_server_connector: 1.6.0
mail: 1.1.4
notifications: 2.6.0
oauth2: 1.6.0
occweb: 0.0.7
photos: 1.0.0
privacy: 1.2.0
provisioning_api: 1.8.0
recommendations: 0.6.0
serverinfo: 1.8.0
settings: 1.0.0
sharebymail: 1.8.0
support: 1.1.0
survey_client: 1.6.0
systemtags: 1.8.0
tasks: 0.12.1
text: 2.0.0
theming: 1.9.0
twofactor_backupcodes: 1.7.0
updatenotification: 1.8.0
user_saml: 3.0.1
viewer: 1.2.0
workflowengine: 2.0.0
Disabled:
admin_audit
encryption
files_external
firstrunwizard
nextcloud_announcements
password_policy
user_ldap

Nextcloud configuration:

“system”: {
“dbtype”: “mysql”,
“version”: “18.0.3.0”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“mysql.utf8mb4”: true,
“installed”: true,
“theme”: “”,
“loglevel”: 2,
“maintenance”: false,
“filesystem_check_changes”: 0,
“mail_smtpmode”: “smtp”,
“mail_sendmailmode”: “smtp”,
“mail_smtpport”: “465”,
“mail_smtpauth”: 1,
“mail_smtpsecure”: “ssl”,

Logs
Web server error log (e.g. /var/log/apache)
Log file (data/nextcloud.log)

[index] Error: OCP\Files\NotPermittedException: Could not create path at <>

/cloud/lib/private/Files/SimpleFS/SimpleFolder.php line 84
OC\Files\Node\Folder->newFile("dd8a-7c38-calendar.css")
/cloud/lib/private/Template/SCSSCacher.php line 312
OC\Files\SimpleFS\SimpleFolder->newFile("dd8a-7c38-calendar.css")
/cloud/lib/private/Template/SCSSCacher.php line 182
OC\Template\SCSSCacher->cache("/mnt/web306/b0/ ... s", "dd8a-7c38-calendar.css", "calendar.scss", OC\Files\SimpleFS\SimpleFolder {}, "/cloud/apps/calendar/css")
/cloud/lib/private/Template/CSSResourceLocator.php line 110
OC\Template\SCSSCacher->process("/mnt/web306/b0/ ... r", "css/calendar.scss", "calendar")
/cloud/lib/private/Template/CSSResourceLocator.php line 85
OC\Template\CSSResourceLocator->cacheAndAppendScssIfExist("/mnt/web306/b0/ ... r", "css/calendar.scss", "calendar")
/cloud/lib/private/Template/ResourceLocator.php line 78
OC\Template\CSSResourceLocator->doFind("css/calendar")
/cloud/lib/private/TemplateLayout.php line 310
OC\Template\ResourceLocator->find(["css/server","c ... "])
/cloud/lib/private/TemplateLayout.php line 215
OC\TemplateLayout::findStylesheetFiles(["css/server","c ... "])
/cloud/lib/private/legacy/template.php line 184
OC\TemplateLayout->__construct("user", "calendar")
/cloud/lib/public/AppFramework/Http/TemplateResponse.php line 167
OC_Template->fetchPage([])
/cloud/lib/private/AppFramework/Http/Dispatcher.php line 123
OCP\AppFramework\Http\TemplateResponse->render()
/cloud/lib/private/AppFramework/App.php line 125
OC\AppFramework\Http\Dispatcher->dispatch(OCA\Calendar\Controller\ViewController {}, "index")
/cloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
OC\AppFramework\App::main("OCA\Calendar\ ... r", "index", OC\AppFramework\ ... {}, {_route: "calendar.view.index"})
<>
OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "calendar.view.index"})
/cloud/lib/private/Route/Router.php line 299
call_user_func(OC\AppFramework\ ... {}, {_route: "calendar.view.index"})
/cloud/lib/base.php line 1008
OC\Route\Router->match("/apps/calendar/")
/cloud/index.php line 38
OC::handleRequest()

GET /cloud/index.php/apps/calendar/
from ** by *** at 2020-03-25T15:32:32+00:00

Your webserver should have write access to the whole data/ folder, including data/appdata_%instance_id%/.

it does have write access and all the other apps are working fine.
apparently the path causing the error is this:
/apps/calendar

(sorry, only noticed now that the path was cut off in the post above)

okay, I was able to fix it (although I do not know the root cause or why it works now):

within data/appdata_%instance_id%/css all the other apps (e.g. mail, tasks) have their own subfolder but there was none for calendar

I manually created data/appdata_%instance_id%/css/calendar, chmod 755 and now it works

Web server user probably couldn’t create the folder itself.