Skip to content

[Error] Offset is outside the bounds of the DataView #257

@valamidev

Description

@valamidev

I am getting the following error while Decode this Payload:

ENR.decodeTxt("T1WJc2VjcDI1NmsxoQJbQ9BY7wgWhlf7QvAS0iJWw5L30RQyN8bSQ15Car-v0YRzbmFwwIN0Y3Bfg3VkcF8")

Fail here:

export function getProtocolValue(kvs, key) {
    const raw = kvs.get(key);
    if (raw) {
        const view = new DataView(raw.buffer, raw.byteOffset, raw.byteLength);
        return view.getUint16(0); 
    }
    else {
        return undefined;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions