Skip to content

Commit

Permalink
Tip 224
Browse files Browse the repository at this point in the history
  • Loading branch information
bizz84 committed Jan 20, 2025
1 parent 147b4dc commit 4173fb7
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This repo now has a companion app! [Download it here](https://fluttertips.dev/)
| ID | View on GitHub (this repo) | X Post | LinkedIn Post | Bluesky Post | Link on [codewithandrea.com](https://codewithandrea.com/) |
| -- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------ | ------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| 224 | [Uploading the Source Maps to Sentry](tips/0224-upload-source-maps-sentry/index.md) | [link](https://x.com/biz84/status/1879922615026151473) | [link](https://www.linkedin.com/posts/andreabizzotto_did-you-know-if-your-codemagic-builds-are-activity-7285688423271530496-XY0x) | [link](https://bsky.app/profile/codewithandrea.com/post/3lfunvdmhjc2w) | |
| 223 | [SSH Access on Codemagic Builds](tips/0223-ssh-access-codemagic/index.md) | [link](https://x.com/biz84/status/1879922615026151473) | [link](https://www.linkedin.com/posts/andreabizzotto_did-you-know-if-your-codemagic-builds-are-activity-7285688423271530496-XY0x) | [link](https://bsky.app/profile/codewithandrea.com/post/3lfunvdmhjc2w) | |
| 222 | [Move Declaration to File (VSCode assist)](tips/0222-move-to-file-vscode-assist/index.md) | [link](https://x.com/biz84/status/1876983674735849540) | [link](https://www.linkedin.com/posts/andreabizzotto_did-you-know-with-vscode-you-can-easily-activity-7282749783033741314-qVCu) | [link](https://bsky.app/profile/codewithandrea.com/post/3lfabcatbhs2r) | |
| 221 | [Using Stack and FractionallySizedBox](tips/0221-stack-fractionally-sized-box/index.md) | [link](https://x.com/biz84/status/1876564889537311226) | [link](https://www.linkedin.com/posts/andreabizzotto_did-you-know-flutter-offers-many-ways-to-activity-7282330843241447426-cDRF) | [link](https://bsky.app/profile/codewithandrea.com/post/3lf5eby24zc2r) | |
Expand Down
2 changes: 1 addition & 1 deletion tips/0223-ssh-access-codemagic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you want to check it out, here's the intro:

| Previous | Next |
| -------- | ---- |
| [Move Declaration to File (VSCode assist)](../0222-move-to-file-vscode-assist/index.md) | |
| [Move Declaration to File (VSCode assist)](../0222-move-to-file-vscode-assist/index.md) | [Uploading the Source Maps to Sentry](../0224-upload-source-maps-sentry/index.md) |


<!-- TWITTER|https://x.com/biz84/status/1879922615026151473 -->
Expand Down
Binary file added tips/0224-upload-source-maps-sentry/224.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions tips/0224-upload-source-maps-sentry/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Uploading the Source Maps to Sentry

Did you know?

If you enable code obfuscation in your Flutter release builds, the stack traces will be unreadable in the Sentry crash reports.

To fix this:
- Generate the source maps with --split-debug-info
- Use sentry_dart_plugin package to upload them
- Automate the process with CI/CD (recommended)

![](224.png)

<!--
Uploading the Source Maps to Sentry
Tools like Sentry are essential for error monitoring in production. But if you’ve enabled code obfuscation in your release builds, the stack traces will be unreadable. To fix this:
- Generate the source maps with the --split-debug-info flag
- Use sentry_dart_plugin package to upload them
# 1. Install and configure the Sentry Dart Plugin
dev_dependencies:
sentry_dart_plugin:
sentry:
upload_debug_symbols: true
project: <your-sentry-project-name>
org: <your-sentry-org-name>
auth_token: <your-sentry-auth-token>
symbols_path: build
# 2. Build the IPA or appbundle with these flags
flutter build ipa --obfuscate --split-debug-info=build
# 3. Run the plugin to upload the source maps
dart run sentry_dart_plugin
-->

---

To learn more about code obfuscation and how to upload the source maps to Sentry, check these links:

- https://docs.flutter.dev/deployment/obfuscate
- https://pub.dev/packages/sentry_dart_plugin

---

For a more complete guide showing how everything fits together (error monitoring, app releases, and CI/CD automation), check my latest course:

- [Flutter in Production](https://codewithandrea.com/courses/flutter-in-production/)

---

| Previous | Next |
| -------- | ---- |
| [SSH Access on Codemagic Builds](../0223-ssh-access-codemagic/index.md) | |


<!-- TWITTER|https://x.com/biz84/status/1881373630313218480 -->
<!-- LINKEDIN|https://www.linkedin.com/posts/andreabizzotto_did-you-know-if-you-enable-code-obfuscation-activity-7287140106602201091-H-Zr -->
<!-- BLUESKY|https://bsky.app/profile/codewithandrea.com/post/3lg6q4nkivs2q -->

0 comments on commit 4173fb7

Please sign in to comment.