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

Can not start Pixelfed instance without OAUTH_ENABLED #32

Open
leogaggl opened this issue Jan 24, 2025 · 4 comments
Open

Can not start Pixelfed instance without OAUTH_ENABLED #32

leogaggl opened this issue Jan 24, 2025 · 4 comments

Comments

@leogaggl
Copy link

You can not seem to start the pixelfed instance with the environment setting of:

OAUTH_ENABLED=false

That's using the current pixelfed-glitch/pixelfed:develop Docker image.

php artisan route:cache

   LogicException 

  Unable to prepare route [oauth/token] for serialization. Another route has already been assigned name [passport.token].

  at vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php:248
    244▕             $route->name($this->generateRouteName());
    245▕ 
    246▕             $this->add($route);
    247▕         } elseif (! is_null($symfonyRoutes->get($name))) {
  ➜ 248▕             throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}].");
    249▕         }
    250▕ 
    251▕         $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute());
    252▕ 

      +18 vendor frames 

  19  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()
@aneillans
Copy link

Hmm, i've not been able to reproduce this - would you be able to share your config info ?

@leogaggl
Copy link
Author

Hmm, i've not been able to reproduce this - would you be able to share your config info ?

Thanks for picking this up @aneillans !

@Murazaki and I discovered this when troubleshooting MySQL connections over SSL. There is a chance this could be an interaction with something else though which makes it tricky.

However, as soon as I set OAUTH_ENABLED=false my Pixelfed web container will no longer start up and fail with:

2025-01-26 01:12:22 +00:00 - [entrypoint / 30-cache.sh] - (stdout) LogicException

2025-01-26 01:12:22 +00:00 - [entrypoint / 30-cache.sh] - (stdout) 

2025-01-26 01:12:22 +00:00 - [entrypoint / 30-cache.sh] - (stdout) Unable to prepare route [oauth/token] for serialization. Another route has already been assigned name [passport.token].

The problem is if I start up with OAUTH_ENABLED=true I am not able to log into the Pixelfed instance:

Image

@leogaggl
Copy link
Author

At this stage I do not require any OAUTH logins and would prefer this to be 'FALSE'.

@leogaggl
Copy link
Author

Some further debug info:

When starting the instance with OAUTH=true the actually error message after decoding the diagnostic details:

exception_report:ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?

However, when changing the OAUTH=false after starting the container the OATH error seems to be due to some problems with routes.

php artisan route:list

   Symfony\Component\HttpKernel\Exception\NotFoundHttpException 

  

  at vendor/laravel/framework/src/Illuminate/Foundation/Application.php:1396
    1392▕      */
    1393▕     public function abort($code, $message = '', array $headers = [])
    1394▕     {
    1395▕         if ($code == 404) {
  ➜ 1396▕             throw new NotFoundHttpException($message, null, 0, $headers);
    1397▕         }
    1398▕ 
    1399▕         throw new HttpException($code, $message, null, $headers);
    1400▕     }

      +2 vendor frames 
  3   app/Http/Controllers/GroupController.php:30

  4   [internal]:0
      App\Http\Controllers\GroupController::__construct()

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