Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Find or delete non-existing UID results to prevent an uncacheable error.

オープン
#2,845 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 7 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
firebase, node.js, typescript

調査の方向性

まず、存在しない UID を使って Firebase Auth の admin.auth().getUser(uid) と deleteUser(uid) の呼び出しを行い、報告された動作を再現します。提供された TypeScript 関数が auth/user-not-found エラーをどのように処理するかを確認し、ユーザーが存在しない場合の想定される動作を判断します。検索と削除の両方のケースについて、文書化された、またはテストされた結果があれば完了とします。

索引モデルが issue の本文から書いたものです。

説明

api: auth

Platform:

  • Operating System version: MacOs - Darwin 23.6.0 arm64 arm
  • Firebase SDK version: 11.11.1
  • Firebase Product: Firebase Auth
  • Bun version: 1.2.2 (Don't think is related)
  • NPM version: 10.8.2

Problem:
Whenever I try to find a user that doesn't exist or delete a uid that doesn't exist it thorws an error that breaks the function and is not cachable for some reaons, and its very weird behavirous that im not able to handle, i tried to use try catch, and then catch, but still the same. This has no steep to reprpoduce the error, its default behaviour.

Code:

import { Firebase } from '@/libs/firebase'
import { Console } from '@/helpers/logs'

const admin = await Firebase()

const DeleteFirebaseAccount = async (uid: string): Promise<boolean> => {
    try {
        const userExists = await admin.auth().getUser(uid)
        if (userExists) await admin.auth().deleteUser(uid)

        return true
    } 
    
    catch (error) {
        Console.Error('DeleteFirebaseAccount', error)
        return false
    }
}

export default DeleteFirebaseAccount

The error:

class FirebaseError extends Error {
29 |     constructor(errorInfo) {
30 |         super(errorInfo.message);
             ^
error: There is no user record corresponding to the provided identifier.
  errorInfo: {
  code: "auth/user-not-found",
  message: "There is no user record corresponding to the provided identifier.",
},
 codePrefix: "auth",
主要言語
TypeScript
スター
1.8k
フォーク
420
平均マージ
5日 6時間
マージ済み PR(30日)
11

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/firebase-admin-node のほかの issue

firebase/firebase-admin-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。