[Bug]: Unknown object undefined when call exportSession(). #17

Closed
opened 2024-02-20 08:24:46 +03:00 by LWJerri · 4 comments
LWJerri commented 2024-02-20 08:24:46 +03:00 (Migrated from github.com)

Hello, dear developer! When I call exportSession() I receive error Error: Unknown object undefined.

To Reproduce

  1. Log in to your account.
  2. Call exportSession().
  3. See result.

Expected behavior

Retrieve session string.

Logs

Error: Unknown object undefined
    at TlBinaryWriter.object (file:///home/lwjerri/projects/SpotiGram/node_modules/.pnpm/@mtcute+tl-runtime@0.7.0/node_modules/@mtcute/tl-runtime/esm/writer.js:243:19)
    at writeStringSession (file:///home/lwjerri/projects/SpotiGram/node_modules/.pnpm/@mtcute+core@0.7.0/node_modules/@mtcute/core/esm/utils/string-session.js:22:12)
    at BaseTelegramClient.exportSession (file:///home/lwjerri/projects/SpotiGram/node_modules/.pnpm/@mtcute+core@0.7.0/node_modules/@mtcute/core/esm/highlevel/base.js:168:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async saveSession (file:///home/lwjerri/projects/SpotiGram/dist/app.js:133:27)
    at async file:///home/lwjerri/projects/SpotiGram/dist/app.js:224:12

Environment

  • OS: Windows 11 (WSL 2 with Ubuntu 22.04).
  • Runtime: Node.js v21.6.1.
  • mtcute version: ^0.7.0.

Additional context
I'm use NodeTelegramClient client instance from @mtcute/node package.

<!-- describe the bug --> Hello, dear developer! When I call `exportSession()` I receive error `Error: Unknown object undefined`. ## To Reproduce 1. Log in to your account. 2. Call `exportSession()`. 3. See result. ## Expected behavior Retrieve session string. ## Logs ```txt Error: Unknown object undefined at TlBinaryWriter.object (file:///home/lwjerri/projects/SpotiGram/node_modules/.pnpm/@mtcute+tl-runtime@0.7.0/node_modules/@mtcute/tl-runtime/esm/writer.js:243:19) at writeStringSession (file:///home/lwjerri/projects/SpotiGram/node_modules/.pnpm/@mtcute+core@0.7.0/node_modules/@mtcute/core/esm/utils/string-session.js:22:12) at BaseTelegramClient.exportSession (file:///home/lwjerri/projects/SpotiGram/node_modules/.pnpm/@mtcute+core@0.7.0/node_modules/@mtcute/core/esm/highlevel/base.js:168:16) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async saveSession (file:///home/lwjerri/projects/SpotiGram/dist/app.js:133:27) at async file:///home/lwjerri/projects/SpotiGram/dist/app.js:224:12 ``` ## Environment - OS: `Windows 11 (WSL 2 with Ubuntu 22.04)`. - Runtime: `Node.js v21.6.1`. - mtcute version: `^0.7.0`. **Additional context** I'm use `NodeTelegramClient` client instance from `@mtcute/node` package.
LWJerri commented 2024-02-22 15:34:24 +03:00 (Migrated from github.com)

:shipit:

:shipit:
LWJerri commented 2024-02-22 15:56:01 +03:00 (Migrated from github.com)

Hi, @teidesu (again). The Problem still exists after upgrading the package to v^0.7.1 ;(

image

Should I need to create a new issue?

Hi, @teidesu (again). The Problem still exists after upgrading the package to v^0.7.1 ;( ![image](https://github.com/mtcute/mtcute/assets/50290430/8d4936e3-420f-48d7-bf5b-d2ef352f0b06) Should I need to create a new issue?
teidesu commented 2024-02-22 16:06:46 +03:00 (Migrated from github.com)

bruh im retarded

i should make some tests for export/import

bruh im retarded i should make some tests for export/import
LWJerri commented 2024-02-22 16:07:22 +03:00 (Migrated from github.com)

un :shipit:

un :shipit:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: teidesu/mtcute#17
No description provided.