Skip to content
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

Can't register managed server #55

Closed
sualko opened this issue Aug 4, 2017 · 3 comments
Closed

Can't register managed server #55

sualko opened this issue Aug 4, 2017 · 3 comments
Labels
Milestone

Comments

@sualko
Copy link
Member

sualko commented Aug 4, 2017

Environment

  • PHP version: 5.6
  • NC version: 11
  • JSXC version: 3.3.0-beta.1

NC Logs

OCP\AppFramework\QueryException: Could not resolve dataRetriever! Class dataRetriever does not exist
.../nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 117: OC\AppFramework\Utility\SimpleContainer->resolve('dataRetriever')
.../nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 544: OC\AppFramework\Utility\SimpleContainer->query('dataRetriever')
.../nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 73: OC\AppFramework\DependencyInjection\DIContainer->query('dataRetriever')
.../nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 96: OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
.../nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php - line 117: OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\OJSXC\\Contr...')
.../nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php - line 544: OC\AppFramework\Utility\SimpleContainer->query('OCA\\OJSXC\\Contr...')
.../nextcloud/lib/private/AppFramework/App.php - line 101: OC\AppFramework\DependencyInjection\DIContainer->query('OCA\\OJSXC\\Contr...')
.../nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('OCA\\OJSXC\\Contr...', 'register', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
.../nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
.../nextcloud/lib/base.php - line 1010: OC\Route\Router->match('/apps/ojsxc/man...')
.../nextcloud/index.php - line 40: OC handleRequest()
{main}
@sualko sualko added this to the 3.3.0 milestone Aug 4, 2017
@sualko sualko added the bug label Aug 17, 2017
@sualko
Copy link
Member Author

sualko commented Aug 18, 2017

The error message is completely misleading. It failed, because $c->query('URLGenerator') failed. I had to replace all query statements with something like this:

\OC::$server->getURLGenerator(),
\OC::$server->getConfig(),
\OC::$server->getUserSession(),
$c->getServer()->getLogger(),
$c->getServer()->getSecureRandom(),

According to the app manual, we have to use a namespaced variant:

$c->query('OCP\IURLGenerator'),
$c->query('OCP\IConfig'),
$c->query('OCP\IUserSession'),
$c->query('OCP\ILogger'),
$c->query('OCP\Security\ISecureRandom')

@LEDfan do you know why it works on NC 12? Did you know that there is automatic dependency assembly? We just have to update routes.php (in an further release).

@sualko sualko closed this as completed in 1dc1c4b Aug 18, 2017
@LEDfan
Copy link
Member

LEDfan commented Aug 18, 2017

The error message is completely misleading

It really is! There is a WIP patch nextcloud/server#5938 to give better errors.

do you know why it works on NC 12?

Absolutely not, I don't know of any changes in the DI stuff since 12.

Did you know that there is automatic dependency assembly?

I heard about it and I guess it's a good idea to move most of the services to it (some will have to stay hard coded because they need some special logic). Maybe refactor it after the 3.3 release, together with moving the files to CamelCase?

@sualko
Copy link
Member Author

sualko commented Aug 18, 2017

Maybe refactor it after the 3.3 release, together with moving the files to CamelCase?

Sounds great. I would like to release a second beta this weekend, so we can release the final version before the nc conf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants