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]: "Could not find resource text/js/.js to load" #46502

Closed
5 of 8 tasks
vasyugan opened this issue Jul 13, 2024 · 10 comments
Closed
5 of 8 tasks

[Bug]: "Could not find resource text/js/.js to load" #46502

vasyugan opened this issue Jul 13, 2024 · 10 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug

Comments

@vasyugan
Copy link

vasyugan commented Jul 13, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

Over the last two days, I see this message recurring over and over in the log:

{"reqId":"**","level":3,"time":"**","remoteAddr":"**","user":"**","app":"jsresourceloader","method":"GET","url":"/apps/files/","message":"Could not find resource text/js/.js to load","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0","version":"29.0.3.4","data":{"app":"jsresourceloader"},"id":"***"}

Steps to reproduce

This seems to be triggered whenever the affected user uses the files app

Expected behavior

There should be no such warning

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 28.0.1 to 28.0.2)

Are you using the Nextcloud Server Encryption module?

None

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": [
            "cloud.***.***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.3.4",
        "overwrite.cli.url": "https:\/\/cloud.***.***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "default_phone_region": "DE",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "forcessl": true,
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "activity_use_cached_mountpoints": "true",
        "htaccess.RewriteBase": "\/",
        "default_language": "de",
        "maintenance_window_start": 1,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false
    }
}

List of activated Apps

Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - announcementcenter: 6.8.1
  - bruteforcesettings: 2.9.0
  - calendar: 4.7.11
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - collectives: 2.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - dav: 1.30.1
  - deck: 1.13.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.0
  - files_antivirus: 5.5.6
  - files_confidential: 3.0.2
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_fulltextsearch: 29.0.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - forms: 4.2.4
  - fulltextsearch: 29.0.0
  - fulltextsearch_elasticsearch: 29.0.1
  - groupfolders: 17.0.1
  - htmlviewer: 29.2.0
  - impersonate: 1.16.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - nextcloud_announcements: 1.18.0
  - notes: 4.10.0
  - notifications: 2.17.0
  - notify_push: 0.6.12
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - photos: 2.5.0
  - polls: 7.1.3
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - richdocuments: 8.4.3
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - spreed: 19.0.5
  - support: 1.12.0
  - survey_client: 1.17.0
  - suspicious_login: 7.0.0
  - systemtags: 1.19.0
  - tables: 0.7.4
  - tasks: 0.16.0
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_nextcloud_notification: 3.9.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - dashboard: 7.9.0 (installed 7.9.0)
  - encryption: 2.17.0
  - user_ldap: 1.20.0
  - user_retention: 1.12.1 (installed 1.12.1)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"MI5hhqgaSfORUVVjzHOj","level":3,"time":"2024-07-12T15:40:59+00:00","remoteAddr":"*.*.*.*, user":"**","app":"jsresourceloader","method":"GET","url":"/apps/files/","message":"Could not find resource text/js/.js to load","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0","version":"29.0.3.4","data":{"app":"jsresourceloader"},"id":"66914eb922784"}

Additional info

No response

@vasyugan vasyugan added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jul 13, 2024
@yward
Copy link

yward commented Jul 23, 2024

I had the same issue in nextcloud AIO
Turned out this is not a server issue, it's an app issue caused by the app "htmlviewer" the app is not commonly used as such the low number of reports.

I believe this should be posted in the app repo instead.

@skjnldsv skjnldsv closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2024
@skjnldsv
Copy link
Member

I believe this should be posted in the app repo instead.

☝️

@ninjazan420
Copy link

I had the same issue in nextcloud AIO Turned out this is not a server issue, it's an app issue caused by the app "htmlviewer" the app is not commonly used as such the low number of reports.

I believe this should be posted in the app repo instead.

Being curious, how did you find the source of this error since there are no further informations in the logs?

@yward
Copy link

yward commented Jul 27, 2024

I had the same issue in nextcloud AIO Turned out this is not a server issue, it's an app issue caused by the app "htmlviewer" the app is not commonly used as such the low number of reports.
I believe this should be posted in the app repo instead.

Being curious, how did you find the source of this error since there are no further informations in the logs?

We opted not to use the app causing the error as we have other more secure ways to display html/php content (there is an app that allows you to display external links as iframe apps, as long as your remote server is secure and maintained by and you account from cross site vulnerabilities, it should be a safer way to go).

@yward
Copy link

yward commented Jul 27, 2024

I had the same issue in nextcloud AIO Turned out this is not a server issue, it's an app issue caused by the app "htmlviewer" the app is not commonly used as such the low number of reports.
I believe this should be posted in the app repo instead.

Being curious, how did you find the source of this error since there are no further informations in the logs?

@ninjazan420 basic plugin/app troubleshooting, clear the log disable all apps and enabled one by one while checking the log with each activation, and isolate the app that triggers it

@ninjazan420
Copy link

I had the same issue in nextcloud AIO Turned out this is not a server issue, it's an app issue caused by the app "htmlviewer" the app is not commonly used as such the low number of reports.
I believe this should be posted in the app repo instead.

Being curious, how did you find the source of this error since there are no further informations in the logs?

We opted not to use the app causing the error as we have other more secure ways to display html/php content (there is an app that allows you to display external links as iframe apps, as long as your remote server is secure and maintained by and you account from cross site vulnerabilities, it should be a safer way to go).

Alright, thank you very much :)

@devnoname120
Copy link

devnoname120 commented Nov 25, 2024

The culprit is in the htmlviewer app, file lib/Listeners/LoadViewerListener.php, line 53:

            Util::addScript('text', null, Application::APP_ID);

https://git.mdns.eu/nextcloud/htmlviewer/-/blob/ac29e6a7cfe867dea3c87afe37d89ac15e272151/lib/Listeners/LoadViewerListener.php#L53

Maybe it's just an oversight?

cc @marius-wieschollek

@marius-wieschollek
Copy link
Contributor

This is not an oversight, it's so i can force NC to load the app after mine and i can register a handler for html files.

@devnoname120
Copy link

devnoname120 commented Nov 25, 2024

@marius-wieschollek Pardon my ignorance but where can I Iearn more about the text app? I couldn't find a reference to it.

Edit: https://github.com/nextcloud/text

@joshtrichards
Copy link
Member

joshtrichards commented Jan 7, 2025

Being curious, how did you find the source of this error since there are no further informations in the logs?

I tried to see if I could enhance the logging this morning (to log the original app that registered the script). It doesn't look like we can log the original app in the ResourceLocator. The check (and associated logging) is too far along. All we have at that point is the path to the script.

This is not an oversight, it's so i can force NC to load the app after mine and i can register a handler for html files.

We have similar issues rich richdocuments and onlyoffice. One quick hack might be something like nextcloud/text#2448 (or even nextcloud/richdocuments#2301).

Maybe we can come up with a better way of prioritizing handler registration - e.g.

  • by having some apps (like Viewer and Text) automatically defer to any other apps that are installed.
  • by exposing the handling as a setting (in a consistent way rather than in each app) when there are multiple potential handlers available for a given type

Hmm... actually looks like we've got two Issues covering this area so let's move there:

nextcloud/viewer#2393
#5065

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 29-feedback bug
Projects
None yet
Development

No branches or pull requests

8 participants