getsentry / sentry-dart-plugin

A Dart Build Plugin that uploads debug symbols for Android, iOS/macOS and source maps for Web to Sentry via sentry-cli
MIT License
68 stars 28 forks source link

Tool crashes with PrivateHeaders: No such file or directory #229

Closed KonstantinRr closed 6 months ago

KonstantinRr commented 7 months ago

Environment

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-arm64, locale en-GB)
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.3.3/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /opt/flutter. Consider
      adding /opt/flutter/bin to the front of your path.
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.83.1)
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 1 category.

Plugin version and config:

dev_dependencies:
  sentry_dart_plugin: ^2.0.0

sentry:
  upload_debug_symbols: true
  upload_source_maps: true
  upload_sources: true
  project: ...
  org: ...
  auth_token: ...
  url: https://sentry.io
  wait_for_processing: false
  log_level: debug
  commits: auto
  release: ...
  ignore_missing: true

Steps to Reproduce

Run:

flutter packages pub run sentry_dart_plugin --log-level=debug

The issue only arised after adding MacOS as platform. It seems that it might be related to the gRPC-Core framework (or that is just the first package that throws this error). The codebase is rather big and private so i can’t share all the details here.

Expected Result

It shouldn’t crash and upload the source maps.

Actual Result

The tool crashes with the error logs attached:

error: /Users/.../build/macos/Build/Products/Release/gRPC-Core/grpc.framework/PrivateHeaders/PrivateHeaders: IO error for operation on /Users/.../build/macos/Build/Products/Release/gRPC-Core/grpc.framework/PrivateHeaders/PrivateHeaders: No such file or directory (os error 2)

error.log

buenaflor commented 7 months ago

hi, is this also happening on 1.7.1?

KonstantinRr commented 7 months ago

Yep, same issue on 1.7.1. I also tested on 1.0.0 earlier and it had the issue as well.

buenaflor commented 7 months ago

Thanks for the report, we'll take a look

KonstantinRr commented 6 months ago

Hey! Any news on this? It causes every source upload to crash and avoids us from having any sentry logs since the obfuscation maps are missing. Is there maybe a way to circumvent this for now?

buenaflor commented 6 months ago

Hey, afaik @denrase couldn't reproduce it

Can you provide further steps or maybe a simple repo to reproduce it?

KonstantinRr commented 6 months ago

Okay I’ll try to reproduce it in a simple repo

KonstantinRr commented 6 months ago

I just upgraded to the newest Flutter version (3.22.0) and also upgraded to XCode 15.4 (previously 15.3) and it seems the error disappeared (tried with sentry_dart_plugin 2.0.0). I haven’t changed anything else. Happy to close this issue then!