The process for developing Opensearch Dashboards plugins doesn't seem to work for me

I want to develop a simple Opensearch Dashboards (2.18.0) plugin that inserts a banner into the UI.
I have an Opensearch instance running to test this with (it is a single-node instance running on the same host as I am attempting the Opensearch Dashboards development on. Cluster status is green).
I am working on Rocky 9.5.

I haven’t yet started developing my plugin, I am still at the stage of trying to get the development environment running.

I have read these resources and I am trying to follow them:

Steps to recreate my issue:

After running ‘yarn start’, the dev Opensearch Dashboards instance starts up and I am able to reach it in the browser, however the gui doesn’t load properly. Instead it just loads a blank white page with a red banner across the top reading:
“OpenSearch Dashboards did not load properly. Check the server output for more information.”

There’s not much to show in terms of config as this doesn’t seem to work straight out-of-the-box.

The only thing I have configured is config/opensearch_dashboards.yml, in which I have:

server.host: "localhost"
opensearch.hosts: [https://localhost:9200]
opensearch.ssl.verificationMode: none
opensearch.username: kibanaserver
opensearch.password: kibanaserver

‘yarn start’ output logs:

[myuser@vbox OpenSearch-Dashboards]$ yarn start
yarn run v1.22.22
$ scripts/use_node scripts/opensearch_dashboards --dev
  log   [15:57:48.157] [info][plugins-service] Plugin "applicationConfig" is disabled.
  log   [15:57:48.164] [info][plugins-service] Plugin "cspHandler" is disabled.
  log   [15:57:48.165] [info][plugins-service] Plugin "dataSource" is disabled.
  log   [15:57:48.165] [info][plugins-service] Plugin "visTypeXy" is disabled.
  log   [15:57:48.166] [info][plugins-service] Plugin "workspace" is disabled.
  log   [15:57:48.261] [info][dynamic-config-service] registering middleware to inject context to AsyncLocalStorage
[agentkeepalive:deprecated] options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead
  log   [15:57:48.410] [info][plugins-service] Plugin initialization disabled.
  log   [15:57:48.446] [info][dynamic-config-service] initiating start()
  log   [15:57:48.448] [info][dynamic-config-service] finished start()
  log   [15:57:48.480] [warning][savedobjects-service] Skipping Saved Object migrations on startup. Note: Individual documents will still be migrated when read or written.
  log   [15:57:48.485] [warning][cross-compatibility-service] Starting cross compatibility service
 watching for changes  (2326 files)
  log   [15:57:51.269] [info][server] basepath proxy server running at http://localhost:5601/jyk
np bld    log   [15:57:51.666] [info][@osd/optimizer] initialized, 53 bundles cached
np bld    log   [15:57:51.667] [success][@osd/optimizer] all bundles cached, success after 2.9 sec
server    log   [15:57:57.424] [info][plugins-service] Plugin "applicationConfig" is disabled.
server    log   [15:57:57.430] [info][plugins-service] Plugin "cspHandler" is disabled.
server    log   [15:57:57.431] [info][plugins-service] Plugin "dataSource" is disabled.
server    log   [15:57:57.433] [info][plugins-service] Plugin "visTypeXy" is disabled.
server    log   [15:57:57.434] [info][plugins-service] Plugin "workspace" is disabled.
server    log   [15:57:57.652] [info][dynamic-config-service] registering middleware to inject context to AsyncLocalStorage
[agentkeepalive:deprecated] options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead
server    log   [15:57:57.849] [info][plugins-system] Setting up [40] plugins: [usageCollection,opensearchDashboardsUsageCollection,opensearchDashboardsLegacy,mapsLegacy,share,opensearchUiShared,legacyExport,embeddable,expressions,data,savedObjects,queryEnhancements,home,dashboard,visualizations,visTypeVega,visTypeTimeline,visTypeTable,visTypeMarkdown,visBuilder,visAugmenter,tileMap,regionMap,inputControlVis,visualize,apmOss,management,indexPatternManagement,dataSourceManagement,console,advancedSettings,dataExplorer,charts,visTypeVislib,visTypeTimeseries,visTypeTagcloud,visTypeMetric,discover,savedObjectsManagement,bfetch]
[agentkeepalive:deprecated] options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead
server    log   [15:57:57.969] [info][plugins][queryEnhancements] queryEnhancements: Setup complete
[agentkeepalive:deprecated] options.freeSocketKeepAliveTimeout is deprecated, please use options.freeSocketTimeout instead
server    log   [15:57:58.360] [info][dynamic-config-service] initiating start()
server    log   [15:57:58.361] [info][dynamic-config-service] finished start()
server    log   [15:57:58.396] [info][savedobjects-service] Waiting until all OpenSearch nodes are compatible with OpenSearch Dashboards before starting saved objects migrations...
server    log   [15:57:58.527] [info][savedobjects-service] Starting saved objects migrations
server    log   [15:57:58.694] [warning][cross-compatibility-service] Starting cross compatibility service
server    log   [15:57:58.696] [info][plugins-system] Starting [40] plugins: [usageCollection,opensearchDashboardsUsageCollection,opensearchDashboardsLegacy,mapsLegacy,share,opensearchUiShared,legacyExport,embeddable,expressions,data,savedObjects,queryEnhancements,home,dashboard,visualizations,visTypeVega,visTypeTimeline,visTypeTable,visTypeMarkdown,visBuilder,visAugmenter,tileMap,regionMap,inputControlVis,visualize,apmOss,management,indexPatternManagement,dataSourceManagement,console,advancedSettings,dataExplorer,charts,visTypeVislib,visTypeTimeseries,visTypeTagcloud,visTypeMetric,discover,savedObjectsManagement,bfetch]
server    log   [15:57:59.077] [info][listening] Server running at http://localhost:5603/jyk
server    log   [15:57:59.129] [info][server][OpenSearchDashboards][http] http server running at http://localhost:5603/jyk

Am I doing anything wrong or missed anything critical in the documentation?

Is there a better way of doing this? I really can’t find much online that covers Opensearch Dashboards plugins…

Two days later, trying another ‘yarn start’ (without having touched anything in the meantime), Opensearch Dashboards now starts up and loads the GUI correctly. It’s not clear what the issue was, it’s perhaps intermittent.

I’ll now have a bash at developing the plugin.

I’ll just add that there NEEDS to be more comprehensive documentation on developing Opensearch Dashboards plugins. At the moment it is a lot of guesswork, pulling scraps of information together.

Back to square one. It only worked very briefly and now I am only getting the error shown in the broswer (see screenshot above). I’ve started from scratch many times using different operating systems, browsers etc, but it just leads to the same error.

How is anyone else managing to develop Dashboards plugins? Do you have a different workflow? Can anyone share how they are doing this? Or can you shed any light on this error?

(I know there is a dedicated plugins forum here but there is no ‘general’ category, this doesn’t fit into any of the available subcategories).