Skip to content

docs(mobile): add SENTRY_DISABLE_AUTO_UPLOAD=true to build apk without sentry dsn#2700

Merged
MohamedBassem merged 3 commits intokarakeep-app:mainfrom
xuatz:docs/rn-sentry-skip
Apr 14, 2026
Merged

docs(mobile): add SENTRY_DISABLE_AUTO_UPLOAD=true to build apk without sentry dsn#2700
MohamedBassem merged 3 commits intokarakeep-app:mainfrom
xuatz:docs/rn-sentry-skip

Conversation

@xuatz
Copy link
Copy Markdown
Collaborator

@xuatz xuatz commented Apr 13, 2026

Summary

  • add SENTRY_DISABLE_AUTO_UPLOAD=true to package.json script to install the app on without sentry dsn

Notes

Example of build failure

> Task :app:createBundleReleaseJsAndAssets_SentryUpload_app.hoarder.hoardermobile.dev@1.9.2+37_37 FAILED
Copy `debugId` from packager source map to Hermes source map...
Done.
Check generated source map for Debug ID: a7e93e80-e45c-4c67-b29c-dc3057efe511

Sentry Source Maps upload will include the release name and dist.
Sentry-CLI arguments: [/Users/x-low/WorkingSpace/karakeep/node_modules/@sentry/cli/bin/sentry-cli, react-native, gradle, --bundle, /Users/x-low/WorkingSpace/karakeep/apps/mobile/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle, --sourcemap, /Users/x-low/WorkingSpace/karakeep/apps/mobile/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map, --release, app.hoarder.hoardermobile.dev@1.9.2+37, --dist, 37]
  INFO    2026-04-13 14:51:23.474172 +09:00 Loaded file referenced by SENTRY_PROPERTIES (/Users/x-low/WorkingSpace/karakeep/apps/mobile/android/sentry.properties)
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
> Analyzing completed in 0.018s
> Rewriting sources
> Rewriting completed in 0.172s
> Adding source map references
error: Auth token is required for this request. Please run `sentry-cli login` and try again!

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.

[Incubating] Problems report is available at: file:///Users/x-low/WorkingSpace/karakeep/apps/mobile/android/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 13, 2026

Walkthrough

Added SENTRY_DISABLE_AUTO_UPLOAD=true environment variable prefix to four npm scripts in the mobile package configuration: android:preview, android:release, ios:preview, and ios:release. No dependencies or other configuration values were modified.

Changes

Cohort / File(s) Summary
Mobile Build Scripts
apps/mobile/package.json
Added SENTRY_DISABLE_AUTO_UPLOAD=true environment variable prefix to Android and iOS build scripts (android:preview, android:release, ios:preview, ios:release).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title claims to add documentation but the actual changes modify package.json scripts, not documentation files. Update the title to accurately reflect that the change adds environment variables to build scripts, not documentation (e.g., 'build(mobile): disable Sentry auto-upload in build scripts').
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description clearly explains the change: adding SENTRY_DISABLE_AUTO_UPLOAD=true to package.json scripts to prevent build failures when Sentry authentication is unavailable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 13, 2026

Greptile Summary

This PR adds a single documentation line to the mobile setup guide advising developers to set SENTRY_DISABLE_AUTO_UPLOAD=true when building without a Sentry DSN, preventing a confusing build failure. The change is accurate and well-motivated, with only a minor suggestion to clarify where/how the env var should be applied.

Confidence Score: 5/5

Documentation-only change; safe to merge.

The single added line is correct and helpful. The only feedback is a P2 suggestion to improve clarity about how to apply the env var.

No files require special attention.

Important Files Changed

Filename Overview
docs/docs/08-development/01-setup.md Adds a one-line note advising developers to set SENTRY_DISABLE_AUTO_UPLOAD=true when building without a Sentry DSN; useful but missing guidance on how/where to set it
Prompt To Fix All With AI
This is a comment left during a code review.
Path: docs/docs/08-development/01-setup.md
Line: 172

Comment:
**Missing guidance on how to set the env var**

The note tells developers *what* to add but not *where*. Most developers hitting this issue will be doing a release or preview build (as shown in the PR's error trace). Adding a short example — e.g., prefixing the build command — would make this immediately actionable.

```suggestion
In 99% of the cases, you also probably want to add `SENTRY_DISABLE_AUTO_UPLOAD=true` when running preview or release builds, unless you have your own Sentry project DSN configured — otherwise the build will fail. You can set it inline, e.g.:

```sh
SENTRY_DISABLE_AUTO_UPLOAD=true pnpm --filter @karakeep/mobile android:release
```
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "docs(mobile): add SENTRY_DISABLE_AUTO_UP..." | Re-trigger Greptile

Comment thread docs/docs/08-development/01-setup.md Outdated

In 90% of the cases, you'll want to use the development variant.

In 99% of the cases, you also probably want to add `SENTRY_DISABLE_AUTO_UPLOAD=true`, unless you have your own sentry project DSN to provide, otherwise, the build will fail.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing guidance on how to set the env var

The note tells developers what to add but not where. Most developers hitting this issue will be doing a release or preview build (as shown in the PR's error trace). Adding a short example — e.g., prefixing the build command — would make this immediately actionable.

Suggested change
In 99% of the cases, you also probably want to add `SENTRY_DISABLE_AUTO_UPLOAD=true`, unless you have your own sentry project DSN to provide, otherwise, the build will fail.
In 99% of the cases, you also probably want to add `SENTRY_DISABLE_AUTO_UPLOAD=true` when running preview or release builds, unless you have your own Sentry project DSN configured — otherwise the build will fail. You can set it inline, e.g.:
```sh
SENTRY_DISABLE_AUTO_UPLOAD=true pnpm --filter @karakeep/mobile android:release

<details><summary>Prompt To Fix With AI</summary>

`````markdown
This is a comment left during a code review.
Path: docs/docs/08-development/01-setup.md
Line: 172

Comment:
**Missing guidance on how to set the env var**

The note tells developers *what* to add but not *where*. Most developers hitting this issue will be doing a release or preview build (as shown in the PR's error trace). Adding a short example — e.g., prefixing the build command — would make this immediately actionable.

```suggestion
In 99% of the cases, you also probably want to add `SENTRY_DISABLE_AUTO_UPLOAD=true` when running preview or release builds, unless you have your own Sentry project DSN configured — otherwise the build will fail. You can set it inline, e.g.:

```sh
SENTRY_DISABLE_AUTO_UPLOAD=true pnpm --filter @karakeep/mobile android:release

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this example, it does seem like greptile gave a better suggestion ^^

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/docs/08-development/01-setup.md`:
- Around line 172-173: The docs mention SENTRY_DISABLE_AUTO_UPLOAD=true but
don't tell where to set it and the sentence is awkward; update the sentence to
be clearer and add concrete examples: show using it as a prefixed env var for
local runs (e.g., SENTRY_DISABLE_AUTO_UPLOAD=true pnpm ios and
SENTRY_DISABLE_AUTO_UPLOAD=true pnpm android) and note the alternative of adding
SENTRY_DISABLE_AUTO_UPLOAD=true to the mobile app .env (apps/mobile/.env) or
exporting it in the shell, and rewrite the line to read something like "If you
don't have a Sentry DSN, set SENTRY_DISABLE_AUTO_UPLOAD=true to avoid build
failures — either prefix the command (SENTRY_DISABLE_AUTO_UPLOAD=true pnpm
android/ios), export it in your shell, or add it to apps/mobile/.env."
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 02ed9056-8741-44a7-9a4f-ed4148cc303a

📥 Commits

Reviewing files that changed from the base of the PR and between 700359e and 9b396b1.

📒 Files selected for processing (1)
  • docs/docs/08-development/01-setup.md

Comment thread docs/docs/08-development/01-setup.md Outdated
@MohamedBassem
Copy link
Copy Markdown
Collaborator

@xuatz should we add this to the package.json script instead? The actual workflow that builds the apps doesn't use the package.json scripts, so it should be safe

@xuatz
Copy link
Copy Markdown
Collaborator Author

xuatz commented Apr 14, 2026

@xuatz should we add this to the package.json script instead? The actual workflow that builds the apps doesn't use the package.json scripts, so it should be safe

@MohamedBassem oh is that so? okay then let's put it in the script instead then!

@MohamedBassem MohamedBassem merged commit 8e6fcdc into karakeep-app:main Apr 14, 2026
6 checks passed
@MohamedBassem
Copy link
Copy Markdown
Collaborator

thank you!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants