fastfetch-cli / fastfetch

An actively maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
10.05k stars 399 forks source link

[BUG] Camera Detection on macOS throws deprecation warning #822

Closed Mick235711 closed 5 months ago

Mick235711 commented 5 months ago

General description of bug:

When executing fastfetch -c all.jsonc to test out all modules on macOS arm64, just before the Camera line the following warning is shown:

2024-04-30 16:38:41.141 fastfetch[34398:5572563] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceT.

However, the camera detection itself works fine.

Often helpful information:

macOS arm64 14.3.1 M2 Pro MacBook Pro 16 Running zsh 5.9, executed under normal session (not during shell startup)

Screenshot:

CleanShot 2024-04-30 at 16 45 15@2x

The content of the configuration file you use (if any):

{
    "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
    "modules": [
        "title",
        "separator",
        "os",
        "host",
        "bios",
        "board",
        "chassis",
        "kernel",
        "uptime",
        "processes",
        "packages",
        "shell",
        "display",
        "brightness",
        "monitor",
        "lm",
        "de",
        "wm",
        "wmtheme",
        "theme",
        "icons",
        "font",
        "cursor",
        "wallpaper",
        "terminal",
        "terminalfont",
        "terminalsize",
        "terminaltheme",
        "cpu",
        "cpuusage",
        "gpu",
        "memory",
        "swap",
        "disk",
        "battery",
        "poweradapter",
        "player",
        "media",
        "publicip",
        "localip",
        "wifi",
        "datetime",
        "locale",
        "vulkan",
        "opengl",
        "opencl",
        "users",
        "bluetooth",
        "sound",
        "camera",
        "gamepad",
        //"weather",  // hangs on my network
        "netio",
        "diskio",
        "physicaldisk",
        "version",
        "break",
        "colors"
    ]
}

Output of fastfetch -c ci.jsonc --format json:

2024-04-30 16:46:00.939 fastfetch[35239:5582489] WARNING: AVCaptureDeviceTypeExternal is deprecated for Continuity Cameras. Please use AVCaptureDeviceTypeContinuityCamera and add NSCameraUseContinuityCameraDeviceType to your Info.plist.
[
  // ...
  {
    "type": "Sound",
    "result": [
      {
        "active": true,
        "main": false,
        "volume": null,
        "name": "MacBook Pro Speakers",
        "identifier": "75"
      },
      {
        "active": true,
        "main": true,
        "volume": 27,
        "name": "mick-airpods",
        "identifier": "107"
      }
    ],
    "stat": 65
  },
  {
    "type": "Camera",
    "result": [
      {
        "name": "FaceTime HD Camera",
        "vendor": "Apple Inc.",
        "colorSpace": "sRGB",
        "id": "3F45E80A-0176-46F7-B185-BB9E2C0E82E3",
        "width": 1920,
        "height": 1080
      }
    ],
    "stat": 92
  },
  {
    "type": "Gamepad",
    "error": "No devices detected",
    "stat": 1
  },
  {
    "type": "Weather",
    "error": "Invalid response",
    "stat": 1001
  },
  {
    "type": "NetIO",
    "result": [
      {
        "name": "en0",
        "defaultRoute": true,
        "txBytes": 1024,
        "rxBytes": 1024,
        "txPackets": 14,
        "rxPackets": 10,
        "rxErrors": 0,
        "txErrors": 0,
        "rxDrops": 0,
        "txDrops": 0
      }
    ],
    "stat": 0
  },
  {
    "type": "DiskIO",
    "result": [
      {
        "name": "APPLE SSD AP1024Z Media",
        "devPath": "/dev/disk0",
        "bytesRead": 2019328,
        "bytesWritten": 7454720,
        "readCount": 420,
        "writeCount": 452
      }
    ],
    "stat": 1
  },
  {
    "type": "PhysicalDisk",
    "result": [
      {
        "name": "APPLE SSD AP1024Z Media",
        "devPath": "/dev/disk0",
        "interconnect": "Apple Fabric",
        "kind": "SSD",
        "size": 1000555581440,
        "serial": "0ba01e4420d84831",
        "removable": false,
        "readOnly": false,
        "revision": "359.60.3",
        "temperature": null
      }
    ],
    "stat": 1
  },
  {
    "type": "Version",
    "result": {
      "projectName": "fastfetch",
      "architecture": "aarch64",
      "version": "2.10.2",
      "versionTweak": "",
      "cmakeBuiltType": "Release",
      "compileTime": "Apr 23 2024, 05:46:23",
      "compiler": "Apple clang 15.0.0 (15000309)",
      "debugMode": false,
      "libc": "libSystem 1345.100.2"
    },
    "stat": 0
  },
  {
    "type": "Break",
    "error": "Unsupported for JSON format",
    "stat": 0
  },
  {
    "type": "Colors",
    "error": "Unsupported for JSON format",
    "stat": 0
  }
]

Output of fastfetch --list-features:

threads
vulkan
imagemagick7
chafa
zlib
sqlite3
CarterLi commented 5 months ago

Should be fixed in dev branch