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

RangeError: index out of range: #15

Open
zdary opened this issue Mar 24, 2023 · 4 comments
Open

RangeError: index out of range: #15

zdary opened this issue Mar 24, 2023 · 4 comments

Comments

@zdary
Copy link

zdary commented Mar 24, 2023

node:readline:1252
throw err;
^

RangeError: index out of range: 51 + 10 > 51
at indexOutOfRange (C:\Users\test\google-authenticator-exporter\node_modules\protobufjs\src\reader.js:13:12)
at BufferReader.read_uint32 [as uint32] (C:\Users\test\google-authenticator-exporter\node_modules\protobufjs\src\reader.js:98:19)
at BufferReader.read_int32 [as int32] (C:\Users\test\google-authenticator-exporter\node_modules\protobufjs\src\reader.js:109:17)
at Type.OtpParameters$decode [as decode] (eval at Codegen (C:\Users\test\google-authenticator-exporter\node_modules@protobufjs\codegen\index.js:50:33), :23:14)
at Type.decode_setup [as decode] (C:\Users\test\google-authenticator-exporter\node_modules\protobufjs\src\type.js:507:25)
at Type.MigrationPayload$decode [as decode] (eval at Codegen (C:\Users\test\google-authenticator-exporter\node_modules@protobufjs\codegen\index.js:50:33), :13:33)
at Type.decode_setup [as decode] (C:\Users\test\google-authenticator-exporter\node_modules\protobufjs\src\type.js:507:25)
at decodeProtobuf (C:\Users\test\google-authenticator-exporter\src\index.js:14:36)
at decode (C:\Users\test\google-authenticator-exporter\src\index.js:48:19)
at C:\Users\test\google-authenticator-exporter\src\index.js:176:22

@awehrung
Copy link

Experiencing a similar issue (using the docker setup):

node:internal/readline/emitKeypressEvents:74
            throw err;
            ^

RangeError: index out of range: 107 + 10 > 107
    at indexOutOfRange (/app/node_modules/protobufjs/src/reader.js:13:12)
    at BufferReader.read_uint32 [as uint32] (/app/node_modules/protobufjs/src/reader.js:98:19)
    at BufferReader.read_int32 [as int32] (/app/node_modules/protobufjs/src/reader.js:109:17)
    at Type.MigrationPayload$decode [as decode] (eval at Codegen (/app/node_modules/@protobufjs/codegen/index.js:50:33), <anonymous>:25:15)
    at Type.decode_setup [as decode] (/app/node_modules/protobufjs/src/type.js:507:25)
    at decodeProtobuf (/app/src/index.js:14:36)
    at decode (/app/src/index.js:48:19)
    at /app/src/index.js:176:22
    at /app/node_modules/prompt/lib/prompt.js:357:32
    at /app/node_modules/async/lib/async.js:154:25

Node.js v17.7.2

and I have absolutely no idea how to debug this further :/

@krissrex
Copy link
Owner

krissrex commented Jun 11, 2024

I think this is related to #22.
What version of Authenticator do you use?
I am unable to reproduce this fault myself, and I don't want you to send your secret code either...

The error means that protobuff tried to read 10 more bytes from the otpauth-migration data, but the data was not longer than 51 and 107 bytes (respectively).

@krissrex
Copy link
Owner

What QR decoder did you use? Does your uri end in a %3D, or in a =? I'm wondering if you copied the URI correctly from the QR.

@krissrex
Copy link
Owner

Does it still fail with the latest version of this repo?

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

3 participants