【发布时间】:2018-06-16 17:16:40
【问题描述】:
我有一段代码在很长一段时间内每天自动运行两次。在上周的某个时候,我一直使用的 auth.delete_user 方法开始失败,并返回错误。有谁知道发生了什么变化,或者我做错了什么? documentation 中似乎没有任何变化。
我得到的错误是:
Server response: {
"error": {
"code": 400,
"message": "Invalid JSON payload received. Unknown name \"local_id\": Proto field is not repeating, cannot start list.",
"errors": [
{
"message": "Invalid JSON payload received. Unknown name \"local_id\": Proto field is not repeating, cannot start list.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT"
}
}
一个人为的代码示例是:
from firebase_admin import credentials
from firebase_admin import auth
from firebase_admin import db
try:
cred = credentials.Certificate("serviceAccountKey.json")
firebase_admin.initialize_app(cred, {
'databaseURL': 'https://[project].firebaseio.com'
})
except Exception as e:
f.write(str(e.message))
uid = 'some valid UID string'
user = auth.delete_user(uid)
非常感谢您对出了什么问题的任何见解!
【问题讨论】:
标签: firebase-authentication firebase-admin