Problem with map visual

Hello,

I have a problem with map visual while i create some points in the map in Kibana, After a refreshment, The map went failed to show the points.[Error message: Unable to create layer]

Hi @HermannSamimi

  • Which excat version of the Stack are you using?
  • Does your user have permissions to create indices and ingest documents into it?
  • Can you share the exact steps to reproduce the issue?
  • Do you get any other errors in your browser or the browser console?
  • The latest version
  • I have tried by super admin permission level.
  • Dashboard > maps > add layer > documents > select data view > select Geospatial field > filtering data
  • here is the exact error

I'm afraid I could not reproduce I did the following steps:

  • Started an instance of the stack (8.15.2)
  • Created a new dashboard
  • Added a new map
  • Add layer of Create Index type with the name discuss_368849_test_1
  • Added a few points to this new index
  • Exit layer editing
  • Exit map
  • Save dashboard
  • Open again this new dashboard from the list
  • Edit the existing map
  • Add layer Documents selecting the discuss_368849_test_1 data view (if the data view does not show up on the list you may need to refresh the browser)

I end up with a dashboard containing a map with two equal layers.

Thanks, but first i'm not gonna read data from an index, while i'm using a particular data stream.
and second everything looks ok unless i refresh the page after save the dashboard.
when i refresh the the page, everything on the map got failed!

Could you please provide some steps to reproduce the issue and the datastream definition? Otherwise it is hard to understand what may be wrong.

I did the following to create a minimal data stream and tried to add it and refresh the map and nothing went wrong so feel free to adapt my code to something that yields the errors you are facing

# Create an ILM Policy
PUT _ilm/policy/discuss_368849
{
  "policy": {
    "phases": {
      "delete": {
        "min_age": "735d",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}


# Creates a component template
PUT _component_template/discuss_368849
{
  "template": {
    "settings": {
      "index.lifecycle.name": "discuss_368849"
    },
    "mappings": {
      "properties": {
        "@timestamp": {
          "type": "date",
          "format": "date_optional_time||epoch_millis"
        },
        "message": {
          "type": "wildcard"
        },
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}

# Create an index template
PUT _index_template/discuss_368849
{
  "index_patterns": ["discuss_368849*"],
  "data_stream": { },
  "composed_of": [ "discuss_368849" ],
  "priority": 500
}

# Add some data
PUT discuss_368849/_bulk
{ "create":{ } }
{ "@timestamp": "2024-08-17T15:13:14+0200", "message": "NYC", "location": [ -74, 41 ] }
{ "create":{ } }
{ "@timestamp": "2024-09-17T15:13:14+0200", "message": "Rio", "location": [ -43, -21 ] }
{ "create":{ } }
{ "@timestamp": "2024-10-17T15:13:14+0200", "message": "Cairo", "location": [ 31, 31 ] }

# Check the data_stream got the data inserted
GET discuss_368849/_search

# Create the data view
POST kbn:/api/data_views/data_view
{
  "data_view": {
    "title": "discuss_368849",
    "timeFieldName": "@timestamp"
  }
}