hook to alter custom blocks?

I am having a problem with my custom blocks rendering, and I want to programmatically manipulate the blocks to troubleshoot the issue.

I used this question to add this hook to my module:

function mymodule_block_view_alter(array &$  build, Drupal\Core\Block\BlockPluginInterface $  block) {   drupal_set_message($  block->getBaseId()); } 

However, when I navigate to my site, I see only the base ids of system blocks:

- page_title_block - system_main_block - help_block - local_tasks_block 

My site’s header and footer are made of custom blocks, so I should be seeing their ids.

How can I programmatically access my custom blocks?