V8-archive: System error with custom role users

Created on 10 Jan 2019  路  12Comments  路  Source: directus/v8-archive

Hello, I'm Marco,

When the role of a new user is "ADMINISTRATOR" the CMS works perfectly, but when the user have a custom role, after the login, the system show me a "System error! Something is wrong with this instance鈥檚 server or database." If i change the role to admin the system works.

screen_directus

I try to add the fix in this comment https://github.com/directus/directus/issues/2224#issuecomment-434306147
But not working!

In the developer console i see this 500 error

screen_directus_2

When i try to open this link i see this

screen_directus_3

Anyone have an idea?

PHP: 7.1.25
MySql: 5.7.14

duplicate

Most helpful comment

So, I think this issue is related to https://github.com/directus/api/pull/674.

@marcocala90 try this changes : https://github.com/directus/api/pull/674/files and let us know if it fixes your issue too.

All 12 comments

For ease of debugging, would you be able to paste the URL that the request is being sent to? (The one you put into the browser)

As I got the same error with a fresh directus suite install, here is the URL causing the error 500 :

https://example.com/_/users/me?fields%5B0%5D=id&fields%5B1%5D=avatar.%2A&fields%5B2%5D=email&fields%5B3%5D=first_name&fields%5B4%5D=last_name&fields%5B5%5D=locale&fields%5B6%5D=roles.%2A

The url it's the same as @alrick

Ah, that message shows when there's no user authenticated, if you're visiting the URL directly, make sure you visit with an access_token...

As to why you're getting server error, in the app, there's other issue threads that you can look for from people with similar issues. :+1:

Sorry I can't help more at the moment, I'm busy :P

To add to this issue, I tested with a fresh install of separate API and App and got the same problem.

I think it's related to the App as auth through the API is working fine with a token.

@shealavington To clarify, the error is showing when trying to connect with the App, we don't access it directly.

Using Postman, if i call the API with admin's access token working fine! If i change the token with user's token with custom role, generate 500 Internal server error.

In my case, with separate API (2.0.13) and App (7.0.13), I can call the API (GET https://host/_/users) with both the tokens of admin and the custom role.
But I can't login to the app with that custom role.

Maybe there is more than just one issue.

This is more than likely an issue with your setup(s). Please ensure you've got all the requirements, as I said, this has been an issue before, try looking at other issues. The solution for one was to ensure php was in module mode, could you check/try that?

Ref: https://github.com/directus/directus/issues/2224

So, I think this issue is related to https://github.com/directus/api/pull/674.

@marcocala90 try this changes : https://github.com/directus/api/pull/674/files and let us know if it fixes your issue too.

Hello @marcocala90, does @alrick suggestion worked for you?

If that didn't work can you please share the logs in the logs directory?

@alrick well done! The fix working :) Thanks

I am closing this as this issue is duplicated and have been already fixed, but not released.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benhaynes picture benhaynes  路  4Comments

binary-koan picture binary-koan  路  3Comments

andgar2010 picture andgar2010  路  3Comments

cdwmhcc picture cdwmhcc  路  3Comments

vuhrmeister picture vuhrmeister  路  3Comments