Problem/Motivation
The views module throws an exception when a entity type was modified using the entity_field_storage_info hook.
The exception is raised in EntityViewsData::mapFieldDefinition() around line 295. It's caused by a loop in EntityViewsData::getViewsData() around line 218. The method scans all fields returned by a table mapping and relies on all fields being registered through EntityManager::getBaseFieldDefinitions(). However, if you manipulate the fields using the hook entity_field_storage_info, those fields won't show up within the base field definitions.
Proposed resolution
The easiest solution would be to add a check of whether a field is available within the base field array. I've included a path that does right that.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.