# Can't sign in as admin user (undefined method \`username' for nil:NilClass)

**URL:** <https://meta.discourse.org/t/cant-sign-in-as-admin-user-undefined-method-username-for-nil-nilclass/68169>\
**Category:** Product Support\
**Created:** [16 Agosto, 2017 17:55 UTC](https://meta.discourse.org/t/cant-sign-in-as-admin-user-undefined-method-username-for-nil-nilclass/68169 "2017-08-16T17:55:38Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [17 Agosto, 2017 10:29 UTC](https://meta.discourse.org/t/cant-sign-in-as-admin-user-undefined-method-username-for-nil-nilclass/68169/9 "2017-08-17T10:29:18Z")

</div>

It turns out it wasn’t a problem with Vagrant. I was running into the same error in development as well. Fixed in

[https://github.com/discourse/discourse/commit/0e656ff213d11b0d416927763c284fa98f91aa5b](https://github.com/discourse/discourse/commit/0e656ff213d11b0d416927763c284fa98f91aa5b)

though I’m not sure why this wasn’t causing problems previously.

---

_[View the full topic](https://meta.discourse.org/t/cant-sign-in-as-admin-user-undefined-method-username-for-nil-nilclass/68169)._
