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

Error: "Please check URL" #265

Open
dlmw opened this issue Jan 4, 2025 · 0 comments
Open

Error: "Please check URL" #265

dlmw opened this issue Jan 4, 2025 · 0 comments

Comments

@dlmw
Copy link

dlmw commented Jan 4, 2025

I have the following Docker compose:

services:
  barcodebuddy:
    image: f0rc3/barcodebuddy:v1.8.1.8
    deploy:
      placement:
        constraints:
          - "node.labels.barcodebuddy==true"
    volumes:
      - barcodebuddy-config:/config
    networks:
      - reverse-proxy-network
      - grocy-network
    depends_on:
      - grocy-frontend
      - backend

  grocy-frontend:
    image: "grocy/frontend:v4.2.0"
    deploy:
      placement:
        constraints:
          - "node.labels.grocy-frontend==true"
    networks:
      - reverse-proxy-network
      - grocy-network
    depends_on:
      - backend

  backend:
    image: "grocy/backend:v4.2.0"
    deploy:
      placement:
        constraints:
          - "node.labels.grocy-backend==true"
    volumes:
      - backend-db:/var/www/data
    environment:
      GROCY_MODE: production
      GROCY_CULTURE: fr
    networks:
      - grocy-network

volumes:
  barcodebuddy-config:
  backend-db:

networks:
  reverse-proxy-network:
    external: true
  grocy-network:

And here's my relevant Caddyfile configuration:

grocy.mydomain.com {
    reverse_proxy grocy-frontend:8080
}

barcode.grocy.mydomain.com {
    reverse_proxy barcodebuddy:80
}

Whenever I scan something, I get the following toast: Error: Unknown error occurred. Please check URL.. In the Barcode Buddy settings, it reports that the connection to Grocy is successful. Going to https://grocy.mydomain.com/api gives me the Swagger UI, but going to https://grocy.mydomain.com/api/ (note the trailing slash) gives me a 404 with the following JSON:

{
  "error_message": "Not found.",
  "error_details": {
    "stack_trace": "#0 \/var\/www\/packages\/slim\/slim\/Slim\/Middleware\/RoutingMiddleware.php(44): Slim\\Middleware\\RoutingMiddleware->performRouting()\n#1 \/var\/www\/packages\/slim\/slim\/Slim\/MiddlewareDispatcher.php(121): Slim\\Middleware\\RoutingMiddleware->process()\n#2 \/var\/www\/packages\/slim\/slim\/Slim\/Middleware\/ErrorMiddleware.php(76): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#3 \/var\/www\/packages\/slim\/slim\/Slim\/MiddlewareDispatcher.php(121): Slim\\Middleware\\ErrorMiddleware->process()\n#4 \/var\/www\/middleware\/CorsMiddleware.php(27): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#5 \/var\/www\/packages\/slim\/slim\/Slim\/MiddlewareDispatcher.php(269): Grocy\\Middleware\\CorsMiddleware->__invoke()\n#6 \/var\/www\/packages\/slim\/slim\/Slim\/MiddlewareDispatcher.php(65): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#7 \/var\/www\/packages\/slim\/slim\/Slim\/App.php(199): Slim\\MiddlewareDispatcher->handle()\n#8 \/var\/www\/packages\/slim\/slim\/Slim\/App.php(183): Slim\\App->handle()\n#9 \/var\/www\/app.php(112): Slim\\App->run()\n#10 \/var\/www\/public\/index.php(45): require_once('...')\n#11 {main}",
    "file": "\/var\/www\/packages\/slim\/slim\/Slim\/Middleware\/RoutingMiddleware.php",
    "line": 76
  }
}
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

1 participant