Skip to content

Intermittent "Client is offline" rejection from Realtime Database get() #5612

Closed
@XuluWarrior

Description

@XuluWarrior

[REQUIRED] Describe your environment

  • Operating System version: AWS Lambda - node-14
  • Firebase SDK version: 9.1.1
  • Firebase Product: database

[REQUIRED] Describe the problem

Since updating my code to use Firebase 9.x and the new modular API, I am getting intermittent "Client is offline" promise rejections when calling get().
There is a Firebase Google Group that has other users that have experienced the same problem but I can't find a related issue in GitHub, so I thought I would raise one.

I currently running 9.1.1 and so will try upgrading to 9.1.2. I will also enable logging.

Steps to reproduce:

Relevant Code:

initializeApp(config)
database = await getDatabase();
selectionsRef = ref(database, path);
await get(child(selectionsRef, systemName), "value");

Call stack:

Error: Error: Client is offline.
  File "/var/task/node_modules/@firebase/database/dist/index.node.cjs.js", line 11517, col 31, in null.<anonymous>
    return Promise.reject(new Error(err));

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions