Specific User cannot load Forest

Observed behavior

A new user loads Forest and it throws 500, the server error is the next:

undefined method `[]' for nil:NilClass (NoMethodError)

          is_allowed = collections_data[collection_name][action].include? user_data['roleId']

However, when I do ForestLiana::ForestApiRequester.get('/liana/v4/permissions/users'), I see the user isn’t in the list, like the user is in the “invited” state.

1 Like

Hello @Maicol_Bentancor,

Thank you for your feedback. I see 2 problems in your case:

  1. The agent should not throw a 500 when trying to retrieve the user’s rights
  2. The user should be included in the response of /liana/v4/permissions/users

We’ll investigate these issues and let you know when they are fixed.

In the meantime, can you please give me more info about your project? It’ll help us force the update of permissions and speed up the investigation:

<!-- Please provide in this **mandatory section**, the relevant information about your configuration: -->
- Project name: ...
- Team name: ...
- Environment name: ...
- Agent technology: (node, php, rails, python)
- Agent (forest package) name & version: ...
- Database type: ...
- Recent changes made on your end if any: ... 

Thank you

Hello @Maicol_Bentancor,

The error regarding your user’s permission should be fixed. We are still investigating the error, but the user should be able to access Forest Admin now.

Thanks, definitively solved the issue for the user, do you still need the other info?

Yes because I’d need to investigate why you had this particular problem.

Sounds good, I will attach the details, let me know if I miss anything:

  • Environment name: production
  • Agent technology: (node, php, rails, python): ruby
  • Agent (forest package) name & version: forest_liana 9.2.0
  • Database type: postgres
  • Recent changes made on your end if any: We updated the agent on April 9th, previously we had 9.1.0

We added another user and had the same error, can you fix it for the user? Also, is there an ETA on the fix for the root cause?

Hello @Maicol_Bentancor,

Do you still have the same issue today? Is it on the user kr[...]e@h[...].com?

I checked on our side and data seems OK on our side for this user.

Hello @Maicol_Bentancor,

Have you override the permssion system ?

Because you should get the error the collection 'collection_name' doesn't exist instead of undefined method '[]' for nil:NilClass.

Because you should get the error the collection 'collection_name' doesn't exist

Yes, I’m getting that error, it’s raised because the above, also it makes sense because is rescued here: forest-rails/app/services/forest_liana/ability/permission.rb at c828cf8890dc41d0a3062902d6d72e4b8a534ffc · ForestAdmin/forest-rails · GitHub

Is it on the user ?

The user was s***r@**t.com, but is fixed now because we deleted another user, so it’s a problem with the limit of users, it will come up again in the future.

Regards,

Maicol

Hello @Maicol_Bentancor,

Can you open another ticket for you current issue? The error you get probably does not match the one at the beginning of the thread. It’s probably another issue.

I don’t think your project have any limitation regarding the number of users. I think it might be a problem with our endpoint to retrieve users permissions. Your help to identify the reproduction scenario would be appreciated to definitively fix this issue.

I reproduce this issue on my end.
I have opened a ticket and I’ll get back to you when this issue has been resolved.

Thank you!

It’s the same issue, we even have the same Sentry report, but yeah it’s 2-level of exception and I wasn’t putting the right one here for investigation.

Hello @Maicol_Bentancor,

The fix has been released on the new version 9.3.8 :rocket:

2 Likes