getsentry / sentry-dart

Sentry SDK for Dart and Flutter
https://sentry.io/for/flutter/
MIT License
763 stars 239 forks source link

dyld[84707]: missing symbol called #2422

Open NicolasKim opened 2 days ago

NicolasKim commented 2 days ago

Platform

Dart

Obfuscation

Disabled

Debug Info

Disabled

Doctor

[✓] Flutter (Channel unknown, 3.0.5, on macOS 14.6.1 23G93 darwin-arm (Rosetta), locale zh-Hans-CN) • Flutter version 3.0.5 at /Users/dreamtracer/fvm/versions/3.0.5 • Upstream repository unknown • Framework revision f1875d570e (2 years, 4 months ago), 2022-07-13 11:24:16 -0700 • Engine revision e85ea0e79c • Dart version 2.17.6 • DevTools version 2.12.2 • Pub download mirror https://apppub.fuyoukache.com • Flutter download mirror https://storage.flutter-io.cn

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/dreamtracer/Library/Android/sdk • Platform android-35, build-tools 34.0.0 • Java binary at: /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java • Java version Java(TM) SE Runtime Environment 18.9 (build 11.0.23+7-LTS-222) ✗ Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.13.0

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version 2023.1) • 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 ✗ Unable to find bundled Java version. • Try updating or re-installing Android Studio.

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.4) • IntelliJ at /Applications/IntelliJ IDEA.app • 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

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

Version

8.9.0

Steps to Reproduce

  1. Use 'flutter build ios-framework' build all frameworks
  2. Make cocoapods pod

    Pod::Spec.new do |s|
    s.swift_version         = '5.0'
    s.name                  = "xxxxx"
    s.version               = '1.0'
    s.summary               = 'xxxxx'
    s.description           = 'xxxxx'
    s.homepage              = 'xxxxx'
    s.license               = { :type => 'BSD' }
    s.author                = { 'Dreamtracer' => 'http://dreamtracer.top' }
    s.ios.deployment_target = '13.0'
    s.pod_target_xcconfig = {
    'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64 x86_64',
    'OTHER_LDFLAGS' => ['$(inherited)','-ld_classic'],
    'ENABLE_BITCODE' => 'NO'
    }
    s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64 x86_64' }
    s.vendored_frameworks  = [
    "App.xcframework", 
    "Flutter/Flutter.xcframework", 
    "FlutterPluginRegistrant.xcframework",
    'sentry_flutter.xcframework',
    'all other flutter plugin xcframeworks'
    ]
    
    s.dependency 'Sentry/HybridSDK'
    .
    .
    .
    end
  3. add dependency to hostApp's Podfile
  4. When 'SentryFlutter.init' invoked in flutter then 'missing symbol called' error occured.

Expected Result

No 'missing symbol called' error

Actual Result

'dyld[84707]: missing symbol called' printed in xcode console

Image

When I delete code below, error disappear. Image

Are you willing to submit a PR?

None

buenaflor commented 2 days ago

hey any specific reason why you are manually creating the pods etc?

installing the flutter dependency should do that automatically in an existing flutter project