LJPc-solutions / freescout-calendar-module

A calendar module for Freescout
20 stars 7 forks source link

Problem with module activation #45

Closed Shoplet-DRI closed 4 months ago

Shoplet-DRI commented 4 months ago

Hey, I tried to install the latest version of the module, according to the instructions, on my server. I am using Freescout on Docker. I added the module to the Modules folder. The plugin correctly appeared in the Modules tab in the management panel. I clicked Activate after which Freescout crashed.

Currently I am getting this error:

[2024-07-04 23:18:22] production.ERROR: Class "Modules\LJPcCalendarModule\Providers\LJPcCalendarModuleServiceProvider" not found {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Class \"Modules\LJPcCalendarModule\Providers\LJPcCalendarModuleServiceProvider\" not found at /www/html/overrides/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:279) [stacktrace]

0 /www/html/overrides/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(189): Illuminate\Foundation\ProviderRepository->createProvider('Modules\\LJPcCal...')

1 /www/html/overrides/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(70): Illuminate\Foundation\ProviderRepository->compileManifest(Array)

2 /www/html/vendor/nwidart/laravel-modules/src/Laravel/Module.php(27): Illuminate\Foundation\ProviderRepository->load(Array)

3 /www/html/overrides/nwidart/laravel-modules/src/Module.php(279): Nwidart\Modules\Laravel\Module->registerProviders()

4 /www/html/overrides/nwidart/laravel-modules/src/Repository.php(366): Nwidart\Modules\Module->register()

5 /www/html/vendor/nwidart/laravel-modules/src/Providers/BootstrapServiceProvider.php(22): Nwidart\Modules\Repository->register()

6 /www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(586): Nwidart\Modules\Providers\BootstrapServiceProvider->register()

7 /www/html/vendor/nwidart/laravel-modules/src/ModulesServiceProvider.php(38): Illuminate\Foundation\Application->register(Object(Nwidart\Modules\Providers\BootstrapServiceProvider))

8 /www/html/vendor/nwidart/laravel-modules/src/LaravelModulesServiceProvider.php(15): Nwidart\Modules\ModulesServiceProvider->registerModules()

9 [internal function]: Nwidart\Modules\LaravelModulesServiceProvider->boot()

10 /www/html/overrides/laravel/framework/src/Illuminate/Container/BoundMethod.php(28): call_user_func_array(Array, Array)

11 /www/html/overrides/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()

12 /www/html/overrides/laravel/framework/src/Illuminate/Container/BoundMethod.php(27): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))

13 /www/html/overrides/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)

14 /www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(792): Illuminate\Container\Container->call(Array)

15 /www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Foundation\Application->bootProvider(Object(Nwidart\Modules\LaravelModulesServiceProvider))

16 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(Object(Nwidart\Modules\LaravelModulesServiceProvider), 23)

17 /www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(774): array_walk(Array, Object(Closure))

18 /www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()

19 /www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))

20 /www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\Foundation\Application->bootstrapWith(Array)

21 /www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\Foundation\Http\Kernel->bootstrap()

22 /www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))

23 /www/html/public/index.php(82): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))

24 {main}

"}

Shoplet-DRI commented 4 months ago

The same error occurs periodically every literally 3 seconds.

Lars- commented 4 months ago

That happens when a module is incorrectly installed in freescout. I don’t say that you did something wrong, sometimes it just happens. It happened to me a few times with several modules when developing and it was quite hard to fix once the module was enabled…

The calendar module (v2) has been installed in quite a few installations now without any problems, so I am quite sure that this is related to your installation and not the module.

So this issue is probably more meant for the freescout core.

Shoplet-DRI commented 4 months ago

I don't have any modules other than the official ones from FreeScout. As I wrote, I added the module files to freescout/modules. It was only after activating it in the panel that the problem appeared.

Should I do something before installing/activating? Any suggestions what could have gone wrong during the process? I can list what modules from FreeScout I have active by default as long as it helps identify where the problem could have occurred.

Currently, I have removed the calendar module files from Modules and have been able to restore FreeScout, which is not throwing an error, but the accesses to the mailboxes previously hooked up to the system have gotten completely dumped. Probably a permissions issue.

Shoplet-DRI commented 4 months ago

By the way, the link on the module's home page is out of date. I downloaded the current version from the link described in Releases.

https://resources.ljpc.network/freescout-modules/calendar/latest.zip

Lars- commented 4 months ago

Like I said, I don’t say you did anything wrong. If you followed the instructions, I believe you haha. The issue you describe simply happens sometimes in freescout, I’ve seen it with some other modules (even official) as well. Maybe it’s a permission problem, but I’m not sure.

The link on the homepage is absolutely an issue, thank you for noticing! I will update that tomorrow.