puter icon indicating copy to clipboard operation
puter copied to clipboard

Bug: Missing /lib/jquery.menu-aim.js and API 404 Errors Prevent Proper Start of Puter OS

Open masdeirf opened this issue 1 year ago • 1 comments

Issue Description

Description I am encountering persistent issues while attempting to run Puter OS using the latest Docker image. Despite correct configurations and successful startup logs, the application does not function properly and shows a blank purple screen in the browser. Environment • Host: Synology NAS • Docker Management: Portainer • Puter OS Image: ghcr.io/heyputer/puter:latest • Docker Compose Configuration:

services:
  puter-os:
    container_name: puter-os
    hostname: puter-os
    image: [ghcr.io/heyputer/puter:latest](http://ghcr.io/heyputer/puter:latest)
    restart: always
    ports:
      - "4100:4100"
    volumes:
      - /volume1/docker/puter-os/config.json:/opt/puter/app/volatile/config/config.json
      - /volume1/docker/puter-os/puter-database.sqlite:/opt/puter/app/volatile/runtime/puter-database.sqlite
      - /volume1/docker/puter-os:/data
    environment:
      TZ: "Europe/Berlin"
      PUID: "1034"
      PGID: "100"
      PUBLIC_URL: "http://192.168.0.222:4100"
      ALLOWED_HOSTS: "*"
      DISABLE_HOST_CHECK: "true"
      NODE_ENV: "development"
**•	config.json** 
    {
    "config_name": "my-config",
    "env": "dev",
    "nginx_mode": true,
	"server_id": "192.168.0.222",
	"http_port": "4100",
	"domain": "192.168.0.222",
    "protocol": "http",
    "contact_email": "[email protected]",
    "services": {
        "database": {
            "engine": "sqlite",
            "path": "puter-database.sqlite"
        },
        "thumbnails": {
            "engine": "purejs"
        },
        "file-cache": {
            "disk_limit": 16384,
            "disk_max_size": 16384,
            "precache_size": 16384,
            "path": "./file-cache"
        }
    },
    "cookie_name": "e6d3b7c9-7510-4623-ae5a-4bf43237e742",
    "jwt_secret": "b95e70fd-7ee6-4f75-887b-887d47194af6",
    "url_signature_secret": "2a84f658-0dd0-4317-8367-16b8c732b050"
}

Observed Issues

  1. 404 Not Found for API Endpoints When accessing the /api/serverinfo endpoint, the server responds with 404 Not Found:
curl -i -H "Host: 192.168.0.222" http://192.168.0.222:4100/api/serverinfo HTTP/1.1 404 Not Found Content-Type: text/html; charset=utf-8 Content-Length: 11 Connection: keep-alive 
Browser Console Errors:
Failed to fetch server info: DOMException: XMLHttpRequest.open: 'http://api.192.168.0.222:4100/version' is not a valid URL.
  2. Missing jquery.menu-aim.js The browser requests /lib/jquery.menu-aim.js, which fails with a MIME-type error:
The resource at "http://192.168.0.222:4100/lib/jquery.menu-aim.js" was blocked due to MIME type conflict ("text/html"). Attempts to locate the file inside the container show it does not exist:
sudo docker exec -it puter-os find /opt/puter -name "jquery.menu-aim.js"

No results

Steps to reproduce

Observed Issues

  1. 404 Not Found for API Endpoints When accessing the /api/serverinfo endpoint, the server responds with 404 Not Found:
curl -i -H "Host: 192.168.0.222" http://192.168.0.222:4100/api/serverinfo HTTP/1.1 404 Not Found Content-Type: text/html; charset=utf-8 Content-Length: 11 Connection: keep-alive 
Browser Console Errors:
Failed to fetch server info: DOMException: XMLHttpRequest.open: 'http://api.192.168.0.222:4100/version' is not a valid URL.
  2. Missing jquery.menu-aim.js The browser requests /lib/jquery.menu-aim.js, which fails with a MIME-type error:
The resource at "http://192.168.0.222:4100/lib/jquery.menu-aim.js" was blocked due to MIME type conflict ("text/html"). Attempts to locate the file inside the container show it does not exist:
sudo docker exec -it puter-os find /opt/puter -name "jquery.menu-aim.js"

No results

Expected behaviour

No response

Addition Information or Screenshots (if applicable)

General Behavior • The UI only displays a blank purple screen. • No critical errors are reported in the container logs. Steps to Reproduce 1. Deploy Puter OS using the provided Docker Compose configuration. 2. Access the UI via http://192.168.0.222:4100. 3. Inspect the browser console and network logs for errors. Expected Behavior The application should load successfully with API endpoints accessible and no missing dependencies. Additional Context • Database initialization succeeded, and all tables exist. • The PUBLIC_URL, ALLOWED_HOSTS, and DISABLE_HOST_CHECK are configured properly. Logs • Relevant Docker logs show no critical errors. • Browser Console logs indicate issues with the /api endpoint and missing jquery.menu-aim.js. Summary of Troubleshooting Steps Already Performed 1. Configuration Validation • Verified and corrected config.json with proper values for PUBLIC_URL, ALLOWED_HOSTS, and DISABLE_HOST_CHECK. • Ensured the config file is correctly mapped into the container. 2. Database Initialization • Confirmed the SQLite database exists and contains the required tables (app_filetype_association and others). • Checked that the database is correctly mounted into the container at /opt/puter/app/volatile/runtime/puter-database.sqlite. 3. Container and Environment Checks • Rebuilt and restarted the container multiple times. • Ensured permissions on volumes (config.json and database) are set correctly. 4. Network and Endpoint Verification • Checked curl responses for the API endpoints (/api/serverinfo), which return a 404 Not Found. • Verified that the container is listening on port 4100. 5. File and Asset Debugging • Confirmed that /lib/jquery.menu-aim.js does not exist in the container filesystem. • Ensured this file is not referenced in the latest GitHub repository. 6. Logs and Console Errors • No critical errors in Docker container logs. • Browser Console indicates 404 errors on API endpoints and missing assets.

Deployment

  • [ ] Production (puter.com)
  • [ ] Development (npm run start)
  • [ ] Docker (via docker run)
  • [X] Docker (via docker-compose)

Puter version

last

Despite all the above steps, the UI remains blank (purple screen), and critical API endpoints like /api/serverinfo fail with 404 Not Found.

masdeirf avatar Dec 18 '24 21:12 masdeirf

@jelveh: ist this bug fixed?

masdeirf avatar Jul 14 '25 07:07 masdeirf