Sentinel 404 and 502 errors

For last 2-3 days we’ve encountered some errors while getting satellite images.

<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd">
  <ServiceExceptionReport version="1.1.1">
    <ServiceException>
      <![CDATA[ Request failed with status [502]! ]]>
    </ServiceException>
  </ServiceExceptionReport>
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd">
  <ServiceExceptionReport version="1.1.1">
    <ServiceException>
      <![CDATA[ Illegal request to s3://sentinel-s2-l1c-index/tiles/17/T/NH/2022/3/17/0/B08.index. HTTP Status: '404' ]]>
    </ServiceException>
  </ServiceExceptionReport>

Is it a known problem by you, and can we expect amendments in the near future?

Hi,

Can you give some more information (the code you are using) on the requests you are making? If you’re able to share this information that will help us replicate the error.

Thanks!

Hi,

We are currently using @sentinel-hub/sentinelhub-js in typescript.

Here is some code that should be enough to recreate the error.

import * as sentinelhub from '@sentinel-hub/sentinelhub-js';
import { MosaickingOrder } from '@sentinel-hub/sentinelhub-js';
import * as turf from '@turf/turf';
import { Polygon } from 'geojson';

type BBox2D = [number, number, number, number];

async function getImage() {
  const polygon: Polygon = {
    type: 'Polygon',
    coordinates: [
      [
        [-80.352296979, 42.759124977],
        [-80.335947457, 42.759124977],
        [-80.335947457, 42.766406763],
        [-80.352296979, 42.766406763],
        [-80.352296979, 42.759124977],
      ],
    ],
  };

  const bbox = new sentinelhub.BBox(sentinelhub.CRS_WGS84, ...(turf.bbox(polygon) as BBox2D));

  await sentinelhub.requestAuthToken(this.sentinelConfig.CLIENT_ID, this.sentinelConfig.CLIENT_SECRET);

  const sentinelEvalscript = `
    //VERSION=3
    function setup() {
     return{
      input: [{
       bands: ["B04", "B08"]
      }],
      output: {
       id: "default",
       bands: 1,
       sampleType: SampleType.FLOAT32
      }
     }
    }
    function evaluatePixel(sample) {
     let ndvi = (sample.B08 - sample.B04) / (sample.B08 + sample.B04)
     return [ ndvi ]
    }
  `;

  const s2L1CLayer = new sentinelhub.S2L1CLayer({
    instanceId: this.sentinelConfig.INSTANCE_ID,
    layerId: this.sentinelConfig.LAYER_ID,
    evalscript: sentinelEvalscript,
    maxCloudCoverPercent: 10,
    mosaickingOrder: MosaickingOrder.MOST_RECENT,
    title: 'NDVI_LAYER',
    description: 'Layer used for getting ndvi index',
  });

  try {
    const blob = await s2L1CLayer.getMap(
      {
        bbox,
        geometry: polygon,
        toTime: new Date(1654819200000),
        resx: '10m',
        resy: '10m',
        preview: sentinelhub.PreviewMode.DETAIL,
        format: 'image/tiff',
        fromTime: null,
        quality: 100,
      },
      sentinelhub.ApiType.WMS
    );

    return blob as undefined as Buffer;
  } catch (error) {
    console.log(error.response.data.toString());
    throw error;
  }
}

getImage();

Error occurs after getMap function while getting image

Hi @Meteotrack ,

There’s an issue regarding the Sentinel-2 L1C B08 product in your area of interest on 17th March 2022. We’ve informed our developers and it should be fixed later. Meanwhile, you could skip this date and the request should work for other time range.

Thank you very much for the reply. :smile:
Please let us know when the issue will be fixed.

Hi @Meteotrack ,

The issue is fixed. Could you please try your request again?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.