sentry-dart-plugin
sentry-dart-plugin copied to clipboard
No sourcemap found
Environment
Flutter 3.29.0
pubspec:
environment: sdk: ^3.7.0
dev_dependencies: sentry_dart_plugin: ^2.4.0
sentry: upload_debug_symbols: true upload_source_maps: true upload_sources: true project: ws org: ws-96 log_level: info ignore_missing: true
Github action: jobs: release-telegram-test: runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install dependencies
run: flutter pub get
- name: Build Flutter Web
run: |
flutter build web --release --dart-define=BUILT_TYPE=releaseTelegram --source-maps
- name: Upload source maps to Sentry
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: flutter packages pub run sentry_dart_plugin
Steps to Reproduce
- Run flutter build web --release --dart-define=BUILT_TYPE=releaseTelegram --source-maps
- flutter packages pub run sentry_dart_plugin
Expected Result
No warnings and errors
Actual Result
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 0% reading config values..
Searching for pubspec.yaml or sentry.properties config...
Found config from pubspec.yaml
Downloading Sentry CLI 2.41.1 from https://downloads.sentry-cdn.com/sentry-cli/2.41.1/sentry-cli-Linux-x86_64 to .dart_tool/pub/bin/sentry_dart_plugin/sentry-cli
Sentry CLI binary checksum verification passed successfully (hash: a007369907840f26b68d0ce83037abf2b14fc68162fdef1d071885a1ace5e3cf).
Sentry CLI downloaded successfully.
☑ reading config values
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 9% validating config values..
☑ validating config values
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 18% uploading debug symbols..
☑ uploading debug symbols
INFO 2025-02-14 23:15:32.093263596 +00:00 sentry-cli was invoked with the following command line: "/home/runner/work/window_seat_client/window_seat_client/.dart_tool/pub/bin/sentry_dart_plugin/sentry-cli" "--log-level" "info" "releases" "--org" "ws-96" "--project" "ws" "new" "[email protected]+1"
Created release [email protected]+1
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 27% uploading source maps..
INFO 2025-02-14 23:15:32.494278941 +00:00 sentry-cli was invoked with the following command line: "/home/runner/work/window_seat_client/window_seat_client/.dart_tool/pub/bin/sentry_dart_plugin/sentry-cli" "--log-level" "info" "releases" "--org" "ws-96" "--project" "ws" "files" "[email protected]+1" "upload-sourcemaps" "build/web" "--ext" "map" "--ext" "js" "--dist" "1"
> Found 9 files
> Analyzing 9 sources
> Rewriting sources
> Adding source map references
> Bundled 9 files for upload
> Bundle ID: 4c80e14b-692b-54ab-a76e-c1c64ff226de
> Uploaded files to Sentry
> File upload complete (processing pending on server)
> Organization: ws-96
> Project: ws
> Release: [email protected]+1
> Dist: 1
> Upload type: artifact bundle
Source Map Upload Report
Scripts
~/canvaskit/canvaskit.js (sourcemap at ../main.dart.js.map)
~/canvaskit/chromium/canvaskit.js (sourcemap at ../../main.dart.js.map)
~/canvaskit/skwasm.js (sourcemap at ../main.dart.js.map)
~/canvaskit/skwasm_st.js (sourcemap at ../main.dart.js.map)
~/flutter.js (sourcemap at flutter.js.map)
~/flutter_bootstrap.js (sourcemap at flutter.js.map)
~/flutter_service_worker.js (sourcemap at main.dart.js.map)
~/main.dart.js (sourcemap at main.dart.js.map)
Source Maps
~/main.dart.js.map
INFO 2025-02-14 23:15:36.59[13](https://github.com/otopba/window_seat_client/actions/runs/13339079482/job/37260377712#step:6:14)28638 +00:00 sentry-cli was invoked with the following command line: "/home/runner/work/window_seat_client/window_seat_client/.dart_tool/pub/bin/sentry_dart_plugin/sentry-cli" "--log-level" "info" "releases" "--org" "ws-96" "--project" "ws" "files" "[email protected]+1" "upload-sourcemaps" "lib" "--ext" "dart" "--dist" "1"
> Found [20](https://github.com/otopba/window_seat_client/actions/runs/13339079482/job/37260377712#step:6:21)0 files
> Analyzing 200 sources
> Rewriting sources
> Adding source map references
> Bundled 200 files for upload
> Bundle ID: 91a33889-7fef-5151-b3b4-6f6b07afcfe4
> Nothing to upload, all files are on the server
> File processing complete
> Organization: ws-96
> Project: ws
> Release: [email protected]+1
> Dist: 1
> Upload type: artifact bundle
Source Map Upload Report
Scripts
~/add_flight/add_flight_page.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/add_flight/add_flight_page.dart)
~/add_flight/add_flight_page_cubit.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/add_flight/add_flight_page_cubit.dart)
~/add_flight/add_flight_page_cubit_state.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/add_flight/add_flight_page_cubit_state.dart)
~/add_flight/add_flight_page_cubit_state.g.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/add_flight/add_flight_page_cubit_state.g.dart)
~/add_flight/airport_sliver_list.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/add_flight/airport_sliver_list.dart)
~/add_flight/flight_sliver_list.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/add_flight/flight_sliver_list.dart)
~/app/app.dart (no sourcemap found)
...
hey, could you try out the plugin version 2.1.0? We have found an issue with source map uploads starting from plugin version 2.2.0
Looks like issue still exists
@fryette can you try the latest version 2 4.1, we released a fix that might solve this for you
@buenaflor Unfortunately same issue in 2.4.1
just to be sure, are your stacktraces still minified?
I'm sorry, probably I mislead you a bit.
My issue was that tool do not upload all sources to the Sentry, obfuscated or not obfuscated(it's iOS and Android related).
I found that issue where you suggested to downgrade to 2.1.0. Once I did it
- All sources finally uploaded to Sentry(self hosted in my case)
- All Sentry issues unobfuscated and looks as it should be
For versions higher than 2.1.0 I have an issue that
- Source code not fully uploaded(actually just few files from 2K+ in compare with 2.1.0 upload logs)
- Stacktraces not fully shown
@fryette Hey! We recently released 2.4.1, which should address issues with source context.
@denrase Same problem with 2.4.1
Run flutter packages pub run sentry_dart_plugin
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 0% reading config values..
Searching for pubspec.yaml or sentry.properties config...
Found config from pubspec.yaml
Downloading Sentry CLI 2.41.1 from https://downloads.sentry-cdn.com/sentry-cli/2.41.1/sentry-cli-Linux-x[8](https://github.com/otopba/window_seat_client/actions/runs/13520009705/job/37776979360#step:6:9)6_64 to .dart_tool/pub/bin/sentry_dart_plugin/sentry-cli
Sentry CLI binary checksum verification passed successfully (hash: a00736[9](https://github.com/otopba/window_seat_client/actions/runs/13520009705/job/37776979360#step:6:10)907840f26b68d0ce83037abf2b14fc68162fdef1d071885a1ace5e3cf).
Sentry CLI downloaded successfully.
☑ reading config values
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 9% validating config values..
☑ validating config values
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 18% uploading debug symbols..
☑ uploading debug symbols
INFO 2025-02-25 [11](https://github.com/otopba/window_seat_client/actions/runs/13520009705/job/37776979360#step:6:12):21:50.325776434 +00:00 sentry-cli was invoked with the following command line: "/home/runner/work/window_seat_client/window_seat_client/.dart_tool/pub/bin/sentry_dart_plugin/sentry-cli" "--log-level" "info" "releases" "--org" "ws-96" "--project" "ws" "new" "[email protected]+2"
Created release [email protected]+2
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 27% uploading source maps..
INFO 2025-02-25 11:21:50.736402984 +00:00 sentry-cli was invoked with the following command line: "/home/runner/work/window_seat_client/window_seat_client/.dart_tool/pub/bin/sentry_dart_plugin/sentry-cli" "--log-level" "info" "releases" "--org" "ws-96" "--project" "ws" "files" "[email protected]+2" "upload-sourcemaps" "build/web" "--ext" "map" "--ext" "js" "--dist" "2"
> Found 9 files
> Analyzing 9 sources
> Rewriting sources
> Adding source map references
> Bundled 9 files for upload
> Bundle ID: e0ad9938-e0a6-51ba-b2cc-6028f657b169
> Uploaded files to Sentry
> File upload complete (processing pending on server)
> Organization: ws-96
> Project: ws
> Release: [email protected]+2
> Dist: 2
> Upload type: artifact bundle
Source Map Upload Report
Scripts
~/canvaskit/canvaskit.js (sourcemap at ../main.dart.js.map)
~/canvaskit/chromium/canvaskit.js (sourcemap at ../../main.dart.js.map)
~/canvaskit/skwasm.js (sourcemap at ../main.dart.js.map)
~/canvaskit/skwasm_st.js (sourcemap at ../main.dart.js.map)
~/flutter.js (sourcemap at flutter.js.map)
~/flutter_bootstrap.js (sourcemap at flutter.js.map)
~/flutter_service_worker.js (sourcemap at main.dart.js.map)
~/main.dart.js (sourcemap at main.dart.js.map)
Source Maps
~/main.dart.js.map
INFO 2025-02-25 11:21:54.5975548[14](https://github.com/otopba/window_seat_client/actions/runs/13520009705/job/37776979360#step:6:15) +00:00 sentry-cli was invoked with the following command line: "/home/runner/work/window_seat_client/window_seat_client/.dart_tool/pub/bin/sentry_dart_plugin/sentry-cli" "--log-level" "info" "releases" "--org" "ws-96" "--project" "ws" "files" "[email protected]+2" "upload-sourcemaps" "lib" "--ext" "dart" "--dist" "2" "--url-prefix" "~/lib/"
> Found 200 files
> Analyzing 200 sources
> Rewriting sources
> Adding source map references
> Bundled 200 files for upload
> Bundle ID: ba93daf7-2f4f-5[18](https://github.com/otopba/window_seat_client/actions/runs/13520009705/job/37776979360#step:6:19)e-8db8-443725687fdf
> Uploaded files to Sentry
> File upload complete (processing pending on server)
> Organization: ws-96
> Project: ws
> Release: [email protected]+2
> Dist: 2
> Upload type: artifact bundle
Source Map Upload Report
Scripts
~/lib/add_flight/add_flight_page.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/lib/add_flight/add_flight_page.dart)
~/lib/add_flight/add_flight_page_cubit.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/lib/add_flight/add_flight_page_cubit.dart)
~/lib/add_flight/add_flight_page_cubit_state.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/lib/add_flight/add_flight_page_cubit_state.dart)
@otopba Could you check if everything works as expected on sentry.io? So is source context present in your issues where enabled with 2.4.1? I got the same warnings when running the plugin, but did have correct source context, so my suspicion is that these warnings are false negatives.
@denrase Hmm, interesting. Yes, at Sentry.io, everything is OK; I can see mappings and stack traces.
Ok, then we need to figure out why we report this warning when everything is on order. Thx for checking.
might be related https://github.com/getsentry/sentry-dart-plugin/issues/203
We are also experiencing this issue. We're on 2.4.1, still getting could not determine a source map reference warnings for every file, and stack traces and issue titles are all still minified.
@alexobviously hi do you have more info? how does your release/dist setup look like. it's important that the plugin uses the same release as the event you send so we can associate the sourcemap with the release/dist
I can confirm that it's still dont work with latest version.
Also confirmed here.
To reproduce:
- create a new Flutter Web project
- add sentry_dart_plugin: 2.4.1 to dev_dependencies
- add to pubspec.yaml:
sentry:
upload_debug_symbols: true
upload_source_maps: true
upload_sources: true
ignore_missing: true
project: test
org: ...
auth_token: ...
wait_for_processing: true
log_level: error
commits: auto
- build with
flutter build web --release --source-maps - get the error:
Source Map Upload Report
Scripts
~/lib/main.dart (no sourcemap found)
- warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/lib/main.dart)
So frustrating :(
Also happens when run manually:
.dart_tool/pub/bin/sentry_dart_plugin/sentry-cli --url ... --auth-token ... --log-level error releases --org fieldbots --project app files [email protected]+1 upload-sourcemaps lib --ext dart --dist 1 --url-prefix ~/lib/ --wait
Forgot to add: Issues are still obfuscated. Using non-self hosted sentry.
The warnings can be safely ignored which I suspect are just false positives, what's important is that the source maps are uploaded.
@jonasbark how does your Sentry init look like?
I just tried it out locally on a new project which works
Thanks, I had another look and it works now after adjusting options.release = '1.0.0+3' to options.release = '[email protected]+3'
Sorry for the wrong alarm
Generally release and dist has to match with the release created by the plugin.
Soon we will implement associating source maps with debug ids which will completely make the release/dist association obsolete and is more robust https://github.com/getsentry/sentry-dart-plugin/issues/314
FWIW, the same exact procedure does not work on our self-hosted sentry instance. I updated it the sentry instance to 25.4.0.
Hosted:
Self-Hosted:
Keeping my hopes up with the debug IDs.
@jonasbark can you confirm that the sourcemaps were uploaded to the self hosted instance? they should be under your project > settings > source maps
Yes, they are, and it looks identical as well.
Hosted:
Self-Hosted:
All I did was adjusting the auth_token, url and project in pubspec.yaml and the dsn accordingly in the SentryFlutter.init part
It correctly identified to which release it was associated with at least. I suppose your events also contain the correct release?
Is your symbolication working for other platforms?
Yes, I hardcoded the release and dist parameters just to be sure. Also yes, symbolication generally works on e.g. iOS.
Hi @buenaflor,
I am getting the same issue on Web with lack of recognition of the source maps:
With Sentry_dart_plugin 2.4.1 I was getting the 'could not determine a sourcemap reference' errors like the above screenshots. These disappeared when I downgraded to 2.1.0
I still get this error:
I can see the sourcemaps were uploaded, what can I do to try and narrow down the issue (it used to work).
@zambetpentru can you share how you set releases in the SentryFlutter SDK as well as your dart plugin config
as a general update, I'm working on the dart plugin v3 which includes debug id support which makes symbolication of web stacktraces much more reliable than the current implementation
Hi,
in pubspec.yaml
name: project_name
version: 1.0.0+1
sentry: upload_debug_symbols: true upload_source_maps: true upload_sources: true project: aNameThatIsNotTheFlutterProjectNameAbove org: x auth_token: x
command: dart run sentry_dart_plugin
Is there any other information you need? Flutter 3.27.4 (last version that supports the HTML Renderer)
do you set the release in SentryFlutter.init as well?
hey we've recently released Sentry Flutter 9.1.0 and the Sentry Dart Plugin 3.0.0 which enhances the symbolication process, can you try it out and see if it improves it