Closed WELLBOREIS closed 3 years ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
[2020-10-20 17:59:55] develop.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Laravel\Passport\Passport::withCookieSerialization() in C:\inetpub\wwwroot\Snipe-IT\app\Providers\AuthServiceProvider.php:92 Stack trace:
[2020-10-20 17:59:55] develop.ERROR: Call to undefined method Laravel\Passport\Passport::withCookieSerialization() {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined method Laravel\Passport\Passport::withCookieSerialization() at C:\inetpub\wwwroot\Snipe-IT\app\Providers\AuthServiceProvider.php:92) [stacktrace]
"} [2020-10-20 17:59:56] develop.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Laravel\Passport\Passport::withCookieSerialization() in C:\inetpub\wwwroot\Snipe-IT\app\Providers\AuthServiceProvider.php:92 Stack trace:
[2020-10-20 17:59:56] develop.ERROR: Call to undefined method Laravel\Passport\Passport::withCookieSerialization() {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined method Laravel\Passport\Passport::withCookieSerialization() at C:\inetpub\wwwroot\Snipe-IT\app\Providers\AuthServiceProvider.php:92) [stacktrace]
"} [2020-10-20 17:59:56] develop.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Laravel\Passport\Passport::withCookieSerialization() in C:\inetpub\wwwroot\Snipe-IT\app\Providers\AuthServiceProvider.php:92 Stack trace:
[2020-10-20 17:59:56] develop.ERROR: Call to undefined method Laravel\Passport\Passport::withCookieSerialization() {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined method Laravel\Passport\Passport::withCookieSerialization() at C:\inetpub\wwwroot\Snipe-IT\app\Providers\AuthServiceProvider.php:92) [stacktrace]
"} [2020-10-20 17:59:57] develop.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Laravel\Passport\Passport::withCookieSerialization() in C:\inetpub\wwwroot\Snipe-IT\app\Providers\AuthServiceProvider.php:92 Stack trace:
[2020-10-20 17:59:57] develop.ERROR: Call to undefined method Laravel\Passport\Passport::withCookieSerialization() {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined method Laravel\Passport\Passport::withCookieSerialization() at C:\inetpub\wwwroot\Snipe-IT\app\Providers\AuthServiceProvider.php:92) [stacktrace]
"}
Unfortunately, nbently's solution does not pertain to me (that I can see anyways). Here is the content of my .env:
APP_ENV=production APP_DEBUG=true APP_KEY=base64:wb9EC/gOcNxxxAwh0IXite204T8zGTZFCIvgYwMlcg= APP_URL=ITAM.XXXXXXXX.net APP_TIMEZONE='America/Chicago' APP_LOCALE=en MAX_RESULTS=500
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_DATABASE=Snipe-IT DB_USERNAME=Snipe-IT DB_PASSWORD=nunyabizness DB_PREFIX=null DB_DUMP_PATH='C:\Program Files\MariaDB 10.5\bin' DB_CHARSET=utf8mb4 DB_COLLATION=utf8mb4_unicode_ci
DB_SSL=false DB_SSL_IS_PAAS=false DB_SSL_KEY_PATH=null DB_SSL_CERT_PATH=null DB_SSL_CA_PATH=null DB_SSL_CIPHER=null
MAIL_DRIVER=smtp MAIL_HOST=USHO1-AT01.XXXXXXX.net MAIL_PORT=587 MAIL_USERNAME=XXXXXXXX\svc-SnipeIT MAIL_PASSWORD=nunyabizness MAIL_ENCRYPTION=TLS MAIL_FROM_ADDR=ITAssets@XXXXXXXXXX.com MAIL_FROM_NAME='XXX IT Asset Management System' MAIL_REPLYTO_ADDR=ITAssets@XXXXXXXXXX.com MAIL_REPLYTO_NAME='XXX IT Asset Management System' MAIL_BACKUP_NOTIFICATION_ADDRESS=ITAssets@XXXXXXXXXXXX.com
IMAGE_LIB=gd
SESSION_LIFETIME=12000 EXPIRE_ON_CLOSE=false ENCRYPT=false COOKIE_NAME=snipeit_session COOKIE_DOMAIN=null SECURE_COOKIES=false
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1 ALLOW_IFRAMING=false REFERRER_POLICY=same-origin ENABLE_CSP=false CORS_ALLOWED_ORIGINS=null ENABLE_HSTS=false
CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync CACHE_PREFIX=snipeit
REDIS_HOST=null REDIS_PASSWORD=null REDIS_PORT=null
MEMCACHED_HOST=null MEMCACHED_PORT=null
AWS_SECRET=null AWS_KEY=null AWS_REGION=null AWS_BUCKET=null
LOGIN_MAX_ATTEMPTS=5 LOGIN_LOCKOUT_DURATION=60
APP_LOG=single APP_LOG_MAX_FILES=10 APP_LOCKED=false FILESYSTEM_DISK=local APP_CIPHER=AES-256-CBC GOOGLE_MAPS_API= BACKUP_ENV=true LDAP_MEM_LIM=500M LDAP_TIME_LIM=600
I just downloaded the newest .env.example, put my values in and replaced my old .env and still getting the same error.
Tried creating new App Key. Got the same error when trying to generate the key.
I changed ‘C:\Program Files\Maria DB 10.5.bin’ to ‘null’ for the DB_DUMP_PATH, reran php upgrade.php and error went away. Site came back up. Now just need to figure out why my dump path didn’t work.
Had to change ‘C:\Program Files\Maria DB 10.5\bin’ to ‘C:\\PROGRA~1\\MariaDB 10.5\\bin’. Reran php upgrade.php and now need to fix error: “Copy failed - you should do this manually by copying the files from public/uploads into the storage/app/public directory.”
Copied files as stated above, but still getting error and logos, pictures, etc. still missing from site.
Had similar issues with the pictures. have you checked your folder /public/uploads if it contains any files? In my case it was empty so what I did was copy all contents from /storage/app/public to the new folder and it worked. My command under Linux was:
cp -r /var/www/snipeit/storage/app/public/. /var/www/snipeit/public/uploads/
@hyprem I just tried that again and still no luck. Now, even if I upload our logo, lets say, the image still wont show on the page, but I can see the file in public/uploads. Seems that the page may not be referencing back to the image correctly.
@hyprem, So what it's doing is using src="ITAM.xxxxxxxxx.net/uploads/setting-logo-XIUo6hWdJQ.png" instead of just /uploads/setting-logo-XIUo6hWdJQ.png. Not sure where to fix that.
@WELLBOREIS I think it is probably referencing the image correctly. The full path would include your machine's hostname. Can you confirm that the public/uploads
directory does indeed have files in it?
@nbently it does
This is fairly resolved. Other tickets are open for images, etc.
You shouldn’t need to use app/storage/public though. We spent weeks making sure that wouldn’t be a thing people had to do. :(
Please confirm you have done the following before posting your bug report:
Describe the bug A clear and concise description of what the bug is. Upgrading to version 5 leaves me with a blank web interface and errors in PowerShell
To Reproduce Steps to reproduce the behavior: php upgrade.php
Expected behavior A clear and concise description of what you expected to happen. Software upgrades and runs wonderfully to version 5
Screenshots If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
Desktop (please complete the following information):
Smartphone (please complete the following information):
Error Messages
storage/logs
and your webserver's logs.Additional context
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.
`PS C:\inetpub\wwwroot\Snipe-IT> php upgrade.php Skipping user check as it is not supported on Windows Welcome to the Snipe-IT upgrader.
Please note that this script will not download the latest Snipe-IT files for you unless you have git installed. It simply runs the standard composer and artisan commands needed to finalize the upgrade after.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! If you have any encrypted custom fields, BE SURE TO run the recrypter if upgrading from v3 to v4. !! See the Snipe-IT documentation for help: !! https://snipe-it.readme.io/docs/upgrading-to-v4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
STEP 1: Checking PHP requirements:
Current PHP version: 7.4.11
PHP version: 7.4.11 is at least 7.1.3 - continuing...
STEP 2: Backing up database:
The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin'].
STEP 3: Putting application into maintenance mode:
The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin'].
STEP 4: Pulling latest from Git (master branch):
Git is installed. Already on 'master' -- -- Saved working directory and index state WIP on master: 870b097f0 Derp. Should be master -- D public/uploads/.gitignore D public/uploads/.gitkeep D public/uploads/accessories/.gitignore D public/uploads/accessories/.gitkeep D public/uploads/assets/.gitignore D public/uploads/assets/.gitkeep D public/uploads/avatars/.gitignore D public/uploads/barcodes/.gitkeep D public/uploads/barcodes/invalid_barcode.gif D public/uploads/categories/.gitignore D public/uploads/companies/.gitignore D public/uploads/components/.gitignore D public/uploads/consumables/.gitignore D public/uploads/departments/.gitignore D public/uploads/locations/.gitignore D public/uploads/manufacturers/.gitignore D public/uploads/models/.gitignore D public/uploads/suppliers/.gitignore Your branch is up to date with 'origin/master'. -- Already up to date.
Step 5: Cleaning up old cached files:
-- No bootstrap/cache/compiled.php, so nothing to delete. -- No bootstrap/cache/services.php, so nothing to delete. -- No bootstrap/cache/config.php, so nothing to delete. The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin']. The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin']. The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin']. The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin'].
Step 6: Updating composer dependencies: (This may take an moment.)
-- We couldn't find a local composer.phar - trying globally.
Deprecation Notice: Class ParsedownTest located in C:/inetpub/wwwroot/Snipe-IT/vendor/erusev/parsedown\test\ParsedownTest.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201
Step 7: Migrating database:
The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin'].
Step 8: Checking for OAuth keys:
Step 9: Caching routes and config:
The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin']. The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin'].
Step 10: Taking application out of maintenance mode:
The environment file is invalid! Failed to parse dotenv file due to an unexpected escape sequence. Failed at ['C:\Program Files\MariaDB 10.5\bin'].
Step 11: Checking for v5 public storage directories:
Public storage directory already exists. Skipping...
Copying files into storage/app/public.
Copy failed - you should do this manually by copying the files from public/uploads into the storage/app/public directory.
FINISHED! Clear your browser cookies and re-login to use : your upgraded Snipe-IT. --------------------------------------------------------`