简体   繁体   中英

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

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] 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}

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

Hmmm, seems like your kit isn't activating.

This is the code I use to initialise Fabric:

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

inside didFinishLaunchingWithOptions delegate method.

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.

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.

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 ie make sure that you still have the old initialisation code:

// 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.

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

Here's a link to the official installation instructions

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.

I solved the problem by adding the API key to the 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>

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 :

  1. in Firebase console, click on Crashlytics link on the left panel
  2. follow the steps until it ask you to run the application

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

$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

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

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

3) Run on simulator

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

@Marc Fdn solution fixed my problem:

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

  2. Project overview > Project Settings

    项目概览 > 项目设置

  3. In the Integrations Tab, click Manage and delete the Fabric integration

    在此处输入图片说明

  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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM