Plugin not fully registered/enabled I've created my first Craft3 plugin and installed it locally via a composer.json path. After doing the composer require, the plugin showed up as installed (with a green dot) under Admin->Settings->Plugin.

However, the plugin has the following code:

$plugins=Craft::$app-&gt;plugins-&gt;getAllPluginInfo();
error_log('We have version '.$this-&gt;getVersion().' and handle '.$this-&gt;getHandle());
$plugin=Craft::$app-&gt;plugins-&gt;getPlugin($this-&gt;getHandle());
if ($plugin==null) {
     error_log('Could not find self');
} else {
     error_log('Fond self with version: '.$plugin-&gt;getVersion());
}
/* @var PluginInterface $plugin */
foreach ($plugins as $plugin) {
     error_log(json_encode($plugin));
}


calling any page and then checking storage/logs/phperrors.log shows:

22-Jan-2019 13:18:52 Europe/London] We have version 1.0.0 and handle craft-project-name
[22-Jan-2019 13:18:52 Europe/London] Could not find self
...
[22-Jan-2019 13:18:52 Europe/London] {
"developer":"myname",
"developerUrl":"https:\/\/www.example.com",
"description":"Example plugin",
"documentationUrl":"https:\/\/www.example.com",
"class":"rbairwell\\craftprojectname\\Plugin",
"basePath":"\/Applications\/Dev\/craftcms\/craft-project-name\/src",
"aliases":{"@rbairwell\/craftprojectname":"\/Applications\/Dev\/craftcms\/vendor\/rbairwell\/craft-project-name\/src"},
"name":"Craft Project Name",
"version":"1.0.0",
"sourceLanguage":"en-US",
"hasCpSection":false,
"packageName":"rbairwell\/craft-project-name",
"isInstalled":true,
"isEnabled":false,
"moduleId":"craft-project-name",
"edition":"standard",
"hasMultipleEditions":false,
"hasCpSettings":false,
"licenseKey":null,
"licenseKeyStatus":"unknown",
"licensedEdition":null,
"licenseIssues":[],
"isTrial":false,
"upgradeAvailable":false}
...


Why is the plugin unable to find itself using getPlugin even though it's confirm it's handle name and why, in the list of plugins does it come up isEnabled: false even though the admin front end shows it as installed+enabled and obviously the plugin is functioning?
You seem to have discrepancies in your naming. There is craft-project-name and craftprojectname in there. Could it be that?

Fix the naming and try to delete the plugin row in the database, composer remove it then re install..?