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

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

Open
valamidev opened this issue Aug 14, 2023 · 1 comment
Open

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

valamidev opened this issue Aug 14, 2023 · 1 comment

Comments

@valamidev
Copy link

valamidev commented Aug 14, 2023

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;
    }
}
@wemeetagain
Copy link
Member

Are you sure your string is correct? I'm getting this error: Uncaught Error: string encoded ENR must start with 'enr:'

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

2 participants