-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Office Online integration app becoming disabled #463
Comments
we have same issue... |
Same here |
Can you paste the full raw json error message from the logs? That should contain more details on where this originates from exactly |
Hello, |
Hi, we have this issue since the update to NC 28.0.1. {"reqId":"IHRYd64MKJsyP34CJX5N","level":3,"time":"2024-01-12T11:56:28+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"xxxxxxxx","app":"no app in context","method":"GET","url":"/index.php/apps/files","message":"App officeonline threw an error during app.php load and will be disabled: Call to undefined method O C\Server::getEventDispatcher()","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","version":"28.0.1.1","exception":{"Exception":"Error","Message":"Call to undefined method OC\Server::getEventDispatcher()","Code":0,"Trace":[{"file":"/var /www/nextcloud/lib/private/App/AppManager.php","line":522,"function":"require_once"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":413,"function":"requireAppFile","class":"OC\App\AppManager","type":"::"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":213,"funct ion":"loadApp","class":"OC\App\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":125,"function":"loadApps","class":"OC\App\AppManager","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/AppInfo/Application.php","line":218,"function":"loadApps","class":"OC_ App","type":"::"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":200,"function":"boot","class":"OCA\DAV\AppInfo\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":434,"function":"bootApp","class":"OC\AppFramework\Boot strap\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":213,"function":"loadApp","class":"OC\App\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":125,"function":"loadApps","class":"OC\App\AppManager","type":"->"},{ "file":"/var/www/nextcloud/lib/private/legacy/OC_User.php","line":237,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/apps/user_saml/appinfo/app.php","line":88,"function":"handleApacheAuth","class":"OC_User","type":"::"},{"file":"/var/www/nextcloud/lib/private/App/AppMana ger.php","line":522,"args":["/var/www/nextcloud/apps/user_saml/appinfo/app.php"],"function":"require_once"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":413,"function":"requireAppFile","class":"OC\App\AppManager","type":"::"},{"file":"/var/www/nextcloud/lib/private/App/AppManager .php","line":213,"function":"loadApp","class":"OC\App\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":125,"function":"loadApps","class":"OC\App\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1041,"function":"loadApps","class":"OC_ App","type":"::"},{"file":"/var/www/nextcloud/index.php","line":39,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/officeonline/appinfo/app.php","Line":36,"message":"App officeonline threw an error during app.php load and will be disabled: Call to undefined method O C\Server::getEventDispatcher()","exception":{},"CustomMessage":"App officeonline threw an error during app.php load and will be disabled: Call to undefined method OC\Server::getEventDispatcher()"}} I think it's related to things described here: https://help.nextcloud.com/t/symfony-event-dispatcher-update-in-nextcloud-server-28-breaking-changes/167550 Thank you |
It's documented in the upgrade notes, here the pull request: nextcloud/server#38546 |
I made two changes, and it seems to work, but I have no idea what I'm doing... So it might be pretty stupid or what... I just hope it will help:
|
Hello, |
Thanks but not working for me. |
Here is a fix but it isn't published yet @juliushaertl :( I hope the release is coming soon because no update to 28 is possible at the moment. |
Hello, Thanks a lot ! Great Job ! It solved my issue :-) |
Hello. This fix solves the application startup issue, but there is an issue with ms edge that appears to be CSP related. |
Another guy asked the same question: https://help.nextcloud.com/t/office-online-integration-and-nextcloud-28-0-1/179431 |
Any progress? |
After I tested, I found that if I set User-Agent to But why? |
fix: nextcloud/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php /**
* Check if the browser supports CSP v3
*/
public function browserSupportsCspV3(): bool {
$browserWhitelist = [
Request::USER_AGENT_CHROME,
Request::USER_AGENT_FIREFOX,
Request::USER_AGENT_SAFARI,
+ Request::USER_AGENT_MS_EDGE,
];
if ($this->request->isUserAgent($browserWhitelist)) {
return true;
}
return false;
} ./nextcloud/custom_apps/officeonline/lib/AppInfo/Application.php if ($publicWopiUrl !== '') {
$policy->addAllowedFrameDomain('\'self\'');
$policy->addAllowedFrameDomain($this->domainOnly($publicWopiUrl));
if (method_exists($policy, 'addAllowedFormActionDomain')) {
$policy->addAllowedFormActionDomain($this->domainOnly($publicWopiUrl));
}
+ $policy->addAllowedWorkerSrcDomain($this->domainOnly($publicWopiUrl));
} |
Describe the bug
Utilizing Nextcloud AIO without collabra and the Office Online integration app installed. After a few days, seemingly at random, the app will become disabled and users will not be able to open office files. Logging back in and enabling the app again resolves the issue.
Screenshots
Becomes disabled:
Server details
Operating system: Ubuntu, 8GB RAM
Nextcloud version:
Nextcloud AIO v6.2.1
Version of the officeonline app
Office Online integration 2.0.2
Logs
Nextcloud log (data/nextcloud.log)
The text was updated successfully, but these errors were encountered: