Skip to content

[camera] Crash on launch on iOS: Symbol not found: _OBJC_CLASS_$_NSError #135195

@zanohikaru7

Description

@zanohikaru7

Is there an existing issue for this?

Steps to reproduce

My XCode updated to the latest version for iOS 17 SDK, and then suddenly my app crashed upon opening

This app/library was working before the update of XCode and iOS 17 here are the error logs:

Launching lib/main_staging.dart on Psalm’s iPhone in debug mode...
main_staging.dart:1
Automatically signing iOS for device deployment using specified development team in Xcode project: U5CD6V7ZFZ
Upgrading Pods-Runner.profile.xcconfig
Upgrading Pods-Runner.debug.xcconfig
Xcode build done.                                           19.3s
(lldb) dyld[871]: Symbol not found: _OBJC_CLASS_$_NSError
  Referenced from: <5FAED927-C1FA-31BF-A4D3-B57AC2CE16B2> /private/var/containers/Bundle/Application/7E5E166F-A777-4BEE-B2C8-6032A33F0D4E/Runner.app/Runner
  Expected in:     <AAB63F35-5584-3755-89EC-E23FA0040514> /private/var/containers/Bundle/Application/7E5E166F-A777-4BEE-B2C8-6032A33F0D4E/Runner.app/Frameworks/camera_avfoundation.framework/camera_avfoundation
* thread #1, stop reason = signal SIGABRT
    frame #0: 0x00000001da393fcc dyld`__abort_with_payload + 8
dyld`:
->  0x1da393fcc <+8>:  b.lo   0x1da393fec               ; <+40>
    0x1da393fd0 <+12>: pacibsp
    0x1da393fd4 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1da393fd8 <+20>: mov    x29, sp
Target 0: (Runner) stopped.
Error launching application on Psalm’s iPhone.
Exited

Expected results

Expecting to work after the updates from XCode

Actual results

The App is crashing and referring to the camera_avfoundation library which is used as a dependency in this library

Code sample

Code sample
availableCameras().then((cameras) {
      _cameraController = CameraController(cameras.first, ResolutionPreset.max);

      _cameraController.initialize().then((_) {
        if (!mounted) {
          return;
        }

        setState(() {
          _isInitialized = true;
        });
      });
    }).catchError((Object e) {
      if (e is CameraException) {
        switch (e.code) {
          case 'CameraAccessDenied':
            // Handle access errors here.
            break;
          default:
            // Handle other errors here.
            break;
        }
      }
    });

Screenshots or Video

Screenshots / Video demonstration

image

Logs

Logs
Launching lib/main_staging.dart on Psalm’s iPhone in debug mode...
main_staging.dart:1
Automatically signing iOS for device deployment using specified development team in Xcode project: U5CD6V7ZFZ
Upgrading Pods-Runner.release.xcconfig
Upgrading Pods-Runner.profile.xcconfig
Upgrading Pods-Runner.debug.xcconfig
Xcode build done.                                           19.3s
(lldb) dyld[871]: Symbol not found: _OBJC_CLASS_$_NSError
  Referenced from: <5FAED927-C1FA-31BF-A4D3-B57AC2CE16B2> /private/var/containers/Bundle/Application/7E5E166F-A777-4BEE-B2C8-6032A33F0D4E/Runner.app/Runner
  Expected in:     <AAB63F35-5584-3755-89EC-E23FA0040514> /private/var/containers/Bundle/Application/7E5E166F-A777-4BEE-B2C8-6032A33F0D4E/Runner.app/Frameworks/camera_avfoundation.framework/camera_avfoundation
* thread #1, stop reason = signal SIGABRT
    frame #0: 0x00000001da393fcc dyld`__abort_with_payload + 8
dyld`:
->  0x1da393fcc <+8>:  b.lo   0x1da393fec               ; <+40>
    0x1da393fd0 <+12>: pacibsp
    0x1da393fd4 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1da393fd8 <+20>: mov    x29, sp
Target 0: (Runner) stopped.
Error launching application on Psalm’s iPhone.
Exited

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.13.4, on macOS 13.5.2 22G91 darwin-arm64, locale en-PH)
    • Flutter version 3.13.4 on channel stable at /Users/psalmlimpin/Documents/Projects/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 367f9ea16b (8 days ago), 2023-09-12 23:27:53 -0500
    • Engine revision 9064459a8b
    • Dart version 3.1.2
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/psalmlimpin/Library/Android/sdk
    • Platform android-33, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.12.1

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] VS Code (version 1.82.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] Connected device (2 available)
    • Psalm’s iPhone (mobile) • 00008120-000C24A62107C01E • ios          • iOS 16.6.1 20G81
    • macOS (desktop)         • macos                     • darwin-arm64 • macOS 13.5.2 22G91 darwin-arm64

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listfound in release: 3.13Found to occur in 3.13found in release: 3.15Found to occur in 3.15fyi-ecosystemFor the attention of Ecosystem teamhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions