主頁 > 企業開發 > 具有實時資料庫錯誤的firebase函式

具有實時資料庫錯誤的firebase函式

2021-11-07 18:36:01 企業開發

我是 firebase 函式的新手,并嘗試將 firebase 函式與實時資料庫(模擬器套件)一起使用。但是當我嘗試使用 firebase 函式在 firebase 中設定值時,它給出了一個錯誤并且沒有在資料庫中設定值。

錯誤:

17:33:14
I
function[us-central1-textToLength]
[2021-11-05T12:03:14.194Z]  @firebase/database: FIREBASE WARNING: wss:// URL used, but browser isn't known to support websockets.  Trying anyway. 
17:34:18
I
function[us-central1-textToLength]
[2021-11-05T12:04:18.762Z]  @firebase/database: FIREBASE WARNING: wss:// URL used, but browser isn't known to support websockets.  Trying anyway. 
17:35:06
I
function[us-central1-textToLength]
[2021-11-05T12:05:06.473Z]  @firebase/database: FIREBASE WARNING: wss:// URL used, but browser isn't known to support websockets.  Trying anyway. 
17:35:54
I
function[us-central1-textToLength]
[2021-11-05T12:05:54.409Z]  @firebase/database: FIREBASE WARNING: wss:// URL used, but browser isn't known to support websockets.  Trying anyway. 

火力基地功能代碼:

const functions = require('firebase-functions');
var admin = require("firebase-admin");
admin.initializeApp(); 

var database = admin.database();

exports.helloWorld = functions.https.onRequest((request, response) => {
    response.send("Hello from Firebase!");
});

exports.textToLength = functions.https.onRequest((request, response) => {
    var tex = request.query.text;
    var textLength = tex.length;
    console.log(textLength);
    database.ref().child('test').set("op");
    response.send(String(textLength));
});

依賴項:

{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "scripts": {
    "serve": "firebase emulators:start --only functions",
    "shell": "firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "engines": {
    "node": "14"
  },
  "main": "index.js",
  "dependencies": {
    "firebase-admin": "^9.8.0",
    "firebase-functions": "^3.14.1",
    "@firebase/database-compat": "0.1.2" 
  },
  "devDependencies": {
    "firebase-functions-test": "^0.2.0"
  },
  "private": true
}

npm 安裝的包

 -- @firebase/app-compat@0.1.7
|  -- @firebase/app@0.7.6
| |  -- @firebase/component@0.5.8
| | |  -- @firebase/util@1.4.1 deduped
| | | `-- [email protected] deduped
| |  -- @firebase/[email protected]
| | | `-- tslib@2.3.1 deduped
| |  -- @firebase/util@1.4.1
| | | `-- [email protected] deduped
| | `-- tslib@2.3.1 deduped
|  -- @firebase/component@0.5.8
| |  -- @firebase/util@1.4.1 deduped
| | `-- [email protected] deduped
|  -- @firebase/[email protected]
| | `-- tslib@2.3.1 deduped
|  -- @firebase/util@1.4.1
| | `-- [email protected] deduped
| `-- tslib@2.3.1
 -- @firebase/database-compat@0.1.2
|  -- @firebase/component@0.5.7
| |  -- @firebase/util@1.4.0 deduped
| | `-- [email protected] deduped
|  -- @firebase/[email protected]
| |  -- @firebase/[email protected]
| |  -- @firebase/[email protected] deduped
| |  -- @firebase/[email protected] deduped
| |  -- @firebase/[email protected] deduped
| |  -- [email protected]
| | | `-- websocket-driver@0.7.4
| | |    -- http-parser-js@0.5.3
| | |    -- safe-buffer@5.2.1 deduped
| | |   `-- [email protected]
| | `-- tslib@2.3.1 deduped
|  -- @firebase/database-types@0.9.1
| |  -- @firebase/app-types@0.7.0
| | `-- @firebase/[email protected] deduped
|  -- @firebase/[email protected]
| | `-- tslib@2.3.1 deduped
|  -- @firebase/util@1.4.0
| | `-- [email protected] deduped
| `-- tslib@2.3.1 deduped
`-- [email protected]
   -- @firebase/[email protected] deduped
   -- @firebase/[email protected]
  | `-- @firebase/app-types@0.6.3
   -- @google-cloud/firestore@4.15.1
  |  -- fast-deep-equal@3.1.3
  |  -- functional-red-black-tree@1.0.1
  |  -- google-gax@2.28.0

uj5u.com熱心網友回復:

同時,如果您使用的是最新的 Admin SDK 版本,您可以將 @firebase/database-compat 固定到 package.json 檔案中的版本 0.1.2 作為臨時修復。

“依賴關系”:{“@firebase/database-compat”:“0.1.2”}

這對我有用。

參考:https : //github.com/firebase/firebase-admin-node/issues/1487

uj5u.com熱心網友回復:

我不確定該日志訊息的原因,但我確實看到您在函式完成所有作業之前從函式回傳回應。在已部署的函式中,一旦函式回傳,所有進一步的操作都應該被視為永遠不會按照 此處記錄的那樣執行“非活動”功能可能隨時終止,受到嚴重限制,您進行的任何網路呼叫(如在 RTDB 中設定資料)可能永遠不會執行。

我知道您對此不熟悉,但現在養成一個好習慣:不要假設呼叫您的函式的人就是您。在盲目采取行動之前,請檢查是否存在缺少查詢引數和可疑資料等問題。Admin SDK 會繞過您資料庫的安全規則,如果您不小心,惡意用戶可能會造成一些損害(例如更新/users/$theirUid/roles/admin的用戶true)。

exports.textToLength = functions.https.onRequest((request, response) => {
    const { text: queryText } = request.query;
    
    if (!queryText)
      return response.status(400).send("Missing ?text");
    if (typeof queryText !== 'string')
      return response.status(400).send("Bad value for ?text");

    const textLength = queryText.length;
    
    database.ref()
      .child('test')
      .set("op")
      .then(() => {
        console.log(`Successfully updated /test/op to ${textLength}`);
        response.send(String(textLength))
      })
      .catch((err) => {
        console.error(`Failed to update /test/op to ${textLength}: `, error);
        response.status(500).send(`Failed to update database to ${textLength}`)
      });
    ;
});

注意:在部署HTTPS 請求函式時,不要忘記處理CORS

uj5u.com熱心網友回復:

這個問題似乎是由最近發布的 @firebase/* 包之一引起的。我還不知道哪個版本不好,但我能夠通過將最近的更改恢復到我的 yarn.lock 檔案來解決這個問題。

這是我當前的 @firebase 依賴版本,我不再遇到這個問題:

"@firebase/[email protected]":
  version "0.4.0"
  resolved "https://registry.yarnpkg.com/@firebase/analytics-types/-/analytics-types-0.4.0.tgz#d6716f9fa36a6e340bc0ecfe68af325aa6f60508"
  integrity sha512-Jj2xW 8 8XPfWGkv9HPv/uR Qrmq37NPYT352wf7MvE9LrstpLVmFg3LqG6MCRr5miLAom5sen2gZ iOhVDeRA==

"@firebase/[email protected]":
  version "0.6.4"
  resolved "https://registry.yarnpkg.com/@firebase/analytics/-/analytics-0.6.4.tgz#1e0c446e0045c94077f2d06ff3ba33e86d860398"
  integrity sha512-Lhnk5pXeDKoPf1b2cggWQaqCtNq jn6IkhHMIo 7VztVt3i8ovnGuhAn/0hLC XxvVWJ9q6CXIoGStkwvecDoA==
  dependencies:
    "@firebase/analytics-types" "0.4.0"
    "@firebase/component" "0.2.0"
    "@firebase/installations" "0.4.20"
    "@firebase/logger" "0.2.6"
    "@firebase/util" "0.3.4"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.6.5"
  resolved "https://registry.yarnpkg.com/@firebase/analytics/-/analytics-0.6.5.tgz#9f28575ba13e7f04cf1ae506322f11fb80bcb611"
  integrity sha512-0yNdAtLRIS7wTs8eUSPHfQyypAbGha0MVpfnl18CTq1sLpdzHICn7CyCMYhc0ewlFdTCIHLjw4ZQoSTwtBHfkQ==
  dependencies:
    "@firebase/analytics-types" "0.4.0"
    "@firebase/component" "0.2.1"
    "@firebase/installations" "0.4.21"
    "@firebase/logger" "0.2.6"
    "@firebase/util" "0.4.0"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "0.6.1"
  resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.6.1.tgz#dcbd23030a71c0c74fc95d4a3f75ba81653850e9"
  integrity sha512-L/ZnJRAq7F  utfuoTKX4CLBG5YR7tFO3PLzG1/oXXKEezJ0kRL3CMRoueBEmTCzVb/6SIs2Qlaw  uDgi5Xyg==

"@firebase/[email protected]":
  version "0.6.3"
  resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.6.3.tgz#3f10514786aad846d74cd63cb693556309918f4b"
  integrity sha512-/M13DPPati7FQHEQ9Minjk1HGLm/4K4gs9bR4rzLCWJg64yGtVC0zNg9gDpkw9yc2cvol/mNFxqTtd4geGrwdw==

"@firebase/[email protected]":
  version "0.7.0"
  resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.7.0.tgz#c9e16d1b8bed1a991840b8d2a725fb58d0b5899f"
  integrity sha512-6fbHQwDv2jp/v6bXhBw2eSRbNBpxHcd1NBF864UksSMVIqIyri9qpJB1Mn6sGZE bnDsSQBC5j2TbMxYsJQkQg==

"@firebase/[email protected]":
  version "0.6.15"
  resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.6.15.tgz#a426f02eb7210d1ecc77d49296bbb1ec8481a791"
  integrity sha512-VfULP09cci4xk iAU6CB2CUNU/vbpAOoUleDdspXFphV9Yw36anb8RjaHGcN1DRR7LNb7vznNJXHk8FJhC8VWQ==
  dependencies:
    "@firebase/app-types" "0.6.1"
    "@firebase/component" "0.2.0"
    "@firebase/logger" "0.2.6"
    "@firebase/util" "0.3.4"
    dom-storage "2.1.0"
    tslib "^1.11.1"
    xmlhttprequest "1.8.0"

"@firebase/[email protected]":
  version "0.6.16"
  resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.6.16.tgz#d87f3d70e59dd44e8f14fd45a575b8ffe58be406"
  integrity sha512-QGqfvDQ4AK54y2ysttdgtTsyuLGfN0OksdmWSHLDs7HBJg9nJkZUuFA/cJ1cftpPSVxpCbnro OU1FtRgapzAA==
  dependencies:
    "@firebase/app-types" "0.6.1"
    "@firebase/component" "0.2.1"
    "@firebase/logger" "0.2.6"
    "@firebase/util" "0.4.0"
    dom-storage "2.1.0"
    tslib "^2.0.0"
    xmlhttprequest "1.8.0"

"@firebase/[email protected]":
  version "0.1.5"
  resolved "https://registry.yarnpkg.com/@firebase/auth-interop-types/-/auth-interop-types-0.1.5.tgz#9fc9bd7c879f16b8d1bb08373a0f48c3a8b74557"
  integrity sha512-88h74TMQ6wXChPA6h9Q3E1Jg6TkTHep2 k63OWg3s0ozyGVMeY TTOti7PFPzq5RhszQPQOoCi59es4MaRvgCw==

"@firebase/[email protected]":
  version "0.1.6"
  resolved "https://registry.yarnpkg.com/@firebase/auth-interop-types/-/auth-interop-types-0.1.6.tgz#5ce13fc1c527ad36f1bb1322c4492680a6cf4964"
  integrity sha512-etIi92fW3CctsmR9e3sYM3Uqnoq861M0Id9mdOPF6PWIg38BXL5k4upCNBggGUpLIS0H1grMOvy/wn1xymwe2g==

"@firebase/[email protected]":
  version "0.10.2"
  resolved "https://registry.yarnpkg.com/@firebase/auth-types/-/auth-types-0.10.2.tgz#3fad953380c447b7545122430a4c7a9bc8355001"
  integrity sha512-0GMWVWh5TBCYIQfVerxzDsuvhoFpK0  O9LtP3FWkwYo7EAxp6w0cftAg/8ntU1E5Wg56Ry0b6ti/YGP6g0jlg==

"@firebase/[email protected]":
  version "0.16.4"
  resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-0.16.4.tgz#6249d80f1e974b0db122930ae9fac885eccead5c"
  integrity sha512-zgHPK6/uL6 nAyG9zqammHTF1MQpAN7z/jVRLYkDZS4l81H08b2SzApLbRfW/fmy665xqb5MK7sVH0V1wsiCNw==
  dependencies:
    "@firebase/auth-types" "0.10.2"

"@firebase/[email protected]":
  version "0.2.0"
  resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.2.0.tgz#9d48327b3377b84ef22266ec6ab13416ea174c0a"
  integrity sha512-QJJxMEzLRMWjujPBrrS32BScg1wmdY/dZWR8nAEzyC8WKQsNevYR9ZKLbBYxaN0umH9yf5C40kwmy gI8jStPw==
  dependencies:
    "@firebase/util" "0.3.4"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.2.1"
  resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.2.1.tgz#998e2909f87993a2ad7ea718dbf109cd8f5c7ca3"
  integrity sha512-WfBFABfKYcRFjgMA7ydPLokSa GkuZd FD00KrZLAfslpHxs6cCFXdklvP8NEb1oDLqYakRXBqWdelH9/Whacg==
  dependencies:
    "@firebase/util" "0.4.0"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "0.5.7"
  resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.5.7.tgz#a50c5fbd14a2136a99ade6f59f53498729c0f174"
  integrity sha512-CiAHUPXh2hn/lpzMShNmfAxHNQhKQwmQUJSYMPCjf2bCCt4Z2vLGpS UWEuNFm9Zf8LNmkS Z U/s4Obi5carg==
  dependencies:
    "@firebase/util" "1.4.0"
    tslib "^2.1.0"

"@firebase/database-compat@^0.1.1":
  version "0.1.1"
  resolved "https://registry.yarnpkg.com/@firebase/database-compat/-/database-compat-0.1.1.tgz#9fe69e3bd3f71d29011bb6ca793f38edb65ca536"
  integrity sha512-K3DFWiw0YkLZtlfA9TOGPw6zVXKu5dQ1XqIGztUufFVRYW8IizReXVxzSSmJNR4Adr2LiU9j66Wenc6e5UfwaQ==
  dependencies:
    "@firebase/component" "0.5.7"
    "@firebase/database" "0.12.1"
    "@firebase/database-types" "0.9.1"
    "@firebase/logger" "0.3.0"
    "@firebase/util" "1.4.0"
    tslib "^2.1.0"

"@firebase/[email protected]":
  version "0.7.0"
  resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.7.0.tgz#ab140d178ded676e60d8ade8c8f13de8e01e7e1e"
  integrity sha512-FduQmPpUUOHgbOt7/vWlC1ntSLMEqqYessdQ/ODd7RFWm53iVa0T1mpIDtNwqd8gW3k7cajjSjcLjfQGtvLGDg==
  dependencies:
    "@firebase/app-types" "0.6.1"

"@firebase/[email protected]":
  version "0.9.1"
  resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.9.1.tgz#0cab989e8154d812b535d80f23c1578b1d391f5f"
  integrity sha512-RUixK/YrbpxbfdE nYP0wMcEsz1xPTnafP0q3UlSS/ fW744OITKtR1J0cMRaXbvY7EH0wUVTNVkrtgxYY8IgQ==
  dependencies:
    "@firebase/app-types" "0.7.0"
    "@firebase/util" "1.4.0"

"@firebase/database-types@^0.7.2":
  version "0.7.3"
  resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.7.3.tgz#819f16dd4c767c864b460004458620f265a3f735"
  integrity sha512-dSOJmhKQ0nL8O4EQMRNGpSExWCXeHtH57gGg0BfNAdWcKhC8/4Y qfKLfWXzyHvrSecpLmO0SmAi/iK2D5fp5A==
  dependencies:
    "@firebase/app-types" "0.6.3"

"@firebase/[email protected]":
  version "0.12.1"
  resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.12.1.tgz#7e43f27ac4057858d5bd0dd371b134b304fecdb0"
  integrity sha512-Ethk0hc476qnkSKNBa 8Yc7iM8AO69HYWsaD QUC983FZtnuMyNLHtEeSUbLQYvyHo7cOjcc52slop14WmfZeQ==
  dependencies:
    "@firebase/auth-interop-types" "0.1.6"
    "@firebase/component" "0.5.7"
    "@firebase/logger" "0.3.0"
    "@firebase/util" "1.4.0"
    faye-websocket "0.11.4"
    tslib "^2.1.0"

"@firebase/[email protected]":
  version "0.9.4"
  resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.9.4.tgz#7f108ad96f099beae78c06a86f81edf4302fd4c4"
  integrity sha512-Fw2bA4OyxAMqLy8xtoZKlUAuDWjjH/z4AInRTAzHxgegXDbu0UK VM0pmY44RuM2cmnVY4aW6xLXAdDKTY1aJQ==
  dependencies:
    "@firebase/auth-interop-types" "0.1.5"
    "@firebase/component" "0.2.0"
    "@firebase/database-types" "0.7.0"
    "@firebase/logger" "0.2.6"
    "@firebase/util" "0.3.4"
    faye-websocket "0.11.3"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.9.5"
  resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.9.5.tgz#3f4f1dac759d138cf7cfaef5121640cba506f700"
  integrity sha512-sfS5ZvU7UqztMAP9y3t/AQRNhqDrHJT6/W1JBmEivjSxf1MLLbCafZMFbksuvl2iog73wOGDuoDzSHvhtSQvvg==
  dependencies:
    "@firebase/auth-interop-types" "0.1.5"
    "@firebase/component" "0.2.1"
    "@firebase/database-types" "0.7.0"
    "@firebase/logger" "0.2.6"
    "@firebase/util" "0.4.0"
    faye-websocket "0.11.3"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "2.1.0"
  resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-2.1.0.tgz#ad406c6fd7f0eae7ea52979f712daa0166aef665"
  integrity sha512-jietErBWihMvJkqqEquQy5GgoEwzHnMXXC/TsVoe9FPysXm1/AeJS12taS7ZYvenAtyvL/AEJyKrRKRh4adcJQ==

"@firebase/[email protected]":
  version "2.2.0"
  resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-2.2.0.tgz#9a3f3f2906232c3b4a726d988a6ef077f35f9093"
  integrity sha512-5kZZtQ32FIRJP1029dw ZVNRCclKOErHv1 Xn0pw/5Fq3dxroA/ZyFHqDu uV52AyWHhNLjCqX43ibm4YqOzRw==

"@firebase/[email protected]":
  version "2.1.7"
  resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-2.1.7.tgz#039d1d469bd14d89a2d091ec7887a92cc7ab11a7"
  integrity sha512-sh aX6udS8a rwmlJO4zJwvoMC1D2x1CiPvj0nFYWhILRKWvztk/bOA3lT2FWcHY4kr/7x CnqfwtiOSaufdNQ==
  dependencies:
    "@firebase/component" "0.2.0"
    "@firebase/firestore-types" "2.1.0"
    "@firebase/logger" "0.2.6"
    "@firebase/util" "0.3.4"
    "@firebase/webchannel-wrapper" "0.4.1"
    "@grpc/grpc-js" "^1.0.0"
    "@grpc/proto-loader" "^0.5.0"
    node-fetch "2.6.1"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "2.2.0"
  resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-2.2.0.tgz#b7cf2d6a65b432bec43430f1d9f696c07b881e90"
  integrity sha512-/p0oR73zgAlEHgqCIt5v2m8ADOign6APkZ0QG5bJQVSDqPXjB89ktI3v8x0qtRtzKm/pd3lmyoD/raOh/ItsZA==
  dependencies:
    "@firebase/component" "0.2.1"
    "@firebase/firestore-types" "2.2.0"
    "@firebase/logger" "0.2.6"
    "@firebase/util" "0.4.0"
    "@firebase/webchannel-wrapper" "0.4.1"
    "@grpc/grpc-js" "^1.0.0"
    "@grpc/proto-loader" "^0.5.0"
    node-fetch "2.6.1"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "0.4.0"
  resolved "https://registry.yarnpkg.com/@firebase/functions-types/-/functions-types-0.4.0.tgz#0b789f4fe9a9c0b987606c4da10139345b40f6b9"
  integrity sha512-3KElyO3887HNxtxNF1ytGFrNmqD hheqjwmT3sI09FaDCuaxGbOnsXAXH2eQ049XRXw9YQpHMgYws/aUNgXVyQ==

"@firebase/[email protected]":
  version "0.6.2"
  resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.6.2.tgz#5ed6822248c14a4287ec156afc980d76d57e470a"
  integrity sha512-f NxRd0k5RBPZUPj8lykeNMku8TpJTgZaRd3T6cXb8HbmSg/VY7uxQSGOXe11X2gSv/TvcwTQttViFzRMDs7CQ==
  dependencies:
    "@firebase/component" "0.2.0"
    "@firebase/functions-types" "0.4.0"
    "@firebase/messaging-types" "0.5.0"
    node-fetch "2.6.1"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.6.3"
  resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.6.3.tgz#015e1efd1cf6749dddbdc056215d3035b43d000c"
  integrity sha512-02dqjin4V9PvuZLU6d14azyRZZ5cUSPT5CvE2SbGjAcXYdlFIg5Cy6T50dl48UsbmmNO40kXNB1dGESp2A4cWw==
  dependencies:
    "@firebase/component" "0.2.1"
    "@firebase/functions-types" "0.4.0"
    "@firebase/messaging-types" "0.5.0"
    node-fetch "2.6.1"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "0.3.4"
  resolved "https://registry.yarnpkg.com/@firebase/installations-types/-/installations-types-0.3.4.tgz#589a941d713f4f64bf9f4feb7f463505bab1afa2"
  integrity sha512-RfePJFovmdIXb6rYwtngyxuEcWnOrzdZd9m7xAW0gRxDIjBT20n3BOhjpmgRWXo/DAxRmS7bRjWAyTHY9cqN7Q==

"@firebase/[email protected]":
  version "0.4.20"
  resolved "https://registry.yarnpkg.com/@firebase/installations/-/installations-0.4.20.tgz#e52a5904c41ac0be0bb2ab1e320b8e1018ed2630"
  integrity sha512-ddUPZQKHWJzqg3g11hxHIPhp3oMEmsPo0GSxtp9Xd2VLRU64MFNAAt5PiBbq1K92ukZVoNh6Ki6J6 hJEQcGQw==
  dependencies:
    "@firebase/component" "0.2.0"
    "@firebase/installations-types" "0.3.4"
    "@firebase/util" "0.3.4"
    idb "3.0.2"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.4.21"
  resolved "https://registry.yarnpkg.com/@firebase/installations/-/installations-0.4.21.tgz#152fae36647eb08c1e94f94ca160d3273a401117"
  integrity sha512-tMoAb1lHAQefdknWbKxSp2CEWWV/f4aeq4PjhzWurJEJN4RQ620ITbtuKregnGnYHu9lDzhyZ51H4s6 BhjCxA==
  dependencies:
    "@firebase/component" "0.2.1"
    "@firebase/installations-types" "0.3.4"
    "@firebase/util" "0.4.0"
    idb "3.0.2"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "0.2.6"
  resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.2.6.tgz#3aa2ca4fe10327cabf7808bd3994e88db26d7989"
  integrity sha512-KIxcUvW/cRGWlzK9Vd2KB864HlUnCfdTH0taHE0sXW5Xl7 W68suaeau1oKNEqmc3l45azkd4NzXTCWZRZdXrw==

"@firebase/[email protected]":
  version "0.3.0"
  resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.3.0.tgz#a3992e40f62c10276dbfcb8b4ab376b7e25d7fd9"
  integrity sha512-7oQ TctqekfgZImWkKuda50JZfkmAKMgh5qY4aR4pwRyqZXuJXN1H/BKkHvN1y0S4XWtF0f/wiCLKHhyi1ppPA==
  dependencies:
    tslib "^2.1.0"

"@firebase/[email protected]":
  version "0.5.0"
  resolved "https://registry.yarnpkg.com/@firebase/messaging-types/-/messaging-types-0.5.0.tgz#c5d0ef309ced1758fda93ef3ac70a786de2e73c4"
  integrity sha512-QaaBswrU6umJYb/ZYvjR5JDSslCGOH6D9P136PhabFAHLTR4TWjsaACvbBXuvwrfCXu10DtcjMxqfhdNIB1Xfg==

"@firebase/[email protected]":
  version "0.7.4"
  resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.7.4.tgz#d527506de7690731f0a83e6a82a6aa590b14523a"
  integrity sha512-xIZ1vHnOcHAaj H/gS8tu3QolR9up fyTfgVLEFbZRsbAiLuIvuaoJwTHLAUTs/nJF6GtEGscRD4Jx/aFmEJRw==
  dependencies:
    "@firebase/component" "0.2.0"
    "@firebase/installations" "0.4.20"
    "@firebase/messaging-types" "0.5.0"
    "@firebase/util" "0.3.4"
    idb "3.0.2"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.7.5"
  resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.7.5.tgz#1efe40b1785535ee13af323b7f2deb7cceb2a94a"
  integrity sha512-jA1pdV/DrfvzSVKLuff2hYo2AvU0CdZ901TngxscJqKYViZEoqAGw2v/kC70uRwEG0Tc2M/SRHstHpeFADlP0Q==
  dependencies:
    "@firebase/component" "0.2.1"
    "@firebase/installations" "0.4.21"
    "@firebase/messaging-types" "0.5.0"
    "@firebase/util" "0.4.0"
    idb "3.0.2"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "0.0.13"
  resolved "https://registry.yarnpkg.com/@firebase/performance-types/-/performance-types-0.0.13.tgz#58ce5453f57e34b18186f74ef11550dfc558ede6"
  integrity sha512-6fZfIGjQpwo9S5OzMpPyqgYAUZcFzZxHFqOyNtorDIgNXq33nlldTL/vtaUZA8iT9TT5cJlCrF/jthKU7X21EA==

"@firebase/[email protected]":
  version "0.4.6"
  resolved "https://registry.yarnpkg.com/@firebase/performance/-/performance-0.4.6.tgz#e6b8b4c7c21e657af3a8e87c422cd4d199b57fa1"
  integrity sha512-fy9YPYnvePFxme7euyi8B658gF8JUQhAB1qv6hVw HqjVZQIANhwM9AUBi9 5jikD7gD1CnU7EjREvoy8MJiAw==
  dependencies:
    "@firebase/component" "0.2.0"
    "@firebase/installations" "0.4.20"
    "@firebase/logger" "0.2.6"
    "@firebase/performance-types" "0.0.13"
    "@firebase/util" "0.3.4"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.4.7"
  resolved "https://registry.yarnpkg.com/@firebase/performance/-/performance-0.4.7.tgz#be201b76667f59aabd31e7fb73977ed5b172d0c3"
  integrity sha512-wxau4qrAy5W kIoXPUm5hJVX4 vY3wVC9QqWNzoqb L5tMHxIoeEqxvJo8abjv4pa0/YaVl1XKAZdvvoe7c/dA==
  dependencies:
    "@firebase/component" "0.2.1"
    "@firebase/installations" "0.4.21"
    "@firebase/logger" "0.2.6"
    "@firebase/performance-types" "0.0.13"
    "@firebase/util" "0.4.0"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "0.3.36"
  resolved "https://registry.yarnpkg.com/@firebase/polyfill/-/polyfill-0.3.36.tgz#c057cce6748170f36966b555749472b25efdb145"
  integrity sha512-zMM9oSJgY6cT2jx3Ce9LYqb0eIpDE52meIzd/oe/y70F v9u1LDqk5kUF5mf16zovGBWMNFmgzlsh6Wj0OsFtg==
  dependencies:
    core-js "3.6.5"
    promise-polyfill "8.1.3"
    whatwg-fetch "2.0.4"

"@firebase/[email protected]":
  version "0.1.9"
  resolved "https://registry.yarnpkg.com/@firebase/remote-config-types/-/remote-config-types-0.1.9.tgz#fe6bbe4d08f3b6e92fce30e4b7a9f4d6a96d6965"
  integrity sha512-G96qnF3RYGbZsTRut7NBX0sxyczxt1uyCgXQuH/eAfUCngxjEGcZQnBdy6mvSdqdJh5mC31rWPO4v9/s7HwtzA==

"@firebase/[email protected]":
  version "0.1.31"
  resolved "https://registry.yarnpkg.com/@firebase/remote-config/-/remote-config-0.1.31.tgz#092cefc946558a1924d34960163f19b1adf8253d"
  integrity sha512-QWjDsrLSqQnq/YTb3TSOJtIv7z2GXB7mTiwXE43NxYmsOX2z8KBlBBEHf9TcWk 90MKUTFfurDgYJN4rlIOxPg==
  dependencies:
    "@firebase/component" "0.2.0"
    "@firebase/installations" "0.4.20"
    "@firebase/logger" "0.2.6"
    "@firebase/remote-config-types" "0.1.9"
    "@firebase/util" "0.3.4"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.1.32"
  resolved "https://registry.yarnpkg.com/@firebase/remote-config/-/remote-config-0.1.32.tgz#a3ffac5039b6a785d83bf5864b58b06fe0b8cfea"
  integrity sha512-nPPhKSUHgwlv2hazke6keBkkadW /VCpNbq3P9L8oWxq7hKQz7MYAC5LU6PqexNmWQqGFiYyX5J8XDUU3gH/NQ==
  dependencies:
    "@firebase/component" "0.2.1"
    "@firebase/installations" "0.4.21"
    "@firebase/logger" "0.2.6"
    "@firebase/remote-config-types" "0.1.9"
    "@firebase/util" "0.4.0"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "1.2.4"
  resolved "https://registry.yarnpkg.com/@firebase/rules-unit-testing/-/rules-unit-testing-1.2.4.tgz#7c378f7f0e277cf84016946b6d6af269a439e25a"
  integrity sha512-suYV3B3UaZS/ 4x 94gAaAZTaYn7r3du5h4lYunvY4LAzimtv8sVFhxNvlfV3awDCJUoAMlh6MFAm7wg2rXJ4g==
  dependencies:
    "@firebase/logger" "0.2.6"
    "@firebase/util" "0.4.0"
    firebase "8.3.0"
    request "2.88.2"

"@firebase/[email protected]":
  version "0.3.13"
  resolved "https://registry.yarnpkg.com/@firebase/storage-types/-/storage-types-0.3.13.tgz#cd43e939a2ab5742e109eb639a313673a48b5458"
  integrity sha512-pL7b8d5kMNCCL0w9hF7pr16POyKkb3imOW7w0qYrhBnbyJTdVxMWZhb0HxCFyQWC0w3EiIFFmxoz8NTFZDEFog==

"@firebase/[email protected]":
  version "0.4.3"
  resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.4.3.tgz#8800fa61131890f64448b4ab536c8ee1ba9bdcdf"
  integrity sha512-53IIt6Z3BltPBPmvxF/RGlvW8nBl4wI9GMR52CjRAIj438tPNxbpIvkLB956VVB9gfZhDcPIKxg7hNtC7hXrkA==
  dependencies:
    "@firebase/component" "0.2.0"
    "@firebase/storage-types" "0.3.13"
    "@firebase/util" "0.3.4"
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.4.4"
  resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.4.4.tgz#e1cca95706a1a25c551134b687be975fa4853a49"
  integrity sha512-3mH6IR04Lvk16kQQ7CMumpppNcqN6RVcqSD3jzaB8P6vbzDVRyk7Dnhd00Eigd  q5FdNRpW3h8xGvHPWDYfKQ==
  dependencies:
    "@firebase/component" "0.2.1"
    "@firebase/storage-types" "0.3.13"
    "@firebase/util" "0.4.0"
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "0.3.4"
  resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.3.4.tgz#e389d0e0e2aac88a5235b06ba9431db999d4892b"
  integrity sha512-VwjJUE2Vgr2UMfH63ZtIX9Hd7x 6gayi6RUXaTqEYxSbf/JmehLmAEYSuxS/NckfzAXWeGnKclvnXVibDgpjQQ==
  dependencies:
    tslib "^1.11.1"

"@firebase/[email protected]":
  version "0.4.0"
  resolved "https://registry.yarnpkg.com/@firebase/util/-/util-0.4.0.tgz#8db3d39e0ed7b991b4da2435d7e6556cb1bd6672"
  integrity sha512-z8A 9YGM61ZXQ2KBSVwxXaELOJjG EQ374YolqNVMvWBJzTNGZGaVP81Ggl8XD10Xinyt1Dgdo86JDV0OAnvqA==
  dependencies:
    tslib "^2.0.0"

"@firebase/[email protected]":
  version "1.4.0"
  resolved "https://registry.yarnpkg.com/@firebase/util/-/util-1.4.0.tgz#81e985adba44b4d1f21ec9f5af9628d505891de8"
  integrity sha512-Qn58d DVi1nGn0bA9RV89zkz0zcbt6aUcRdyiuub/SuEvjKYstWmHcHwh1C0qmE1wPf9a3a AuaRtduaGaRT7A==
  dependencies:
    tslib "^2.1.0"

"@firebase/[email protected]":
  version "0.4.1"
  resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.4.1.tgz#600f2275ff54739ad5ac0102f1467b8963cd5f71"
  integrity sha512-0yPjzuzGMkW1GkrC8yWsiN7vt1OzkMIi9HgxRmKREZl2wnNPOKo/yScTjXf/O57HM8dltqxPF6jlNLFVtc2qdw==

uj5u.com熱心網友回復:

是的,目前肯定是已知的問題,他們正在修復像 Kasirajan 建議的https://github.com/firebase/firebase-admin-node/issues/1487#issuecomment-962219551這個修復對我們有用。想支持他的評論,但我的聲譽仍然很低哈哈,但我可以驗證它是否有效。

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/351480.html

標籤:节点.js 火力基地 Firebase 实时数据库 谷歌云功能

上一篇:忽略firebase.firestore.timestamp

下一篇:如果我在其中使用變數,則實時資料庫endAt方法不起作用

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • IEEE1588PTP在數字化變電站時鐘同步方面的應用

    IEEE1588ptp在數字化變電站時鐘同步方面的應用 京準電子科技官微——ahjzsz 一、電力系統時間同步基本概況 隨著對IEC 61850標準研究的不斷深入,國內外學者提出基于IEC61850通信標準體系建設數字化變電站的發展思路。數字化變電站與常規變電站的顯著區別在于程序層傳統的電流/電壓互 ......

    uj5u.com 2020-09-10 03:51:52 more
  • HTTP request smuggling CL.TE

    CL.TE 簡介 前端通過Content-Length處理請求,通過反向代理或者負載均衡將請求轉發到后端,后端Transfer-Encoding優先級較高,以TE處理請求造成安全問題。 檢測 發送如下資料包 POST / HTTP/1.1 Host: ac391f7e1e9af821806e890 ......

    uj5u.com 2020-09-10 03:52:11 more
  • 網路滲透資料大全單——漏洞庫篇

    網路滲透資料大全單——漏洞庫篇漏洞庫 NVD ——美國國家漏洞庫 →http://nvd.nist.gov/。 CERT ——美國國家應急回應中心 →https://www.us-cert.gov/ OSVDB ——開源漏洞庫 →http://osvdb.org Bugtraq ——賽門鐵克 →ht ......

    uj5u.com 2020-09-10 03:52:15 more
  • 京準講述NTP時鐘服務器應用及原理

    京準講述NTP時鐘服務器應用及原理京準講述NTP時鐘服務器應用及原理 安徽京準電子科技官微——ahjzsz 北斗授時原理 授時是指接識訓通過某種方式獲得本地時間與北斗標準時間的鐘差,然后調整本地時鐘使時差控制在一定的精度范圍內。 衛星導航系統通常由三部分組成:導航授時衛星、地面檢測校正維護系統和用戶 ......

    uj5u.com 2020-09-10 03:52:25 more
  • 利用北斗衛星系統設計NTP網路時間服務器

    利用北斗衛星系統設計NTP網路時間服務器 利用北斗衛星系統設計NTP網路時間服務器 安徽京準電子科技官微——ahjzsz 概述 NTP網路時間服務器是一款支持NTP和SNTP網路時間同步協議,高精度、大容量、高品質的高科技時鐘產品。 NTP網路時間服務器設備采用冗余架構設計,高精度時鐘直接來源于北斗 ......

    uj5u.com 2020-09-10 03:52:35 more
  • 詳細解讀電力系統各種對時方式

    詳細解讀電力系統各種對時方式 詳細解讀電力系統各種對時方式 安徽京準電子科技官微——ahjzsz,更多資料請添加VX 衛星同步時鐘是我京準公司開發研制的應用衛星授時時技術的標準時間顯示和發送的裝置,該裝置以M國全球定位系統(GLOBAL POSITIONING SYSTEM,縮寫為GPS)或者我國北 ......

    uj5u.com 2020-09-10 03:52:45 more
  • 如何保證外包團隊接入企業內網安全

    不管企業規模的大小,只要企業想省錢,那么企業的某些服務就一定會采用外包的形式,然而看似美好又經濟的策略,其實也有不好的一面。下面我通過安全的角度來聊聊使用外包團的安全隱患問題。 先看看什么服務會使用外包的,最常見的就是話務/客服這種需要大量重復性、無技術性的服務,或者是一些銷售外包、特殊的職能外包等 ......

    uj5u.com 2020-09-10 03:52:57 more
  • PHP漏洞之【整型數字型SQL注入】

    0x01 什么是SQL注入 SQL是一種注入攻擊,通過前端帶入后端資料庫進行惡意的SQL陳述句查詢。 0x02 SQL整型注入原理 SQL注入一般發生在動態網站URL地址里,當然也會發生在其它地發,如登錄框等等也會存在注入,只要是和資料庫打交道的地方都有可能存在。 如這里http://192.168. ......

    uj5u.com 2020-09-10 03:55:40 more
  • [GXYCTF2019]禁止套娃

    git泄露獲取原始碼 使用GET傳參,引數為exp 經過三層過濾執行 第一層過濾偽協議,第二層過濾帶引數的函式,第三層過濾一些函式 preg_replace('/[a-z,_]+\((?R)?\)/', NULL, $_GET['exp'] (?R)參考當前正則運算式,相當于匹配函式里的引數 因此傳遞 ......

    uj5u.com 2020-09-10 03:56:07 more
  • 等保2.0實施流程

    流程 結論 ......

    uj5u.com 2020-09-10 03:56:16 more
最新发布
  • 使用Django Rest framework搭建Blog

    在前面的Blog例子中我們使用的是GraphQL, 雖然GraphQL的使用處于上升趨勢,但是Rest API還是使用的更廣泛一些. 所以還是決定回到傳統的rest api framework上來, Django rest framework的官網上給了一個很好用的QuickStart, 我參考Qu ......

    uj5u.com 2023-04-20 08:17:54 more
  • 記錄-new Date() 我忍你很久了!

    這里給大家分享我在網上總結出來的一些知識,希望對大家有所幫助 大家平時在開發的時候有沒被new Date()折磨過?就是它的諸多怪異的設定讓你每每用的時候,都可能不小心踩坑。造成程式意外出錯,卻一下子找不到問題出處,那叫一個煩透了…… 下面,我就列舉它的“四宗罪”及應用思考 可惡的四宗罪 1. Sa ......

    uj5u.com 2023-04-20 08:17:47 more
  • 使用Vue.js實作文字跑馬燈效果

    實作文字跑馬燈效果,首先用到 substring()截取 和 setInterval計時器 clearInterval()清除計時器 效果如下: 實作代碼如下: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta ......

    uj5u.com 2023-04-20 08:12:31 more
  • JavaScript 運算子

    JavaScript 運算子/運算子 在 JavaScript 中,有一些運算子可以使代碼更簡潔、易讀和高效。以下是一些常見的運算子: 1、可選鏈運算子(optional chaining operator) ?.是可選鏈運算子(optional chaining operator)。?. 可選鏈操 ......

    uj5u.com 2023-04-20 08:02:25 more
  • CSS—相對單位rem

    一、概述 rem是一個相對長度單位,它的單位長度取決于根標簽html的字體尺寸。rem即root em的意思,中文翻譯為根em。瀏覽器的文本尺寸一般默認為16px,即默認情況下: 1rem = 16px rem布局原理:根據CSS媒體查詢功能,更改根標簽的字體尺寸,實作rem單位隨螢屏尺寸的變化,如 ......

    uj5u.com 2023-04-20 08:02:21 more
  • 我的第一個NPM包:panghu-planebattle-esm(胖虎飛機大戰)使用說明

    好家伙,我的包終于開發完啦 歡迎使用胖虎的飛機大戰包!! 為你的主頁添加色彩 這是一個有趣的網頁小游戲包,使用canvas和js開發 使用ES6模塊化開發 效果圖如下: (覺得圖片太sb的可以自己改) 代碼已開源!! Git: https://gitee.com/tang-and-han-dynas ......

    uj5u.com 2023-04-20 08:01:50 more
  • 如何在 vue3 中使用 jsx/tsx?

    我們都知道,通常情況下我們使用 vue 大多都是用的 SFC(Signle File Component)單檔案組件模式,即一個組件就是一個檔案,但其實 Vue 也是支持使用 JSX 來撰寫組件的。這里不討論 SFC 和 JSX 的好壞,這個仁者見仁智者見智。本篇文章旨在帶領大家快速了解和使用 Vu ......

    uj5u.com 2023-04-20 08:01:37 more
  • 【Vue2.x原始碼系列06】計算屬性computed原理

    本章目標:計算屬性是如何實作的?計算屬性快取原理以及洋蔥模型的應用?在初始化Vue實體時,我們會給每個計算屬性都創建一個對應watcher,我們稱之為計算屬性watcher ......

    uj5u.com 2023-04-20 08:01:31 more
  • http1.1與http2.0

    一、http是什么 通俗來講,http就是計算機通過網路進行通信的規則,是一個基于請求與回應,無狀態的,應用層協議。常用于TCP/IP協議傳輸資料。目前任何終端之間任何一種通信方式都必須按Http協議進行,否則無法連接。tcp(三次握手,四次揮手)。 請求與回應:客戶端請求、服務端回應資料。 無狀態 ......

    uj5u.com 2023-04-20 08:01:10 more
  • http1.1與http2.0

    一、http是什么 通俗來講,http就是計算機通過網路進行通信的規則,是一個基于請求與回應,無狀態的,應用層協議。常用于TCP/IP協議傳輸資料。目前任何終端之間任何一種通信方式都必須按Http協議進行,否則無法連接。tcp(三次握手,四次揮手)。 請求與回應:客戶端請求、服務端回應資料。 無狀態 ......

    uj5u.com 2023-04-20 08:00:32 more