Hi if I want to access the webui of my nextcloud server i get an http error 500 message.
In the container log it says that:
Stack trace:
#0 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(125): OC\AppFramework\Utility\SimpleContainer->resolve('defaultTokenPro...')
#1 /config/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('defaultTokenPro...')
#2 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(81): OC\ServerContainer->query('defaultTokenPro...')
#3 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(104): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#4 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(125): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#5 /config/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppF in /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php on line 110
PHP Fatal error: Uncaught OCP\AppFramework\QueryException: Could not resolve defaultTokenProvider! Class defaultTokenProvider does not exist in /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php:110
And in SimpleContainer.php this:
// Service not found, use the default value when available
if ($parameter->isDefaultValueAvailable()) {
$parameters[] = $parameter->getDefaultValue();
} else if ($parameterClass !== null) {
$resolveName = $parameter->getName();
(Line 81) $parameters[] = $this->query($resolveName);
} else {
throw $e;
}
}
}
return $class->newInstanceArgs($parameters);
}
}
/**
* If a parameter is not registered in the container try to instantiate it
* by using reflection to find out how to build the class
* @param string $name the class name to resolve
* @return \stdClass
* @throws QueryException if the class could not be found or instantiated
*/
public function resolve($name) {
$baseMsg = 'Could not resolve ' . $name . '!';
try {
$class = new ReflectionClass($name);
if ($class->isInstantiable()) {
(Line 104) return $this->buildClass($class);
} else {
throw new QueryException($baseMsg .
' Class can not be instantiated');
}
} catch(ReflectionException $e) {
(Line 110) throw new QueryException($baseMsg . ' ' . $e->getMessage());
}
}
/**
* @param string $name name of the service to query for
* @return mixed registered service for the given $name
* @throws QueryException if the query could not be resolved
*/
public function query($name) {
$name = $this->sanitizeName($name);
if ($this->offsetExists($name)) {
return $this->offsetGet($name);
} else {
(Line 125) $object = $this->resolve($name);
$this->registerService($name, function () use ($object) {
return $object;
});
return $object;
}
}
And in ServerContainer.php this:
/**
* @param string $name name of the service to query for
* @return mixed registered service for the given $name
* @throws QueryException if the query could not be resolved
*/
(line 107) public function query($name) {
$name = $this->sanitizeName($name);
// In case the service starts with OCA\ we try to find the service in
// the apps container first.
if (strpos($name, 'OCA\\') === 0 && substr_count($name, '\\') >= 2) {
$segments = explode('\\', $name);
try {
$appContainer = $this->getAppContainer(strtolower($segments[1]), $segments[1]);
return $appContainer->queryNoFallback($name);
} catch (QueryException $e) {
// Didn't find the service or the respective app container,
// ignore it and fall back to the core container.
}
} else if (strpos($name, 'OC\\Settings\\') === 0 && substr_count($name, '\\') >= 3) {
$segments = explode('\\', $name);
try {
$appContainer = $this->getAppContainer(strtolower($segments[1]), $segments[1]);
return $appContainer->queryNoFallback($name);
} catch (QueryException $e) {
// Didn't find the service or the respective app container,
// ignore it and fall back to the core container.
}
}
(Line 132) return parent::query($name);
}
}
I hope that helps you to find the error.
Thank you very much!