Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide misleading source context errors from Dart/Flutter SDK for Flutter Web #1764

Closed
buenaflor opened this issue Nov 28, 2023 · 14 comments · Fixed by getsentry/sentry#62998
Closed

Comments

@buenaflor
Copy link
Contributor

buenaflor commented Nov 28, 2023

Description

source context is automatically enabled on Flutter web when using the sentry_dart_plugin.

When correctly using the plugin it will upload sourcemaps and sources which leads to the source code of the own app displayed inbetween minified third party package code.

image

However, the issue will still show misleading missing_source_context errors which are irrelevant because they refer to sources not from inApp but the flutter/dart sdk.

image

@buenaflor
Copy link
Contributor Author

@lforst do you have a suggestion on how to approach this - do we just conditionally hide it if they're not relevant? Also feel free to tag someone else who knows better

@lforst
Copy link
Member

lforst commented Dec 11, 2023

@loewenheim I feel like symbolicator should not be emitting the error here. Looks like everything got mapped correctly. I'd assume flutter web uses inline-source maps.

@buenaflor
Copy link
Contributor Author

@lforst release builds generate a sourcemap that we also upload

example:

Image

@lforst
Copy link
Member

lforst commented Dec 27, 2023

Just saw that the source maps references always point to main.dart.js.map. Generally speaking all js files need to have their own .map files. This looks off.

@buenaflor
Copy link
Contributor Author

Hm, this is the only sourcemap generated by flutter, what do you think about disabling the error messages manually for now until we can investigate this more? It's pretty bad for the ux currently

@lforst
Copy link
Member

lforst commented Jan 2, 2024

If the error messages are not actionable, not informative or even wrong we should hide them for sure!

@buenaflor buenaflor self-assigned this Jan 2, 2024
@buenaflor buenaflor changed the title Remove misleading source context errors from third party packages for Flutter Web Hide misleading source context errors from third party packages for Flutter Web Jan 11, 2024
@buenaflor buenaflor changed the title Hide misleading source context errors from third party packages for Flutter Web Hide misleading source context errors from Dart/Flutter SDK for Flutter Web Jan 11, 2024
@buenaflor buenaflor reopened this Jan 15, 2024
@buenaflor
Copy link
Contributor Author

Closing - this issue is now fixed, these errors do not appear anymore

@momrak
Copy link

momrak commented Mar 7, 2024

I am getting these in my Flutter web app. Should this issue be reopened, or is it caused by something else?
CleanShot 2024-03-07 at 12 56 02

@buenaflor
Copy link
Contributor Author

@momrak thx for the report, I'll try to repo but it looks like we should also ignore these in the event page

@momrak
Copy link

momrak commented Mar 7, 2024

Is it possible to upload these source maps to get better error messages here, or is this related to getsentry/sentry#48334 and can first be fixed once that is done?

@thomasmechessa891
Copy link

I also uploaded my source map for flutter web, made sure release and dist match but I keep seeing the Missing Source Context error. Any resolutions for this?

I have tried uploading the source maps both manually and using the dart sentry plugin. Both methods do upload the source map into the project on sentry, I have verified that,

Image

@loewenheim
Copy link

Hi @thomasmechessa891 , do you have a link to an example I can look at?

@thomasmechessa891
Copy link

Hi @thomasmechessa891 , do you have a link to an example I can look at?

I can create another empty flutter project and share a link. Would that work for you?

@loewenheim
Copy link

Sure, that would work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants