小编Har*_*Kal的帖子

firebase deploy --only hosting给出错误:HTTP错误:410,未知错误

这是我的日志:

 [info] === Deploying to 'test-123'...
    [info] 
    [info] i  deploying hosting
    [info] i  hosting: preparing public directory for upload...
    [debug] [2018-10-25T15:39:54.587Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/test-123/uploads/-LPfsRseOoTTgVVj-keR?fileCount=81&message=  

     Thu Oct 25 2018 21:09:54 GMT+0530 (India Standard Time)
    [debug] [2018-10-25T15:40:00.337Z] <<< HTTP RESPONSE 410
    [debug] [2018-10-25T15:40:00.337Z] <<< HTTP RESPONSE BODY undefined
    [debug] [2018-10-25T15:40:00.339Z] TypeError: Cannot read property 'error' of undefined
        at module.exports (C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:10:13)
        at Request._callback (C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\lib\api.js:47:25)
        at Request.self.callback (C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:186:22)
        at emitTwo (events.js:126:13)
        at Request.emit (events.js:214:7)
        at Request.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:1163:10)
        at emitOne (events.js:116:13)
        at Request.emit …
Run Code Online (Sandbox Code Playgroud)

node.js firebase

22
推荐指数
2
解决办法
4060
查看次数

找不到函数错误:名称:[get]。在Firestore安全规则模拟中

match /UserProfile {
    match /{uId}{
    allow get: if isUserLoggedIn() && !isUserBlocked(uId);
  }
Run Code Online (Sandbox Code Playgroud)

当我尝试使用上述安全规则从UserProfile / {uId}获取数据时,在Firestore和代码中抛出以下错误,提示权限不足:

Error running simulation — Error: simulator.rules line [199], column [28]. Function not found error: Name: [get].
Run Code Online (Sandbox Code Playgroud)

现在上面两个函数的定义在这里

function isUserLoggedIn(){
    return request.auth != null;
}

function isUserBlocked(uId){
    return (('blocked' in get(/databases/$(database)/documents/UserSettings/$(uId)).data) && (request.auth.uid in get(/databases/$(database)/documents/UserSettings/$(uId)).data.blocked));
}
Run Code Online (Sandbox Code Playgroud)

第一个功能运行得很好,但是第二个功能却不能

它抛出该错误

据我所知,功能还不错

请帮助我在这个问题上浪费了很多时间

我尝试过的

  1. 我在其中一个线程中读到这是一个暂时性问题,但事实并非如此。现在已经超过48小时
  2. 在某处还提到这仅是模拟器中的错误,但是代码可以平稳运行,即使不是这种情况。在代码中,错误是我所期望的权限不足
  3. 我已经正确阅读了文档,所以我的代码可以在其他规则中测试get方法,并且可以正常工作

多数民众赞成在请帮助

firebase google-cloud-firestore firebase-security-rules

6
推荐指数
1
解决办法
716
查看次数

Firebase cli 抛出错误:服务器错误。在每个命令上连接 ETIMEDOUT

我在堆栈溢出上检查了这个问题的所有答案。但所有这些都是由于其他原因而发生的。

好吧,我试图部署一些数据库规则并开始收到此错误。后来,当我尝试做任何事情时,我意识到所有 firebase 命令都不起作用,并且一次又一次地抛出相同的错误。

我尝试了什么:将 firebase 工具更新到最新版本重置我的互联网连接 firebase 登录 --reauth

但没有运气。

这是日志

[debug] [2018-12-25T05:41:52.644Z] ----------------------------------------------------------------------
[debug] [2018-12-25T05:41:52.648Z] Command:       C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js list
[debug] [2018-12-25T05:41:52.649Z] CLI Version:   6.2.2
[debug] [2018-12-25T05:41:52.649Z] Platform:      win32
[debug] [2018-12-25T05:41:52.649Z] Node Version:  v8.12.0
[debug] [2018-12-25T05:41:52.650Z] Time:          Tue Dec 25 2018 11:11:52 GMT+0530 (India Standard Time)
[debug] [2018-12-25T05:41:52.650Z] ----------------------------------------------------------------------
[debug] 
[debug] [2018-12-25T05:41:52.673Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2018-12-25T05:41:52.674Z] > authorizing via signed-in user
[debug] [2018-12-25T05:41:52.677Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2018-12-25T05:41:52.678Z] >>> HTTP REQUEST …
Run Code Online (Sandbox Code Playgroud)

firebase firebase-cli

5
推荐指数
1
解决办法
2080
查看次数

android 发布应用程序包构建缺少本机 lib .so 文件

案件

我有一个应用程序

当我在调试模式下使用它时,一切正常!

但是当我尝试构建用于发布的 apk 包并尝试通过 Play 商店安装应用程序时,缺少 .so 文件,我对 apk 进行了逆向工程,但找不到单个 .so 文件或任何 lib 文件夹

但是当我使用播放控制台和 android studio 分析包时,它包含所有带有相应 .so 文件的 abi 文件夹

这是我的应用程序 gradle 文件

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.test"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 38
        versionName "3.0.8"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        // Enabling multidex support.
        multiDexEnabled true
        //render script
        renderscriptTargetApi 28
        renderscriptSupportModeEnabled true
        externalNativeBuild {
            cmake {
                cppFlags "-frtti -fexceptions"
                arguments "-DANDROID_STL=c++_shared"
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled …
Run Code Online (Sandbox Code Playgroud)

android android-ndk android-studio android-gradle-plugin android-bundle

5
推荐指数
2
解决办法
3380
查看次数