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

Class auth does not exist Error on install #54

Open
snakemastr opened this issue Jan 27, 2021 · 5 comments
Open

Class auth does not exist Error on install #54

snakemastr opened this issue Jan 27, 2021 · 5 comments

Comments

@snakemastr
Copy link

During install I get the following error for each plugin and later on in october:fresh command

Error running "php artisan plugin:install OFFLINE.Mall" command:
In Container.php line 752:
   Class auth does not exist

Am I missing a plugin or setting? I had a issue with Auth guard when October was updated to Laravel 6, could this be related?
This is my october.yaml

app:
    name: october-webshop           # Give this project a unique name
    url: http://webshop.local
    locale: en
    debug: true

cms:
    theme: webshop
    edgeUpdates: false
    disableCoreUpdates: false
    enableSafeMode: false

database:
    connection: mysql
    host: mysql
    port: 3306
    username: root
    password: secret
    database: october

git:
    deployment: false       # Change to "gitlab" for a GitLab CI Setup
    bareRepo: true          # Exclude everything except themes and custom plugins in git
    excludePlugins: false   # Even exclude plugins from your repo. Private plugins will be
                            # checkout out again during each "install" run. Be careful!
                            # Manual changes to these plugins will be overwritten.

# deployment:
#     user: hostinguser
#     server: servername

plugins:
    - Mohsin.OAuth2
    - Octobro.Api
    - OFFLINE.Mall
    - Vdomah.JWTAuth

mail:
    host: smtp.mailgun.org
    name: User Name
    address: [email protected]
    driver: log

@snakemastr
Copy link
Author

Plugin dependencies are also not installed, but it should according to the OctoberCMS documentation?
In my case Moshin.Oauth2 requires Moshin.Auth but the dependency is not installed. The plugin itself is installed without errors.

I am not sure what to expect. I have check the example and october-tricks example but could not find dependencies being marked as separate plugins.

@tobias-kuendig
Copy link
Member

Does it work if you remove all pugisn from the yaml file? Without a stack track, this error could come from everywhere.

You can try and run php artisan plugin:install -v OFFLINE.Mall manually, this should give you some more insights.

@snakemastr
Copy link
Author

snakemastr commented Jan 28, 2021

Thank you for replying.
It looks like it really is dependency related. I installed with only OFFLINE.Mall plugin: no errors but also no RainLab dependencies installed. Then I enabled all original plugins and the problem appeared as soon as I added Mohsin.OAuth2.
So I add it's only dependency Mohsin.Auth and now I am missing the dependency off Mohsin.Auth which is Mohsin.Rest.

I know installing a plugin with OctoberCMS will try to install plugin dependencies.

Unfortunately I can't get access to the logs and stacktraces. I tried mounting logs and bash while it's installing but to no avail.

Edit: installed without Mohsin and OFFLINE.Mall and got the app working. Then installed OFFLINE.Mall with plugin manager that in turn installed the dependencies. Added Mohsin to the october.yaml; no dependency.

@snakemastr
Copy link
Author

I expected artisan plugin:install to install Plugin::$require dependencies but it turns out that's just a feature on the backend installation. The backend uses a callback onInstallPlugins to get all the required plugins and adds them as buildsteps.

Because I saw in this repo the example config with only OFFLINE.Mall without it's RainLab dependencies, I figured either the artisan command or this package would take of that.

Is my conclusion correct?
If so, any chance this bootstrapper will be getting a feature like that?

@alxy
Copy link

alxy commented Feb 7, 2021

I hink you are right, you need to install the dependencies explicitly. Here is an october.yaml that should work to install October.Mall along with its dependencies.

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

3 participants