Skip to content

Conversation

@JaroSu
Copy link

@JaroSu JaroSu commented Oct 5, 2018

Fix for:
PHP Fatal error: Uncaught OCP\AppFramework\QueryException: Could not resolve defaultTokenProvider! Class defaultTokenProvider does not exist

Fix for:
PHP Fatal error: Uncaught OCP\AppFramework\QueryException: Could not resolve defaultTokenProvider! Class defaultTokenProvider does not exist
@JaroSu JaroSu changed the title Update SimpleContainer.php Class defaultTokenProvider does not exist Oct 6, 2018
@kesselb
Copy link
Contributor

kesselb commented Oct 6, 2018

Thank you for your contribution 👍 Here are some people reporting the same problem #11225 (but most of them had issues with their database connection). With the latest version (nc13/nc14) there should be a better error message (#11316). I'm just wondering but does your nextcloud still works when you apply these changes? 🤔

@JaroSu
Copy link
Author

JaroSu commented Oct 6, 2018

It's work perfect.

@kesselb
Copy link
Contributor

kesselb commented Oct 6, 2018

Do you have any idea why the test suite is failing? https://drone.nextcloud.com/nextcloud/server/11166 Can you still reproduce the issue (when you revert your pr?). Maybe #11316 would help to find the reason for this error.

@JaroSu
Copy link
Author

JaroSu commented Oct 6, 2018

I think it will fix all errors with defaultTokenProvider, which starts with a lowercase letter. This is name of property. Class name (type) is DefaultTokenProvider. Class defaultTokenProvider does not exist and it's true.
I no idea why tests fails.

@kesselb
Copy link
Contributor

kesselb commented Oct 7, 2018

Test-Suite works for me when getType() => getType()->getName(). Is error fixed for you with this as well?

@kesselb kesselb added the 3. to review Waiting for reviews label Oct 7, 2018
@kesselb kesselb added this to the Nextcloud 15 milestone Oct 7, 2018
@kesselb kesselb added the bug label Oct 7, 2018
@JaroSu
Copy link
Author

JaroSu commented Oct 8, 2018

Yes.
This should by getType()->getName() or getType()->__toString(). reflectiontype
My mistake.

JaroSu added 2 commits October 8, 2018 02:14
Maybe ReflectionNamedType not ReflectionType
@ChristophWurst
Copy link
Member

Class name (type) is DefaultTokenProvider

As far as I can tell, it's either queried with lower case (constructor parameter name) or its fully-qualified class name which is prefixed by the namespace.

@rullzer
Copy link
Member

rullzer commented Oct 8, 2018

Could I ask you to open an issue with what you are trying to fix here.
The code is actually doing what is should. If the DI is not working that is then probably because something is not injected at the right place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants