File access remains if telemetry is disabled #1716

Closed
opened 2026-03-13 08:58:07 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @GitonioDev on GitHub (Aug 15, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Create a blank backend with better-auth
  2. Disable telemetry
  3. Run with a runtime that has a permission system

Current vs. Expected behavior

Current: When running the blank better-auth app and telemetry disabled with a runtime like deno that uses a permission system it will still try to access those telemetry files like os info

Expected: When telemetry is disabled better-auth should not try to access those files because why should it when it even cannot use them

What version of Better Auth are you using?

1.3.6

System info

System:
  OS: Windows 10 10.0.19044
  CPU: (28) x64 Intel(R) Core(TM) i7-14700K
  Memory: 19.38 GB / 31.77 GB
Browsers:
  Edge: Chromium (131.0.2903.70)
  Internet Explorer: 11.0.19041.5794

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)


Additional context

No response

Originally created by @GitonioDev on GitHub (Aug 15, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Create a blank backend with better-auth 2. Disable telemetry 3. Run with a runtime that has a permission system ### Current vs. Expected behavior Current: When running the blank better-auth app and telemetry disabled with a runtime like deno that uses a permission system it will still try to access those telemetry files like os info Expected: When telemetry is disabled better-auth should not try to access those files because why should it when it even cannot use them ### What version of Better Auth are you using? 1.3.6 ### System info ```bash System: OS: Windows 10 10.0.19044 CPU: (28) x64 Intel(R) Core(TM) i7-14700K Memory: 19.38 GB / 31.77 GB Browsers: Edge: Chromium (131.0.2903.70) Internet Explorer: 11.0.19041.5794 ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
GiteaMirror added the bug label 2026-03-13 08:58:07 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 15, 2025):

Hi @GitonioDev! I'm Dosu and I’m helping the better-auth team.

This is a known issue in Better Auth 1.3.6: even with telemetry disabled, the library still tries to access system info and telemetry-related files because the telemetry code imports Node.js modules (like os, path, and fs) before checking if telemetry is enabled. This causes file access attempts in environments with permission systems, such as Deno or Convex, regardless of your telemetry settings example.

A fix was merged in PR #3942 and #3947, which replaces static imports with dynamic imports and adds runtime checks so these files are only accessed if telemetry is actually enabled. This fix is not present in 1.3.6—you'll need to upgrade to a version after PR #3947 to avoid this problem.

If you can't upgrade, workarounds include downgrading to 1.3.4 (before telemetry was added) or patching your local copy to wrap Node.js imports in try-catch blocks and only run telemetry helpers if telemetry is enabled details. Let me know if you want more details or code snippets for patching.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 15, 2025): <!-- Greeting --> Hi @GitonioDev! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> This is a known issue in Better Auth 1.3.6: even with telemetry disabled, the library still tries to access system info and telemetry-related files because the telemetry code imports Node.js modules (like `os`, `path`, and `fs`) before checking if telemetry is enabled. This causes file access attempts in environments with permission systems, such as Deno or Convex, regardless of your telemetry settings [example](https://github.com/better-auth/better-auth/issues/3973#issuecomment-3184032894). A fix was merged in PR [#3942](https://github.com/better-auth/better-auth/pull/3942) and [#3947](https://github.com/better-auth/better-auth/pull/3947), which replaces static imports with dynamic imports and adds runtime checks so these files are only accessed if telemetry is actually enabled. This fix is not present in 1.3.6—you'll need to upgrade to a version after PR #3947 to avoid this problem. If you can't upgrade, workarounds include downgrading to 1.3.4 (before telemetry was added) or patching your local copy to wrap Node.js imports in try-catch blocks and only run telemetry helpers if telemetry is enabled [details](https://github.com/better-auth/better-auth/issues/3973#issuecomment-3184032894). Let me know if you want more details or code snippets for patching. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/4b20bfc5-5aa2-47fd-abd9-77f2e7c270bc?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4b20bfc5-5aa2-47fd-abd9-77f2e7c270bc?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4b20bfc5-5aa2-47fd-abd9-77f2e7c270bc?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4b20bfc5-5aa2-47fd-abd9-77f2e7c270bc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4b20bfc5-5aa2-47fd-abd9-77f2e7c270bc?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4b20bfc5-5aa2-47fd-abd9-77f2e7c270bc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4b20bfc5-5aa2-47fd-abd9-77f2e7c270bc?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/4030)
Author
Owner

@Kinfe123 commented on GitHub (Aug 15, 2025):

Closing via #4031

@Kinfe123 commented on GitHub (Aug 15, 2025): Closing via #4031
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1716