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

Missing Port Number in JS Script Requests Causes Access Failure #1047

Open
Xuwznln opened this issue Nov 27, 2024 · 3 comments
Open

Missing Port Number in JS Script Requests Causes Access Failure #1047

Xuwznln opened this issue Nov 27, 2024 · 3 comments

Comments

@Xuwznln
Copy link

Xuwznln commented Nov 27, 2024

Hello, I encountered an issue where certain JS script requests fail due to the absence of the port number in the host address.

My Nextcloud host address is: https://A:3000/. However, after opening a new OnlyOffice file, I observed through the developer tools that the requested address is https://A/, which omits the port number. This mismatch causes an access failure and prevents the application from functioning correctly.

Could you please investigate and resolve this issue by ensuring the port number is included in the requested addresses? Thank you!

@SergeyKorneyev
Copy link

Hello,
We've tested the scenario using a custom port for Nextcloud and haven't been able to reproduce the issue. File URLs are created using internal methods, so it's possible that in your case the Nextcloud instance is not properly configured to use a custom port. Please check if your network configuration for is correct, including any relevant parameters in config.php.

Alternatively, you could try specifying the correct Nextcloud address in the "Advanced server settings" section of the ONLYOFFICE connector's settings.

@Xuwznln
Copy link
Author

Xuwznln commented Dec 23, 2024

Hi, thanks for your reply and I re-checked the config /var/www/html/config/config.php in my nextcloud-aio instance. Keys like overwrite.cli.url, overwritehost, trusted_domains are all configured with the same custom port. I also tried advanced server setting with config:
doc address: https://A:5500/onlyoffice/
internal server to onlyoffice doc: http://nextcloud-aio-onlyoffice/
onlyoffice doc to internal server: https://A:5500/
The above config is saved without error.

I also checked the error request, here is the request initator chain from web dev tool:
image
all assets and js loaded correctly with port address except for the file.
Any idea with the problem?

@Xuwznln
Copy link
Author

Xuwznln commented Jan 5, 2025

Hello, I carefully checked the request, which originates from the WebSocket (wss) and has the following payload:

[
  "message",
  {
    "type": "documentOpen",
    "data": {
      "type": "open",
      "status": "ok",
      "data": {
        "Editor.bin": "https://A/onlyoffice/.../&filename=Editor.bin"
      },
      "openedAt": 1736125745656
    }
  }
]
  • The documentCallbackUrl is:
    https://nc.v6s.wznln.com:5500
    
    It seems to be functioning correctly:
    • Type auth is OK.
    • All other assets appear fine.

Findings

Upon further investigation, I checked the following file: [utils.js line 747]

Here are some relevant observations:

  • For nextcloud-aio-apache:
    • Caddy & Apache host and forwarded host seem to work as expected.
  • For nextcloud-aio-onlyoffice, I found the following error log:
    2025/01/05 17:09:18 [error] 1218#1218: *29 open() "/var/www/onlyoffice/documentserver/web-apps/vendor/socketio/socket.io.min.js.map" failed (2: No such file or directory), 
    client: 172.18.0.10, 
    server: , 
    request: "GET /8.2.2-91f758dde697b85027627488c6598865/web-apps/vendor/socketio/socket.io.min.js.map HTTP/1.1", 
    host: "A:5500"
    
    • This indicates that the host is OK.

Questions

  1. What additional checks should I perform to debug this issue?
  2. How can I access the logs generated by ctx.getlogger.debug() to gather more details about the error?

Thank you for your assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants