Downloader - Silently return no repos when incorrect permissions #6635

Closed
opened 2025-11-24 19:56:40 +01:00 by PredaaA · 2 comments
PredaaA commented 2025-11-24 19:56:40 +01:00 (Migrated from github.com)

What Red version are you using?

3.5.22

Cog name

Downloader

Command name

repo list or cog update

What did you expect to happen?

To list the repos available or update the cogs.
Or if the permissions are wrong, to send something or log it in the console.

What actually happened?

It returns "There are no repos installed." or "There were no cogs to check."

How can we reproduce this error?

  1. Change the owner of the repos folder. (Eg: chown debian:debian repos)
  2. Restart the bot.
  3. Use the repo list or cog update command.

Anything else?

No response

### What Red version are you using? 3.5.22 ### Cog name Downloader ### Command name repo list or cog update ### What did you expect to happen? To list the repos available or update the cogs. Or if the permissions are wrong, to send something or log it in the console. ### What actually happened? It returns "There are no repos installed." or "There were no cogs to check." ### How can we reproduce this error? 1. Change the owner of the repos folder. (Eg: chown debian:debian repos) 2. Restart the bot. 3. Use the repo list or cog update command. ### Anything else? _No response_
Flame442 commented 2026-01-02 20:37:55 +01:00 (Migrated from github.com)

These commands use the value stored in self._repo_manager.repos, which is generated by a call to _load_repos and maintained as changes are made. My best guess as to what is causing this issue is the sweeping exception handling in _load_repos causing repos to be omitted from this cache if some kind of failure happens. I would expect a warning or error in console when starting the bot if this were the case. If so, this isn't happening silently, but it is likely hidden within the startup garbage dump and hard to notice.

github.com/Cog-Creators/Red-DiscordBot@dd3b9a01d3/redbot/cogs/downloader/repo_manager.py (L1227-L1246)

This does not seem like a likely issue to encounter, since this is a folder created and managed by Downloader that I would not expect a user to specifically change the permissions of. If the entire datapath were to have its permissions changed, I would expect a crash somewhere else in the startup process that would be much more noticeable than this issue. I'm not sure what an appropriate level of feedback would be beyond what is already given.

These commands use the value stored in `self._repo_manager.repos`, which is generated by a call to `_load_repos` and maintained as changes are made. My best guess as to what is causing this issue is the sweeping exception handling in `_load_repos` causing repos to be omitted from this cache if some kind of failure happens. I would expect a warning or error in console when starting the bot if this were the case. If so, this isn't happening silently, but it is likely hidden within the startup garbage dump and hard to notice. https://github.com/Cog-Creators/Red-DiscordBot/blob/dd3b9a01d3247625ddb5c998ced52c012da352cc/redbot/cogs/downloader/repo_manager.py#L1227-L1246 This does not seem like a likely issue to encounter, since this is a folder created and managed by Downloader that I would not expect a user to specifically change the permissions of. If the entire datapath were to have its permissions changed, I would expect a crash somewhere else in the startup process that would be much more noticeable than this issue. I'm not sure what an appropriate level of feedback would be beyond what is already given.
Owner

Fixed by #6805, which has been merged into V3/develop.

Fixed by #6805, which has been merged into V3/develop.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#6635
No description provided.