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

[Bug]: Custom quota in human-readable format calculated incorrectly #48647

Closed
5 of 8 tasks
Menelion opened this issue Oct 10, 2024 · 3 comments
Closed
5 of 8 tasks

[Bug]: Custom quota in human-readable format calculated incorrectly #48647

Menelion opened this issue Oct 10, 2024 · 3 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 30-feedback bug feature: users and groups

Comments

@Menelion
Copy link

Menelion commented Oct 10, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

Note! This might seem a copy of #38874 but that one was closed more than a year ago, and I'm experiencing my problem in Nextcloud 30.0.14 freshly installed (see config below).

when trying to adjust the default quota in the Accounts settings, entered size in gigabytes (like 100 GB) gets automagically converted to size in bytes and then re-humanized again, but this time incorrectly (as 93.1 GB in my case). I'm pretty sure the entered value is multiplied by 1000s, not 1024s, hence a lesser value as total. I'm not familiar with the code yet, so although I tried to investigate, I could not find the culprid. I'm willing to send a pull request if someone guides me a bit.

Steps to reproduce

  1. Install NextCloud 30.0.14 via install script.
  2. Open Account settings on your domain (mydomain.com/settings/users/).
  3. click Account Management Settings.
  4. In the Default Quota edit combo, try entering 100 GB.

Actual Result: 93.1 GB is shown. To actually get 100 GB, the only way is to enter 1073741824, i.e., 1024 * 1024 * 1024.

Expected behavior

100 GB should be selected as new default quota.

Nextcloud Server version

30

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "disk.cx"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.0.14",
        "overwrite.cli.url": "https:\/\/disk.cx\/",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_timezone": "Europe\/Paris",
        "logtimezone": "Europe\/Paris",
        "log_rotate_size": 10240,
        "simpleSignUpLink.shown": false,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "14, auto",
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 8549,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "default_phone_region": "US",
        "maintenance_window_start": 2,
        "defaultapp": "files"
    }
}

List of activated Apps

Enabled:

  • activity: 3.0.0
  • bruteforcesettings: 3.0.0
  • circles: 30.0.0-dev
  • cloud_federation_api: 1.13.0
  • comments: 1.20.1
  • contactsinteraction: 1.11.0
  • dashboard: 7.10.0
  • dav: 1.31.1
  • federatedfilesharing: 1.20.0
  • federation: 1.20.0
  • files: 2.2.0
  • files_downloadlimit: 3.0.0
  • files_pdfviewer: 3.0.0
  • files_reminders: 1.3.0
  • files_sharing: 1.22.0
  • files_trashbin: 1.20.1
  • files_versions: 1.23.0
  • firstrunwizard: 3.0.0
  • logreader: 3.0.0
  • lookup_server_connector: 1.18.0
  • nextcloud_announcements: 2.0.0
  • notifications: 3.0.0
  • oauth2: 1.18.1
  • password_policy: 2.0.0
  • photos: 3.0.2
  • privacy: 2.0.0
  • provisioning_api: 1.20.0
  • recommendations: 3.0.0
  • related_resources: 1.5.0
  • serverinfo: 2.0.0
  • settings: 1.13.0
  • sharebymail: 1.20.0
  • support: 2.0.0
  • survey_client: 2.0.0
  • suspicious_login: 8.0.0
  • systemtags: 1.20.0
  • text: 4.1.0
  • theming: 2.5.0
  • twofactor_backupcodes: 1.19.0
  • twofactor_nextcloud_notification: 4.0.0
  • twofactor_totp: 12.0.0-dev
  • updatenotification: 1.20.0
  • user_status: 1.10.0
  • viewer: 3.0.0
  • weather_status: 1.10.0
  • webhook_listeners: 1.1.0-dev
  • workflowengine: 2.12.0
    Disabled:
  • admin_audit: 1.20.0
  • encryption: 2.18.0
  • files_external: 1.22.0
  • user_ldap: 1.21.0

Nextcloud Signing status

No errors have been found

Nextcloud Logs

{"reqId":"AkKtEhOZ1fjC3C7whnLJ","level":2,"time":"2024-10-10T14:01:00+02:00","remoteAddr":"88.182.160.39","user":"Menelion","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"Icon of notification is not an absolute URL and does not work in mobile and desktop clients [app: survey_client, subject: updated]","userAgent":"Mozilla/5.0 (Windows) mirall/3.14.13.14-Win64 (build 20240927) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"30.0.0.14","data":[]}
{"reqId":"AkKtEhOZ1fjC3C7whnLJ","level":3,"time":"2024-10-10T14:01:00+02:00","remoteAddr":"88.182.160.39","user":"Menelion","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/var/www/disk.cx","userAgent":"Mozilla/5.0 (Windows) mirall/3.14.13.14-Win64 (build 20240927) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/var/www/disk.cx","Code":0,"Trace":[{"file":"/var/www/disk.cx/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/disk.cx/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/var/www/disk.cx/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/var/www/disk.cx/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/var/www/disk.cx/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/var/www/disk.cx/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/disk.cx/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/disk.cx/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/disk.cx/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/disk.cx/ocs/v2.php","line":7,"args":["/var/www/disk.cx/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/disk.cx/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/var/www/disk.cx","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/var/www/disk.cx"}}```
@Menelion Menelion added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Oct 10, 2024
@solracsf
Copy link
Member

Did you acknowledge this commet #38874 (comment)?

@Menelion
Copy link
Author

@solracsf Sorry, didn't get an email for that for some reason. Should I close this one then as duplicate? but I still do reproduce the issue though.

@solracsf
Copy link
Member

solracsf commented Oct 10, 2024

Yeah let's close here as Susnux, who worked on that previously, already answered you there and also there are more details on that issue 👍

@solracsf solracsf closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 30-feedback bug feature: users and groups
Projects
None yet
Development

No branches or pull requests

3 participants