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 when checkin and checkout asset - Expected_Checkin_Notification' (T_CONSTANT_ENCAPSED_STRING) #8746

Closed
samotelf opened this issue Nov 14, 2020 · 11 comments
Assignees

Comments

@samotelf
Copy link

samotelf commented Nov 14, 2020

Please confirm you have done the following before posting your bug report:

Describe the bug
Error when checking in and checking out asset after updating to v5.0.6

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

  • Snipe-IT Version Version v4.9.5 - build 4482
  • OS: [e.g. Ubuntu, CentOS] CentOS 7
  • Web Server: [e.g. Apache, IIS] Apache
  • PHP Version PHP 7.3.6 (cli) (built: May 28 2019 09:32:59) ( NTS )

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] 85.0.4183.121

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Error Messages

  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
  • Include any additional information you can find in storage/logs and your webserver's logs.
  • Include the output from php -m (this should display what modules you have enabled.)

Additional context

  • Is this a fresh install or an upgrade? - Upgrade
  • What OS and web server you're running Snipe-IT on - CentOS 7 + Apache
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) - Manual
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

Add any other context about the problem here.

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

Error when checking in and checking out assets.

(1/1) ParseError
syntax error, unexpected ''Expected_Checkin_Notification' (T_CONSTANT_ENCAPSED_STRING), expecting ')'

in mail.php line 77
at Filesystem->getRequire('/var/www/html/snipeit/resources/lang/en/mail.php')
in FileLoader.php line 123
at FileLoader->loadPath('/var/www/html/snipeit/resources/lang', 'en', 'mail')
in FileLoader.php line 67
at FileLoader->load('en', 'mail', '')
in Translator.php line 279
at Translator->load('
', 'mail', 'en')
in Translator.php line 191
at Translator->getLine('*', 'mail', 'en', 'Asset_Checkin_Notification', array())
in Translator.php line 126
at Translator->get('mail.Asset_Checkin_Notification', array(), 'en')
in helpers.php line 873
at trans('mail.Asset_Checkin_Notification')
in CheckinAssetNotification.php line 116
at CheckinAssetNotification->toMail(object(User))
in MailChannel.php line 51
at MailChannel->send(object(User), object(CheckinAssetNotification))
in NotificationSender.php line 146
at NotificationSender->sendToNotifiable(object(User), 'c2581ea3-59a8-4b6d-947f-033bd5c45481', object(CheckinAssetNotification), 'mail')
in NotificationSender.php line 105
at NotificationSender->Illuminate\Notifications{closure}()
in Localizable.php line 29
at NotificationSender->withLocale('en', object(Closure))
in NotificationSender.php line 107
at NotificationSender->sendNow(object(Collection), object(CheckinAssetNotification))
in NotificationSender.php line 79
at NotificationSender->send(object(Collection), object(CheckinAssetNotification))
in ChannelManager.php line 39
at ChannelManager->send(object(Collection), object(CheckinAssetNotification))
in Facade.php line 261
at Facade::__callStatic('send', array(object(Collection), object(CheckinAssetNotification)))
in CheckoutableListener.php line 88
at CheckoutableListener->onCheckedIn(object(CheckoutableCheckedIn))
at call_user_func_array(array(object(CheckoutableListener), 'onCheckedIn'), array(object(CheckoutableCheckedIn)))
in Dispatcher.php line 388
at Dispatcher->Illuminate\Events{closure}('App\Events\CheckoutableCheckedIn', array(object(CheckoutableCheckedIn)))
in Dispatcher.php line 218
at Dispatcher->dispatch('App\Events\CheckoutableCheckedIn')
in helpers.php line 477
at event(object(CheckoutableCheckedIn))
in AssetCheckinController.php line 115
at AssetCheckinController->store(object(AssetCheckinRequest), '1371', null)
at call_user_func_array(array(object(AssetCheckinController), 'store'), array(object(AssetCheckinRequest), 'assetId' => '1371', null))
in Controller.php line 54
at Controller->callAction('store', array(object(AssetCheckinRequest), 'assetId' => '1371', null))
in ControllerDispatcher.php line 45
at ControllerDispatcher->dispatch(object(Route), object(AssetCheckinController), 'store')
in Route.php line 219
at Route->runController()
in Route.php line 176
at Route->run()
in Router.php line 681
at Router->Illuminate\Routing{closure}(object(Request))
in Pipeline.php line 130
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in Authenticate.php line 43
at Authenticate->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in CreateFreshApiToken.php line 50
at CreateFreshApiToken->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in CheckForTwoFactor.php line 53
at CheckForTwoFactor->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in CheckLocale.php line 37
at CheckLocale->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in VerifyCsrfToken.php line 76
at VerifyCsrfToken->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in EncryptCookies.php line 66
at EncryptCookies->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in Pipeline.php line 105
at Pipeline->then(object(Closure))
in Router.php line 683
at Router->runRouteWithinStack(object(Route), object(Request))
in Router.php line 658
at Router->runRoute(object(Request), object(Route))
in Router.php line 624
at Router->dispatchToRoute(object(Request))
in Router.php line 613
at Router->dispatch(object(Request))
in Kernel.php line 170
at Kernel->Illuminate\Foundation\Http{closure}(object(Request))
in Pipeline.php line 130
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in InjectDebugbar.php line 65
at InjectDebugbar->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in SecurityHeaders.php line 26
at SecurityHeaders->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in TransformsRequest.php line 21
at TransformsRequest->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in CheckForDebug.php line 25
at CheckForDebug->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in CheckForSetup.php line 26
at CheckForSetup->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in TrustProxies.php line 57
at TrustProxies->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in StartSession.php line 56
at StartSession->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in CheckForMaintenanceMode.php line 63
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in HandlePreflight.php line 29
at HandlePreflight->handle(object(Request), object(Closure))
in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))
in Pipeline.php line 105
at Pipeline->then(object(Closure))
in Kernel.php line 145
at Kernel->sendRequestThroughRouter(object(Request))
in Kernel.php line 110
at Kernel->handle(object(Request))
in index.php line 58
1

@denzfarid
Copy link

denzfarid commented Nov 16, 2020

same with me
tesing on branch master and develop

image

checkin asset
ezgif com-video-to-gif(7)

checkout asset
ezgif com-video-to-gif(9)

image

but working in branch tag v5.0.6


snipeitapp@ip-172-31-2-220:~$ git branch
* (HEAD detached at v5.0.6)

@denzfarid
Copy link

@samotelf

Have you tried changing the branch to the tagged version?
i tried with the tag version, all works fine

git checkout v5.0.6

php artisan config:clear

php artisan cache:clear

@samotelf
Copy link
Author

Hello @denzfarid.
Actually, php upgrade.php didn't jump my v4.9.5 version to 5.0.6 as documented here:

I had to do:

sudo git fetch --all
sudo git reset --hard origin/master
php upgrade.php

And it installed v.5.0.6

Is this not enough?
(meanwhile I reverted my snapshot to v4.9.5, but I want to update it.)

@samotelf
Copy link
Author

I'll have to try this later.
Waiting for a fix but I guess someone had the solution:

Tzvika Zitzman @zitzman Nov 15 00:24
found the issue. there is a syntax error introduced in resources/lang/en/mail.php 2 days ago.
missing comma in line 76
be11417#diff-88e6b73f0c298ae952a2237b639b049ca0a11f6fb7f860801d4f01a39acec7af

@uberbrady
Copy link
Collaborator

I eyeballed that diff and that's correct; the comma is definitely missing. We'll get this fixed today.

@samotelf
Copy link
Author

Kudos for @zitzman
Thank you @uberbrady

@uberbrady
Copy link
Collaborator

My PR has been merged to both develop and master - if anyone can check it out and let us know if we're all set that'd be awesome!

@samotelf
Copy link
Author

@uberbrady I’ll clone my prod VM tomorrow and give it a try and will let know.
I just have to do a regular update right?

@uberbrady
Copy link
Collaborator

Yeah @samotelf, the regular upgrade.php will pull the latest from master.

@denzfarid
Copy link

denzfarid commented Nov 17, 2020

My PR has been merged to both develop and master - if anyone can check it out and let us know if we're all set that'd be awesome!

i have tried checking in / out and working again

thank you :D

@snipe
Copy link
Owner

snipe commented Nov 17, 2020

Awesome, thanks!

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

4 participants