xcode Fabric 无法下载设置 Error Domain=FABNetworkError Code=-5

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/50269731/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:38:44  来源:igfitidea点击:

Fabric failed to download settings Error Domain=FABNetworkError Code=-5

iosxcodecrashlyticsgoogle-fabric

提问by Student

I am trying to install Fabric into my iOS app but when I am on the last stage of verifying that everything works, I get this error inside xcode console:

我正在尝试将 Fabric 安装到我的 iOS 应用程序中,但是当我处于验证一切正常的最后阶段时,我在 xcode 控制台中收到此错误:

[Fabric] failed to download settings Error Domain=FABNetworkError Code=-5 "(null)" UserInfo={status_code=403, type=2, request_id=d123378449cf900e4574e283ae438bc5, content_type=application/json; charset=utf-8}

[Fabric] 无法下载设置 Error Domain=FABNetworkError Code=-5 "(null)" UserInfo={status_code=403, type=2, request_id=d123378449cf900e4574e283ae438bc5, content_type=application/json; 字符集=utf-8}

The Fabric application which helps me install Fabric displays the error:

帮助我安装 Fabric 的 Fabric 应用程序显示错误:

Hmmm, seems like your kit isn't activating.

嗯,好像你的工具包没有激活。

This is the code I use to initialise Fabric:

这是我用来初始化 Fabric 的代码:

[Fabric with:@[[Crashlytics class]]];

inside didFinishLaunchingWithOptionsdelegate method.

didFinishLaunchingWithOptions委托方法中。

Some suggested that there is no internet connection when you have this problem, but I am sure that my pc and device are connected to the internet.

有人建议您遇到此问题时没有互联网连接,但我确信我的电脑和设备已连接到互联网。

I really don't know what to do, any help will be appreciated.

我真的不知道该怎么做,任何帮助将不胜感激。

采纳答案by Student

I found what was wrong. I tried to use the old interface for the crash reports long ago and I have forgotten the script I have placed in Target/Build Phases. When I removed it, everything was fine.

我发现出了什么问题。很久以前,我尝试使用旧界面进行崩溃报告,但我忘记了放置在目标/构建阶段中的脚本。当我删除它时,一切都很好。

回答by Stefan S

I ran into this problem when I migrated Fabric Crashlytics to Firebase Crashlytics. If you are migrating you need to make sure that you keep the old initialisation logic i.e. make sure that you still have the old initialisation code:

当我将 Fabric Crashlytics 迁移到 Firebase Crashlytics 时,我遇到了这个问题。如果您正在迁移,您需要确保保留旧的初始化逻辑,即确保您仍然拥有旧的初始化代码:

// Objective-C
[FIRApp configure];
[Fabric with:@[CrashlyticsKit]]; // I had removed the this line

// Swift 4
FirebaseApp.configure()
Fabric.with([Crashlytics.self])

You also need to make sure to retain API Key and Build secret in the run script and keep the API Key in your Info.plist.

您还需要确保在运行脚本中保留 API Key 和 Build secret,并将 API Key 保留在您的 Info.plist 中。

I had mistakenly removed these things after following the Firebase (non-migration) installation instructions.

在遵循 Firebase(非迁移)安装说明之后,我错误地删除了这些东西。

Here's a link to the official installation instructions

这是官方安装说明的链接

回答by Marc Fdn

I had my Crashliticy linked to Fabric. That deactivates crashlytics. Under the Firebase project settings I unlinked crashlytics from fabric. Then logout/login again. Then Crashlytics started with the installation process.

我的 Crashliticy 与 Fabric 相关联。这会停用 crashlytics。在 Firebase 项目设置下,我从结构中取消了 crashlytics 的链接。然后再次注销/登录。然后 Crashlytics 从安装过程开始。

回答by Vladyslav Panchenko

I solved the problem by adding the API key to the Info.plist . enter image description here

我通过将 API 密钥添加到 Info.plist 解决了这个问题。 在此处输入图片说明

 <key>Fabric</key>
  <dict>
    <key>APIKey</key>
    <string>your_api_key</string>
    <key>Kits</key>
    <array>
      <dict>
        <key>KitInfo</key>
        <dict/>
        <key>KitName</key>
        <string>Crashlytics</string>
      </dict>
    </array>
  </dict>

回答by George

If you have this issue when using Firebase it's because Crashlytics won't be activated until you follow the configuration process in Firebase console :

如果您在使用 Firebase 时遇到此问题,那是因为在您遵循 Firebase 控制台中的配置过程之前,不会激活 Crashlytics:

  1. in Firebase console, click on Crashlytics link on the left panel
  2. follow the steps until it ask you to run the application
  1. 在 Firebase 控制台中,单击左侧面板上的 Crashlytics 链接
  2. 按照步骤操作,直到它要求您运行应用程序

回答by Paul Gee

With XCode 10 under the RunScript section you have to add the following line to Input Files:

使用 RunScript 部分下的 XCode 10,您必须将以下行添加到输入文件:

$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

回答by Vlad Pulichev

I know, that it is something strange, but for me solution was to run on simulator.

我知道,这很奇怪,但对我来说,解决方案是在模拟器上运行

All suggest above not worked for me.

以上所有建议都不适合我。

1) Start initializing app in Console -> Crashlytics

1) 在 Console -> Crashlytics 中开始初始化应用程序

2) Do all necessary things (run script phase etc)

2)做所有必要的事情(运行脚本阶段等)

3) Run on simulator

3) 在模拟器上运行

After installation is completed, I can see all my test crashes in console from device.

安装完成后,我可以在设备的控制台中看到我所有的测试崩溃。

回答by Kappe

@Marc Fdn solution fixed my problem:

@Marc Fdn 解决方案解决了我的问题:

  1. Open https://console.firebase.google.com/

  2. Project overview > Project Settings

    Project overview >Project Settings

  3. In the IntegrationsTab, click Manageand delete the Fabric integration

    enter image description here

  4. Go back to the Firebase/Crashlitics page and re-add your app, the webpage may show several loading errors, probably Firebase needs a bit of time for update the data, don't worry, wait a bit and continue to refresh.

  1. 打开https://console.firebase.google.com/

  2. 项目概览 > 项目设置

    项目概览 >项目设置

  3. Integrations选项卡中,单击Manage并删除 Fabric 集成

    在此处输入图片说明

  4. 回到 Firebase/Crashlitics 页面重新添加你的应用,网页可能会显示几个加载错误,可能 Firebase 需要一些时间来更新数据,别着急,稍等一下,继续刷新。

回答by user5269602

Do you have any ad blocking software setup on your network? cause that's what caused this error for me.

您的网络上是否有任何广告拦截软件设置?因为这就是导致我出现此错误的原因。