amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
585 stars 730 forks source link

/fba/inventory/v1/summaries endpoint, response for some SellerSKUs return empty string for "lastUpdatedTime": "" #2275

Closed midi-red closed 1 year ago

midi-red commented 2 years ago

When requesting inventory summaries through SP-API /fba/inventory/v1/summaries endpoint, response for some SellerSKUs return empty string for "lastUpdatedTime": "" , which consequently causes Exception in SP-SPI

org.threeten.bp.format.DateTimeParseException: Text '' could not be parsed at index 0 at org.threeten.bp.format.DateTimeFormatter.parseToBuilder(DateTimeFormatter.java:1588) at org.threeten.bp.format.DateTimeFormatter.parse(DateTimeFormatter.java:1491) at org.threeten.bp.OffsetDateTime.parse(OffsetDateTime.java:359) at com.amazon.sellingpartner.JSON$OffsetDateTimeTypeAdapter.read(JSON.java:215) at com.amazon.sellingpartner.JSON$OffsetDateTimeTypeAdapter.read(JSON.java:179) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.Gson.fromJson(Gson.java:927) at com.google.gson.Gson.fromJson(Gson.java:892) at com.google.gson.Gson.fromJson(Gson.java:841) at com.amazon.sellingpartner.JSON.deserialize(JSON.java:137) at com.amazon.sellingpartner.ApiClient.deserialize(ApiClient.java:760) at com.amazon.sellingpartner.ApiClient.handleResponse(ApiClient.java:963) at com.amazon.sellingpartner.ApiClient.execute(ApiClient.java:890) at com.amazon.sellingpartner.api.fbaInventory.FbaInventoryApi.getInventorySummariesWithHttpInfo(FbaInventoryApi.java:195)

Request Details:

x-amzn-RequestId: 20d2fea4-b3ce-4ca6-b8e6-cd60353b70c7 2022-02-20 09:36:25.045 DEBUG 41049 --- [ XNIO-1 task-1] com.amazonaws.auth.AWS4Signer : AWS4 Canonical Request: '"GET /fba/inventory/v1/summaries details=true&granularityId=ATVPDKIKX0DER&granularityType=Marketplace&marketplaceIds=ATVPDKIKX0DER&sellerSkus=OD%28FBA%29---561743 accept:application/json content-type:application/json host:sellingpartnerapi-na.amazon.com user-agent:Swagger-Codegen/1.0.0/java x-amz-access-token:Atza|IwEBIER5eigcR-kT.... x-amz-security-token:....

We opened a case: ID 9664916671 We would appreciate help ASAP since this is causing interruptions in our APP. @jevoniuk

LQYHYQ commented 2 years ago

I also encountered this bug!When the "lastUpdateTime" returned by this API is '', it throw a DateTimeParseException.

org.threeten.bp.format.DateTimeParseException: Text '' could not be parsed at index 0
    at org.threeten.bp.format.DateTimeFormatter.parseToBuilder(DateTimeFormatter.java:1587)
    at org.threeten.bp.format.DateTimeFormatter.parse(DateTimeFormatter.java:1491)
    at org.threeten.bp.OffsetDateTime.parse(OffsetDateTime.java:359)
    at com.amazon.client.JSON$OffsetDateTimeTypeAdapter.read(JSON.java:166)
    at com.amazon.client.JSON$OffsetDateTimeTypeAdapter.read(JSON.java:130)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
    at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
    at com.google.gson.Gson.fromJson(Gson.java:887)
    at com.google.gson.Gson.fromJson(Gson.java:852)
    at com.google.gson.Gson.fromJson(Gson.java:801)
    at com.amazon.client.JSON.deserialize(JSON.java:114)
    at com.amazon.client.ApiClient.deserialize(ApiClient.java:793)
    at com.amazon.client.ApiClient.handleResponse(ApiClient.java:992)
    at com.amazon.client.ApiClient.execute(ApiClient.java:923)
    at com.amazon.fbaInventory.api.FbaInventoryApi.getInventorySummariesWithHttpInfo(FbaInventoryApi.java:185)
    at com.amazon.fbaInventory.api.FbaInventoryApi.getInventorySummaries(FbaInventoryApi.java:165)
onebox24 commented 2 years ago

I also encounter this bug. Is there any easy workaround?

smargoli2 commented 1 year ago

Still dealing with this, please advise

Jookus commented 1 year ago

Any news on this?

midi-red commented 1 year ago

I solved this issue by changing threeten lib, compiled it and add it to my project separately. It is an ugly workaround but it looks like amazon has not fixed the issue.

smargoli2 commented 1 year ago

@midi-red , Can you give more details? I am using C# so need more info for how to implement for myself...

Jookus commented 1 year ago

I finally found a workaround for the Java SDK, maybe that works for your sdks too?

Link

github-actions[bot] commented 1 year ago

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.

github-actions[bot] commented 1 year ago

closed for inactivity

daviddecorso commented 1 year ago

Still an issue.