Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The getAllVolumeSnapshots() returns always null #125

Open
NeXT405 opened this issue Sep 12, 2022 · 0 comments
Open

The getAllVolumeSnapshots() returns always null #125

NeXT405 opened this issue Sep 12, 2022 · 0 comments

Comments

@NeXT405
Copy link

NeXT405 commented Sep 12, 2022

V2.17 Release

The getAllVolumeSnapshots() request returns always null because of an JsonSyntaxException DigitalOceanClient:1614

com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "000b9bcf-****-****-****-0a58ac14d111"

com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "000b9bcf-****-****-****-0a58ac14d111"
	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:245)
	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:235)
	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.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.google.gson.Gson.fromJson(Gson.java:773)
	at com.myjeeva.digitalocean.impl.DigitalOceanClient.perform(DigitalOceanClient.java:1614)
	at com.myjeeva.digitalocean.impl.DigitalOceanClient.getAllVolumeSnapshots(DigitalOceanClient.java:1287)
	at ch.ionesoft.digitalocean.DeleteSnapshots.main(DeleteSnapshots.java:25)
Caused by: java.lang.NumberFormatException: For input string: "000b9bcf-265c-11ed-859b-0a58ac14d111"
	at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
	at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.base/java.lang.Double.parseDouble(Double.java:651)
	at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1193)
	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:243)
	... 15 more

The response from the api looks good to me:

    "snapshots": [
        {
            "id": "000b9bcf-****-****-****-0a58ac14d111",
            "name": "snapshot-a2e3f2f0-********",
            "regions": [
                "fra1"
            ],
            "created_at": "2022-08-27T23:00:09Z",
            "resource_id": "b369c3c8-****-****-****-0a58ac14d078",
            "resource_type": "volume",
            "min_disk_size": 10,
            "size_gigabytes": 0.5198,
            "tags": [
                "k8s:3cb4adcb-****-****-****-d109da17b4d8"
            ]
        },

Feel free to ask for more information if needed.

Kind regards
Marcel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant