Cannot access WWW and limited OCC after NC32 Upgrade

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32 (Latest upgrade)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu (25.04 I believe)
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.63
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • SOPHOS UTM
  • PHP version (e.g, 8.3):
    • PHP8.4
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Directly after upgrade
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare metal / Archive
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

After upgrading, when viewing WWW or trying to use some features of OCC I am receiving an internal server error / command line error message.

Steps to replicate it (hint: details matter!):

  1. Upgrade to 32 from previous latest version

  2. Problem appears.

Log entries

Nextcloud & Command line errors

{"reqId":"2ygyOZukr1zmi3aGIMmK","level":3,"time":"2025-09-27T14:46:40+00:00","remoteAddr":"10.33.1.218","user":"dc","app":"activitylog","method":"GET","url":"/index.php/apps/dashboard/","message":"/appinfo/app.php is not supported anymore, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","version":"32.0.0.13","data":{"app":"activitylog"}}
{"reqId":"2ygyOZukr1zmi3aGIMmK","level":3,"time":"2025-09-27T14:46:40+00:00","remoteAddr":"10.33.1.218","user":"dc","app":"browser_warning","method":"GET","url":"/index.php/apps/dashboard/","message":"/appinfo/app.php is not supported anymore, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","version":"32.0.0.13","data":{"app":"browser_warning"}}
{"reqId":"2ygyOZukr1zmi3aGIMmK","level":3,"time":"2025-09-27T14:46:40+00:00","remoteAddr":"10.33.1.218","user":"dc","app":"index","method":"GET","url":"/index.php/apps/dashboard/","message":"OCP\\Util::numericToNumber(): Argument #1 ($number) must be of type string|int|float, null given, called in /var/www/html/lib/private/Files/Cache/Cache.php on line 162","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","version":"32.0.0.13","exception":{"Exception":"TypeError","Message":"OCP\\Util::numericToNumber(): Argument #1 ($number) must be of type string|int|float, null given, called in /var/www/html/lib/private/Files/Cache/Cache.php on line 162","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/Cache/Cache.php","line":162,"function":"numericToNumber","class":"OCP\\Util","type":"::"},{"file":"/var/www/html/apps/groupfolders/lib/Folder/FolderManager.php","line":597,"function":"cacheEntryFromData","class":"OC\\Files\\Cache\\Cache","type":"::"},{"function":"{closure:OCA\\GroupFolders\\Folder\\FolderManager::getFoldersForGroups():593}","class":"OCA\\GroupFolders\\Folder\\FolderManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/groupfolders/lib/Folder/FolderManager.php","line":593,"function":"array_map"},{"file":"/var/www/html/apps/groupfolders/lib/Folder/FolderManager.php","line":888,"function":"getFoldersForGroups","class":"OCA\\GroupFolders\\Folder\\FolderManager","type":"->"},{"file":"/var/www/html/apps/groupfolders/lib/AppInfo/Capabilities.php","line":47,"function":"getFoldersForUser","class":"OCA\\GroupFolders\\Folder\\FolderManager","type":"->"},{"file":"/var/www/html/apps/groupfolders/lib/AppInfo/Capabilities.php","line":41,"function":"hasFolders","class":"OCA\\GroupFolders\\AppInfo\\Capabilities","type":"->"},{"file":"/var/www/html/lib/private/CapabilitiesManager.php","line":61,"function":"getCapabilities","class":"OCA\\GroupFolders\\AppInfo\\Capabilities","type":"->"},{"file":"/var/www/html/lib/private/Template/JSConfigHelper.php","line":142,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->"},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":237,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->"},{"file":"/var/www/html/lib/private/Template/Template.php","line":115,"function":"getPageTemplate","class":"OC\\TemplateLayout","type":"->"},{"file":"/var/www/html/lib/public/AppFramework/Http/TemplateResponse.php","line":195,"function":"fetchPage","class":"OC\\Template\\Template","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":163,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->"},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/index.php","line":25,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/lib/public/Util.php","Line":323,"message":"OCP\\Util::numericToNumber(): Argument #1 ($number) must be of type string|int|float, null given, called in /var/www/html/lib/private/Files/Cache/Cache.php on line 162","exception":{},"CustomMessage":"OCP\\Util::numericToNumber(): Argument #1 ($number) must be of type string|int|float, null given, called in /var/www/html/lib/private/Files/Cache/Cache.php on line 162"}}





COMMAND LINE ERROR WHEN USING OCC

# time sudo -u '#33' php ./occ files:scan dc
Starting scan for user 1 out of 1 (dc)
An unhandled exception has been thrown:
TypeError: OCP\Util::numericToNumber(): Argument #1 ($number) must be of type string|int|float, null given, called in /var/www/html/lib/private/Files/Cache/Cache.php on line 162 and defined in /var/www/html/lib/public/Util.php:323
Stack trace:
#0 /var/www/html/lib/private/Files/Cache/Cache.php(162): OCP\Util::numericToNumber()
#1 /var/www/html/apps/groupfolders/lib/Folder/FolderManager.php(597): OC\Files\Cache\Cache::cacheEntryFromData()
#2 [internal function]: OCA\GroupFolders\Folder\FolderManager->{closure:OCA\GroupFolders\Folder\FolderManager::getFoldersForGroups():593}()
#3 /var/www/html/apps/groupfolders/lib/Folder/FolderManager.php(593): array_map()
#4 /var/www/html/apps/groupfolders/lib/Folder/FolderManager.php(888): OCA\GroupFolders\Folder\FolderManager->getFoldersForGroups()
#5 /var/www/html/apps/groupfolders/lib/Mount/MountProvider.php(51): OCA\GroupFolders\Folder\FolderManager->getFoldersForUser()
#6 /var/www/html/apps/groupfolders/lib/Mount/MountProvider.php(55): OCA\GroupFolders\Mount\MountProvider->getFoldersForUser()
#7 /var/www/html/lib/private/Files/Config/MountProviderCollection.php(56): OCA\GroupFolders\Mount\MountProvider->getMountsForUser()
#8 /var/www/html/lib/private/Files/Config/MountProviderCollection.php(113): OC\Files\Config\MountProviderCollection->getMountsFromProvider()
#9 /var/www/html/lib/private/Files/SetupManager.php(205): OC\Files\Config\MountProviderCollection->addMountForUser()
#10 /var/www/html/lib/private/Files/SetupManager.php(316): OC\Files\SetupManager->{closure:OC\Files\SetupManager::setupForUser():204}()
#11 /var/www/html/lib/private/Files/SetupManager.php(204): OC\Files\SetupManager->setupForUserWith()
#12 /var/www/html/lib/private/legacy/OC_Util.php(49): OC\Files\SetupManager->setupForUser()
#13 /var/www/html/lib/private/Files/Utils/Scanner.php(95): OC_Util::setupFS()
#14 /var/www/html/lib/private/Files/Utils/Scanner.php(187): OC\Files\Utils\Scanner->getMounts()
#15 /var/www/html/apps/files/lib/Command/Scan.php(165): OC\Files\Utils\Scanner->scan()
#16 /var/www/html/apps/files/lib/Command/Scan.php(255): OCA\Files\Command\Scan->scanFiles()
#17 /var/www/html/3rdparty/symfony/console/Command/Command.php(326): OCA\Files\Command\Scan->execute()
#18 /var/www/html/core/Command/Base.php(218): Symfony\Component\Console\Command\Command->run()
#19 /var/www/html/3rdparty/symfony/console/Application.php(1078): OC\Core\Command\Base->run()
#20 /var/www/html/3rdparty/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#21 /var/www/html/3rdparty/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#22 /var/www/html/lib/private/Console/Application.php(187): Symfony\Component\Console\Application->run()
#23 /var/www/html/console.php(90): OC\Console\Application->run()
#24 /var/www/html/occ(33): require_once('...')
#25 {main}
real    0m3.403s
user    0m0.010s
sys     0m0.010s


Configuration

Apps

The output of occ app:list (if possible).

Enabled:

  • activity: 5.0.0-dev.0
  • activitylog: 0.0.1
  • admin_audit: 1.22.0
  • analytics: 6.0.1
  • analytics_sourcepack: 0.0.3
  • announcementcenter: 7.2.1
  • app_api: 32.0.0
  • appointments: 2.4.6
  • assistant: 2.8.0
  • audioplayer: 3.5.1
  • browser_warning: 1.0.0
  • bruteforcesettings: 5.0.0-dev.0
  • calendar: 6.0.0
  • camerarawpreviews: 0.8.7
  • cfg_share_links: 7.0.1
  • checksum: 1.2.6
  • cloud_federation_api: 1.16.0
  • comments: 1.22.0
  • contacts: 8.0.2
  • contactsinteraction: 1.13.1
  • dashboard: 7.12.0
  • dav: 1.34.2
  • drawio: 3.1.0
  • event_update_notification: 2.7.0
  • external: 7.0.0
  • federatedfilesharing: 1.22.0
  • files: 2.4.0
  • files_accesscontrol: 3.0.0
  • files_archive: 1.2.7
  • files_automatedtagging: 3.0.0
  • files_downloadactivity: 1.18.1
  • files_downloadlimit: 5.0.0-dev.0
  • files_external: 1.24.0
  • files_markdown: 2.4.1
  • files_pdfviewer: 5.0.0-dev.0
  • files_reminders: 1.5.0
  • files_scripts: 4.1.0
  • files_sharing: 1.24.0
  • files_trashbin: 1.22.0
  • files_versions: 1.25.0
  • flow_notifications: 3.0.0
  • groupfolders: 20.0.1
  • impersonate: 3.0.0
  • keeweb: 0.6.21
  • logreader: 5.0.0-dev.0
  • lookup_server_connector: 1.20.0
  • mail: 5.5.5
  • maps: 1.6.0
  • nextcloud_announcements: 4.0.0-dev.0
  • notes: 4.12.3
  • notifications: 5.0.0-dev.0
  • oauth2: 1.20.0
  • occweb: 0.2.3
  • password_policy: 4.0.0-dev.0
  • phonetrack: 0.9.1
  • photos: 5.0.0-dev.1
  • privacy: 4.0.0-dev.0
  • profile: 1.1.0
  • provisioning_api: 1.22.0
  • quota_warning: 1.22.0
  • recognize: 10.0.4
  • recommendations: 5.0.0-dev.0
  • related_resources: 3.0.0-dev.0
  • richdocuments: 9.0.0
  • richdocumentscode: 25.4.504
  • serverinfo: 4.0.0-dev.0
  • settings: 1.15.1
  • sharebymail: 1.22.0
  • side_menu: 5.1.1
  • snowflakestheme: 1.1.3
  • spreed: 22.0.0
  • suspicious_login: 10.0.0-dev.0
  • systemtags: 1.22.0
  • tables: 0.9.5
  • terms_of_service: 4.6.0
  • text: 6.0.0-dev.0
  • theming: 2.7.0
  • twofactor_admin: 4.8.0
  • twofactor_backupcodes: 1.21.0
  • twofactor_nextcloud_notification: 6.0.0-dev.0
  • twofactor_totp: 14.0.0
  • updatenotification: 1.22.0
  • user_status: 1.12.0
  • viewer: 5.0.0-dev.0
  • weather_status: 1.12.0
  • webhook_listeners: 1.3.0
  • workflow_pdf_converter: 3.0.0
  • workflow_script: 3.0.0
  • workflowengine: 2.14.0
1 Like

One of my mounts is currently unavailable, could this be the issue? No problem before upgrade.

OCP\Util::numericToNumber(): Argument #1 ($number) must be of type string|int|float, null given, called in /var/www/html/lib/private/Files/Cache/Cache.php on line 162 and defined in /var/www/html/lib/public/Util.php:323

means Nextcloud’s file cache is returning a value for a field that’s expected to be a number (size, mtime, etc.)

Where its failing?

The stack trace points to /lib/private/Files/Cache/Cache.php line 162.

ROOT CAUSE:

  • Nextcloud 32 tightened type checks for numeric fields.
  • Group Folders app is returning NULL for a numeric field (size, mtime, etc.).
  • This NULL value comes from oc_filecache entries for group folder mounts.
  • Older versions silently accepted NULL; now it throws a TypeError.

LIKELY TRIGGERS:

  • Corrupted or incomplete oc_filecache rows.
  • Orphaned group folder records.
  • Missing physical path for a group folder mount.

FIX STEPS:

  1. Identify bad cache entries in the database:

    (Adjust table prefix if not “oc_”)

    SELECT *

    FROM oc_filecache
    WHERE size IS NULL
    OR mtime IS NULL
    OR storage IN (
    SELECT id FROM oc_storages WHERE id LIKE ‘groupfolder%’
    );

  2. Repair the cache:

    • If the file/folder exists physically:

      UPDATE oc_filecache

      SET size = 0, mtime = UNIX_TIMESTAMP()
      WHERE fileid = <broken_id>;

    • If orphaned (no actual file):

      DELETE FROM oc_filecache WHERE fileid = <broken_id>;

  3. Run Nextcloud repair routines:

    sudo -u www-data php occ maintenance:repair

    sudo -u www-data php occ groupfolders:scan <folder_id>
    sudo -u www-data php occ files:scan --path=“//files”

  4. Update Group Folders app:

    • Ensure you are on the latest version compatible with NC 32.
    • Older versions still use deprecated bootstrap and may mishandle NULLs.

NOTES:

  • This is a data integrity issue, not just a code bug.
  • Fix the bad rows in oc_filecache and keep Group Folders updated.
  • Once repaired, scans should complete without error.

========================================================

I used ai to make this a little easier to follow step by step but this should resolve your issue. FYI ai is great for help with errors in bash/python etc. Let it do the debugging for ya. :wink: This should at least give you somewhere to start.

1 Like

Thank you so much. Will report back soon.

Im having some issues getting your SQL query to run. Im running postgres if this helps?

SQL Query:

SELECT * FROM public.oc_filecache
WHERE size IS NULL
OR mtime IS NULL
OR storage IS (
SELECT id FROM oc_storages WHERE id LIKE ‘groupfolder%’
);

The error displayed is:

ERROR: syntax error at or near “(”
LINE 4: OR storage IS (

Many thanks

I updated this for postgrel

========================================================

NEXTCLOUD GROUP FOLDERS: FIXING NULL size/mtime ENTRIES (PostgreSQL)

CONTEXT:

In Nextcloud 32, stricter type checks mean that any NULL values in
numeric fields like size or mtime in oc_filecache will cause
occ files:scan and certain Group Folders operations to fail with:

TypeError: OCP\Util::numericToNumber(): Argument #1 ($number) must be of type string|int|float, null given

These scripts repair or remove the bad rows.


BATCH FIX FOR ALL GROUP FOLDER ENTRIES

Purpose:

  • Automatically update ALL group folder cache rows with missing size/mtime.
  • No need to manually hunt broken IDs.

PostgreSQL-safe syntax:

UPDATE oc_filecache fc
SET size = 0,
    mtime = EXTRACT(EPOCH FROM NOW())
FROM oc_storages st
WHERE fc.storage = st.numeric_id
  AND st.id LIKE 'groupfolder%'
  AND (fc.size IS NULL OR fc.mtime IS NULL);

BATCH DELETE FOR TRULY ORPHANED GROUP FOLDER ENTRIES (You may not have to run this, see if occ:filescan is working first)

Purpose:

  • Remove group folder cache rows that have no corresponding file on disk.
  • Use with caution — this will delete cache entries permanently.

PostgreSQL-safe syntax:

DELETE FROM oc_filecache fc
USING oc_storages st
WHERE fc.storage = st.numeric_id
  AND st.id LIKE 'groupfolder%'
  AND (fc.size IS NULL OR fc.mtime IS NULL)
  AND NOT EXISTS (
      SELECT 1
      FROM pg_ls_dir('/path/to/groupfolders') AS files
      WHERE files = fc.path
  );

NOTE: Replace /path/to/groupfolders with your actual group folders data path.

========================================================

USAGE NOTES:

  1. Always back up your database before running DELETE or UPDATE queries.
  2. Run occ maintenance:repair after changes to rebuild indexes.
  3. Keep Group Folders app updated to match your Nextcloud version.

Hey,

Thanks for getting back to me!

Running this query returns no rows from my database. It successfully runs but no rows match the criteria so I get an empty result set.

Looking in my oc_group_folders table, I have 5 entries. They all have [null] as their storage_id and root_id tupples. Could this be the problem? Also one of the rows has -4 for the quota bigint? All the rest have quotas set so they have positive numbers.

Again, thanks for your help.

Warm regards

Dean

Check if the physical folders exist

Look in your groupfolders data directory (usually data/groupfolders/<folder_id>).
If they exist, note the folder IDs.

Rebuild the storage_id and root_id links

You can do this by:
Running occ groupfolders:scan <folder_id> for each folder.

Once you have done that successfully assuming the folders are there and the previous command fixed the issue. Make sure to run a full repair

occ maintenance:repair 
occ groupfolders:scan 
occ files:scan --path="//files"

Hopefully this fixes it for you.

I get the command line error when trying to use occ groupfolders:scan 1 or –all

the same error you initially got or a new one? Are the folders in the path? There is away to do it through postgrel

UPDATE oc_group_folders
SET storage_id = (SELECT numeric_id FROM oc_storages WHERE id = ‘groupfolder:<folder_id>’),
root_id = (SELECT fileid FROM oc_filecache WHERE path = ‘’ AND storage = (SELECT numeric_id FROM oc_storages WHERE id = ‘groupfolder:<folder_id>’))
WHERE folder_id = <folder_id>;

Replace <folder_id> in the above command to whatever the id’s are in the group folder path, this will inject it directly into the database. Run it for each ID

Same issue here after update from 31.0.9 to 32.0

sudo -u www-data php /var/www/nextcloud/occ groupfolders:scan --all
An unhandled exception has been thrown:
TypeError: OCP\Util::numericToNumber(): Argument #1 ($number) must be of type string|int|float, null given, called in /var/www/nextcloud/lib/private/Files/Cache/Cache.php on line 162 and defined in /var/www/nextcloud/lib/public/Util.php:323
Stack trace:
#0 /var/www/nextcloud/lib/private/Files/Cache/Cache.php(162): OCP\Util::numericToNumber()

Yes, the same error. All coming back to Argument #1 passed to numericToNumber ($number) being null instead of string, int, or float.

I’m able to login after disable groupfolders:

occ app:disable groupfolders

Yes, I thought this may work. But I didnt try this as I would like to get to the bottom of the issue.

I tried this in postgres, fixing the ‘ ‘ characters, however it hasnt resolved the issue.

Can you make sure that each group folder has an id in oc_storages db.

SELECT numeric_id, id FROM oc_storages WHERE id LIKE ‘groupfolder:%’;

f any are missing, insert them first: replace folder_id with appropriate value

INSERT INTO oc_storages (id) VALUES (‘groupfolder:<folder_id>’);

Root filecache entry exists
For each storage, oc_filecache must have a row where:
storage = that storage’s numeric_id
path=’’ (empty string — root of the storage) Check with:

SELECT fileid, storage, path
FROM oc_filecache
WHERE path = ''
  AND storage = <numeric_id>;

If missing, you’ll need to create the folder physically in and run:

occ files:scan --path="/groupfolders/<folder_id>"

Once those entries exist:

UPDATE oc_group_folders gf
SET storage_id = st.numeric_id,
    root_id = fc.fileid
FROM oc_storages st
JOIN oc_filecache fc
  ON fc.storage = st.numeric_id
  AND fc.path = ''  -- root of the storage
WHERE st.id = 'groupfolder:' || gf.folder_id
  AND (gf.storage_id IS NULL OR gf.root_id IS NULL);

will:
• Set storage_id to the correct numeric_id from oc_storages
• Set root_id to the correct root fileid from oc_filecache
• Only touch rows where either value is currently NULL

Lastly run:

occ maintenance:repair
occ groupfolders:scan <folder_id>

Test filescan again and the error should now be fixed.

Keeping my fingers crossed for ya

Hey *_dude_*,

Thanks for all your help.

I still havent resolved this issue. So I’m at the Root filecache entry exists part of your post, and what you said should be there, well they’re all missing. However I can’t use the files:scan function to scan the groupfolders, and when I try occ groupfolders:scan I get the same error again.

FYI I have groupfolder ids 1,2,4,5,7. And I have numeric_id in the oc_storages table of 59 - 63, now that I’ve added to the oc_storages as above.

Again, thank you so much.

  • Dean

If you like (and its ok here) I can show u the contents of any tables you need. This is only a small personal instance of NC that I’m working on. :slight_smile:

Should this be ‘groupfolder::<folder_id>’? i.e. is it meant to have two : instead of one?