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

fixed an error which occured when a modem for contract was created when module ProvMon is not installed #4

Closed
wants to merge 1 commit into from

Conversation

m4y4-dev
Copy link

@m4y4-dev m4y4-dev commented Dec 7, 2023

When creating a mode for contract the error below occured.
This pull request fixes that error by simply checking if module ProvMon is enabled before calling ..\PushModemAddressToPostgresql(..) in modules/ProvBase/Observers/ModemObserver.php.

local.ERROR: include(/var/www/nmsprime/vendor/composer/../../modules/ProvMon/Jobs/PushModemAddressToPostgresql.php): Failed to open stream: Permission denied {"userId":2,"exception":"[object] (ErrorException(code: 0): include(/var/www/nmsprime/vendor/composer/../../modules/ProvMon/Jobs/PushModemAddressToPostgresql.php): Failed to open stream: Permission denied at /var/www/nmsprime/vendor/composer/ClassLoader.php:571)
[stacktrace]
#0 /var/www/nmsprime/vendor/composer/ClassLoader.php(571): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/nmsprime/vendor/composer/ClassLoader.php(571): include()
#2 /var/www/nmsprime/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#3 /var/www/nmsprime/modules/ProvBase/Observers/ModemObserver.php(167): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(389): Modules\ProvBase\Observers\ModemObserver->updated()
#5 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(218): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
#6 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(189): Illuminate\Events\Dispatcher->dispatch()
#7 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(750): Illuminate\Database\Eloquent\Model->fireModelEvent()
#8 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(661): Illuminate\Database\Eloquent\Model->performUpdate()
#9 /var/www/nmsprime/app/BaseModel.php(858): Illuminate\Database\Eloquent\Model->save()
#10 /var/www/nmsprime/modules/ProvBase/Observers/ModemObserver.php(52): App\BaseModel->save()
#11 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(389): Modules\ProvBase\Observers\ModemObserver->created()
#12 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(218): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
#13 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(189): Illuminate\Events\Dispatcher->dispatch()
#14 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(826): Illuminate\Database\Eloquent\Model->fireModelEvent()
#15 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(668): Illuminate\Database\Eloquent\Model->performInsert()
#16 /var/www/nmsprime/app/BaseModel.php(858): Illuminate\Database\Eloquent\Model->save()
#17 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(774): App\BaseModel->save()
#18 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Support/helpers.php(422): Illuminate\Database\Eloquent\Builder->Illuminate\Database\Eloquent\{closure}()
#19 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(775): tap()
#20 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php(23): Illuminate\Database\Eloquent\Builder->create()
#21 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1622): Illuminate\Database\Eloquent\Model->forwardCallTo()
#22 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1634): Illuminate\Database\Eloquent\Model->__call()
#23 /var/www/nmsprime/app/Http/Controllers/BaseController.php(971): Illuminate\Database\Eloquent\Model::__callStatic()
#24 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\BaseController->api_store()
#25 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction()
#26 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch()
#27 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\Routing\Route->runController()
#28 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\Routing\Route->run()
#29 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#30 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authorize.php(45): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#31 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Auth\Middleware\Authorize->handle()
#32 /var/www/nmsprime/app/Http/Middleware/SetLanguage.php(46): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#33 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): App\Http\Middleware\SetLanguage->handle()
#34 /var/www/nmsprime/app/Http/Middleware/AuthenticateNmsPrimeApi.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#35 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): App\Http\Middleware\AuthenticateNmsPrimeApi->handle()
#36 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#37 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Routing\Middleware\SubstituteBindings->handle()
#38 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#39 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\Pipeline\Pipeline->then()
#40 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Router->runRouteWithinStack()
#41 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\Routing\Router->runRoute()
#42 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\Routing\Router->dispatchToRoute()
#43 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\Routing\Router->dispatch()
#44 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#45 /var/www/nmsprime/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#46 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\Proxy\TrustProxies->handle()
#47 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#48 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#49 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#50 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#51 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#52 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#53 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#54 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()
#55 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#56 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\Pipeline\Pipeline->then()
#57 /var/www/nmsprime/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#58 /var/www/nmsprime/public/index.php(61): Illuminate\Foundation\Http\Kernel->handle()
#59 {main}
"}

@m4y4-dev m4y4-dev closed this Aug 22, 2024
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

Successfully merging this pull request may close these issues.

1 participant