WSOD after module enabled
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3572638. --> Reported by: [mxr576](https://www.drupal.org/user/315522) Related to !28 >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <strong>Additional Collaborators: </strong><br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Unfortunately, <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/gemini_provider/-/work_items/3560493" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/gemini_provider/-/work_items/3560493</a></span> is still exists and might be impacting other providers, since <code>\Drupal\ai\Base\AiProviderClientBase::loadApiKey()</code> is the root cause, or precisely how "unconfigured" state is handled there.</p> <pre>The website encountered an unexpected error. Try again later.<br><br>Drupal\ai\Exception\AiSetupFailureException: Could not load the Gemini API key, please check your environment settings or your setup key. in Drupal\ai\Base\AiProviderClientBase-&gt;loadApiKey() (line 610 of modules/contrib/ai/src/Base/AiProviderClientBase.php).<br><br>Drupal\gemini_provider\Plugin\AiProvider\GeminiProvider-&gt;loadClient() (Line: 96)<br>Drupal\gemini_provider\Plugin\AiProvider\GeminiProvider-&gt;getConfiguredModels()<br>ReflectionMethod-&gt;invokeArgs() (Line: 164)<br>Drupal\ai\Plugin\ProviderProxy-&gt;wrapperCall() (Line: 133)<br>Drupal\ai\Plugin\ProviderProxy-&gt;__call() (Line: 292)<br>Drupal\ai_dashboard\Plugin\Block\OperationsStatus-&gt;checkOperationTypeStatus() (Line: 172)<br>Drupal\ai_dashboard\Plugin\Block\OperationsStatus-&gt;build() (Line: 106)<br>Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray-&gt;onBuildRender() (Line: 206)<br>Symfony\Component\EventDispatcher\EventDispatcher-&gt;callListeners() (Line: 56)<br>Symfony\Component\EventDispatcher\EventDispatcher-&gt;dispatch() (Line: 90)<br>Drupal\layout_builder\SectionComponent-&gt;toRenderArray() (Line: 88)<br>Drupal\layout_builder\Section-&gt;toRenderArray() (Line: 87)<br>Drupal\dashboard\Controller\DashboardController-&gt;build()</pre><p>Installed the latest dev from from the module with <code>composer req drupal/gemini_provider:1.x-dev </code> which contains the fix from the other issue.<br> Visited the AI dashboard page.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <h3 id="summary-remaining-tasks">Target date or deadline</h3> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ai-usage">AI usage (if applicable)</h3> <p>[ ] AI Assisted Issue<br> This issue was generated with AI assistance, but was reviewed and refined by the creator.</p> <p>[ ] AI Assisted Code<br> This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p> <p>[ ] AI Generated Code<br> This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p> <p>[ ] Vibe Coded<br> This code was generated by an AI and has only been functionally tested.</p> > Related issue: [Issue #3572645](https://www.drupal.org/node/3572645)
issue