Server: TypeError: OC.filePath is not a function

Created on 9 Sep 2019  路  7Comments  路  Source: nextcloud/server

Steps to reproduce

  1. Have a nextcloud installed behind a reverse proxy under 16.0.3 and working fine
  2. Migrate nextcloud from 16.0.3 to 16.0.4 with updater/updater.phar in cli
  3. The migration is OK no errors
  4. Try to load the login page
  5. Try to login, nothing happens when clicking on login button.
  6. Open dev-tools and see js error

Expected behaviour

Be able to login

Actual behaviour

Login button do not work

Server configuration

Rpi 3 B

Operating system:
Raspbian 10 buster

Web server:
Apache/2.4.38

Database:
mysql Ver 15.1 Distrib 10.3.15-MariaDB

PHP version:
PHP 7.3.4-2

Nextcloud version: (see Nextcloud admin page)
16.0.4

Updated from an older Nextcloud/ownCloud or fresh install:
Update from Nextcloud 16.0.3

Where did you install Nextcloud from:
Used updater/updater.phar to upgrade

Signing status:
N/A

List of activated apps:


App list

Enabled:
  - accessibility: 1.2.0
  - activity: 2.9.1
  - admin_audit: 1.6.0
  - bookmarks: 1.0.5
  - bruteforcesettings: 1.3.0
  - cloud_federation_api: 0.2.0
  - comments: 1.6.0
  - contacts: 3.1.1
  - dav: 1.9.2
  - federatedfilesharing: 1.6.0
  - federation: 1.6.0
  - files: 1.11.0
  - files_external: 1.7.0
  - files_markdown: 2.0.6
  - files_pdfviewer: 1.5.0
  - files_rightclick: 0.13.0
  - files_sharing: 1.8.0
  - files_texteditor: 2.8.0
  - files_trashbin: 1.6.0
  - files_versions: 1.9.0
  - files_videoplayer: 1.5.0
  - firstrunwizard: 2.5.0
  - gallery: 18.3.0
  - logreader: 2.1.0
  - lookup_server_connector: 1.4.0
  - nextcloud_announcements: 1.5.0
  - notes: 2.6.0
  - notifications: 2.4.1
  - oauth2: 1.4.2
  - password_policy: 1.6.0
  - polls: 0.10.2
  - previewgenerator: 2.1.0
  - privacy: 1.0.0
  - provisioning_api: 1.6.0
  - qownnotesapi: 19.4.0
  - recommendations: 0.4.0
  - serverinfo: 1.6.0
  - sharebymail: 1.6.0
  - support: 1.0.0
  - systemtags: 1.6.0
  - tasks: 0.10.1
  - theming: 1.7.0
  - twofactor_backupcodes: 1.5.0
  - updatenotification: 1.6.0
  - viewer: 1.1.0
  - w2g2: 2.2.8
  - workflowengine: 1.6.0
Disabled:
  - admin_notifications
  - announcementcenter
  - calendar
  - dashboard
  - encryption
  - files_frommail
  - files_reader
  - groupfolders
  - keeweb
  - mail
  - ocsms
  - quota_warning
  - spreed
  - survey_client
  - twofactor_u2f
  - user_ldap
  - weather
  - workin2gether

Nextcloud configuration:


Config report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***\/cloud",
        "dbtype": "mysql",
        "version": "16.0.4.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "loglevel": 2,
        "htaccess.RewriteBase": "\/cloud",
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "overwritewebroot": "\/cloud",
        "overwritecondaddr": "^192.168.1.***REMOVED SENSITIVE VALUE***$"
    }
}

Are you using external storage, if yes which one: local with mount point in sftp...

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: FF latest

Operating system: Windows 10 latest

Logs

Web server error log

No error and no failures

Nextcloud log (data/nextcloud.log)

No error and no failures

Browser log


Browser log

TypeError: OC.filePath is not a function  viewer.js:23:29
    <anonyme> viewer.js:23
    Webpack 3
        o
        <anonyme>
        <anonyme>

TypeError: OC.getRootPath is not a function   backgroundjobs.js:24:12
    <anonyme> https://***REMOVED SENSITIVE VALUE***/cloud/core/js/backgroundjobs.js?v=12d6d8f7-3:24
    u https://***REMOVED SENSITIVE VALUE***/cloud/core/js/dist/main.js?v=12d6d8f7-3:39
    fireWith https://***REMOVED SENSITIVE VALUE***/cloud/core/js/dist/main.js?v=12d6d8f7-3:39
    ready https://***REMOVED SENSITIVE VALUE***/cloud/core/js/dist/main.js?v=12d6d8f7-3:39
    O https://***REMOVED SENSITIVE VALUE***/cloud/core/js/dist/main.js?v=12d6d8f7-3:39

0. Needs triage bug needs info

All 7 comments

I rollbacked to 16.0.3 and it's working well.

This is a JS change, roll forwards and hard refresh your cache deems the file was still cached for some reason. I just had the same issue

I had a related problem during the update. The web updater did not do anything except showing this error on the JS console:

update.js:44 Uncaught TypeError: OC.getRootPath is not a function
    at Object.start (update.js:44)
    at HTMLInputElement.<anonymous> (update.js:156)
    at HTMLInputElement.dispatch (search.js:29)
    at HTMLInputElement._.handle (search.js:29)

sudo -u www-data php ./occ upgrade worked fine. Afterwards this "inconvenience". Solution: Force page refresh in brower (usually SHIFT + F5). Thanks @exussum12, you saved my day!

Okay with you to close this report?

Hi,

I will retry with the new update because I'm still on the rollback.

I will do it when users will less need the instance.

I would imagine this would cause your users issues. They would all need to flush cache.

This ticket should be about cache control on js assets

Hi, I've the same issue when upgrading to last version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mama21mama picture mama21mama  路  3Comments

dl5rcw picture dl5rcw  路  3Comments

ChristophWurst picture ChristophWurst  路  3Comments

blackcrack picture blackcrack  路  3Comments

rullzer picture rullzer  路  3Comments