Cannot assign null to property ... $host
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3552676. --> Reported by: [ronraney](https://www.drupal.org/user/3674214) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Hello, I got this module installed in Drupal 10.2.5. It was previously working without issue.</p> <p>I recently lost access to Amazee, so I disabled the module. It took some work, but I got the module installed again. Now when I go to this page <code>/admin/config/ai/providers/amazeeio</code>, I get a site crashing error.</p> <pre>The website encountered an unexpected error. Try again later.<br><br>TypeError: Cannot assign null to property Drupal\ai_provider_amazeeio\AmazeeIoApi\AmazeeClient::$host of type string in Drupal\ai_provider_amazeeio\AmazeeIoApi\AmazeeClient-&gt;__construct() (line 52 of modules/contrib/ai_provider_amazeeio/src/AmazeeIoApi/AmazeeClient.php).<br>Drupal\Component\DependencyInjection\Container-&gt;createService(Array, 'ai_provider_amazeeio.api_client') (Line: 179)<br>Drupal\Component\DependencyInjection\Container-&gt;get('ai_provider_amazeeio.api_client') (Line: 95)<br>Drupal\ai_provider_amazeeio\Form\AmazeeioAiConfigForm::create(Object) (Line: 41)<br>Drupal\Core\DependencyInjection\ClassResolver-&gt;getInstanceFromDefinition('\Drupal\ai_provider_amazeeio\Form\AmazeeioAiConfigForm') (Line: 48)<br>Drupal\Core\Controller\HtmlFormController-&gt;getFormObject(Object, '\Drupal\ai_provider_amazeeio\Form\AmazeeioAiConfigForm') (Line: 58)<br>Drupal\Core\Controller\FormController-&gt;getContentResult(Object, Object)<br>call_user_func_array(Array, Array) (Line: 123)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 637)<br>Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 121)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 181)<br>Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 76)<br>Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 53)<br>Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 48)<br>Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 28)<br>Drupal\Core\StackMiddleware\ContentLength-&gt;handle(Object, 1, 1) (Line: 32)<br>Drupal\big_pipe\StackMiddleware\ContentLength-&gt;handle(Object, 1, 1) (Line: 48)<br>Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 51)<br>Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 36)<br>Drupal\Core\StackMiddleware\AjaxPageState-&gt;handle(Object, 1, 1) (Line: 38)<br>Drupal\mercury_editor\StackMiddleware\AjaxPageState-&gt;handle(Object, 1, 1) (Line: 51)<br>Drupal\Core\StackMiddleware\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 741)<br>Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>This is a doozie. I'm working in Drupal 10.5.4. I have Drupal AI installed and it's been working. I have many of the AI submodules installed. When I go to the page shown above, it shows this error. The only difference that I'm aware of between when it was working and now is the version of this module. I believe this version came out after I had everything working.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3>
issue