Closed Mikmokster closed 2 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.
I haven't been able to reproduce this anywhere :( Is there any other info you can provide? Where exactly are you seeing this? Command line or in the browser? Is it possible your cli and your web server are running different versions of PHP? (It does happen sometimes, tho less common in XAMPP I think)
In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Illu minate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
Are you able to upgrade to the latest release?
Hrm, are you 100% sure you're using PHP 7.4 ? I don't remember when exactly errors about null instead of string came around, but I think that's in much later versions of PHP, like 8.2 or 8.1 or so?
Can you run composer install
and do you get anything better when you do that?
Are you able to upgrade to the latest release?
This script will attempt to:
Current PHP version: (7.4.29) is at least 7.4.0 - continuing... FYI: The php.ini used by this PHP is: /etc/php/7.4/cli/php.ini
Checking Required PHP extensions...
β bcmath is installed! β curl is installed! β fileinfo is installed! β gd is installed! β json is installed! β ldap is installed! β mbstring is installed! β mysqli is installed! β openssl is installed! β PDO is installed! β sodium is installed! β tokenizer is installed! β xml is installed! β zip is installed!
-- In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Il luminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
-- In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Il luminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
Git is installed. remote: Enumerating objects: 17, done. remote: Counting objects: 100% (17/17), done. remote: Compressing objects: 100% (13/13), done. remote: Total 17 (delta 5), reused 13 (delta 4), pack-reused 0 Unpacking objects: 100% (17/17), done. From https://github.com/snipe/snipe-it a050be873..1c32dcae9 master -> origin/master a050be873..1c32dcae9 develop -> origin/develop
β 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.
-- In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Il luminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
-- In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Il luminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
-- In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Il luminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
-- In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Il luminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
-- We couldn't find a local composer.phar. No worries, trying globally.
Class ParsedownTest located in ./vendor/erusev/parsedown/test/ParsedownTest.php does not comply with psr-0 autoloading standard. Skipping.
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Nothing to install, update or remove Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead. Package patchwork/utf8 is abandoned, you should avoid using it. Use symfony/polyfill-mbstring or symfony/string instead. Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead. Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files Class ParsedownTest located in ./vendor/erusev/parsedown/test/ParsedownTest.php does not comply with psr-0 autoloading standard. Skipping. Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 Generating optimized autoload files
In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() mus t be of the type string, null given, called in /var/www/snipe-it/vendor/lar avel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() mus t be of the type string, null given, called in /var/www/snipe-it/vendor/lar avel/framework/src/Illuminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Il luminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
β OAuth keys detected. Skipping passport install.
-- In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Il luminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
GitHubA free open source IT asset/license management system - GitHub - snipe/snipe-it: A free open source IT asset/license management system
when i do it, i have this: composer install Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Package operations: 32 installs, 0 updates, 0 removals As there is no 'unzip' nor '7z' command installed zip files are being unpacked using the PHP zip extension. This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost. Installing 'unzip' or '7z' (21.01+) may remediate them.
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover --ansi
In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() must be of the type string, null given, called in /var/www/snipe-it/vendor/laravel/framework/src/Il luminate/Foundation/Bootstrap/SetRequestForConsole.php on line 32
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
What do you have in your .env for APP_URL?
What do you have in your .env for APP_URL?
if you mean from the file app.php is from config 'url' => env('APP_URL', 'http://localhost'),
No, in your .env file
No, in your .env file
where is it?
In your snipe-it directory.
/var/www/snipe-it/.env
APP_URL=null
/var/www/snipe-it/.env
i put APP_URL=localhost and no more issues, thanks a lot.
Per the docs, you want to use the domain and protocol, so http://localhost
or https://localhost
if you are running over SSL
APP_URL=http://localhost:8000 Solved the issue
Then it might make sense to adjust the .env.example accordingly as it currently specifies APP_URL=null by default.
@jcnengal - itβs set to null on purpose, so that you know to update it. local host will not work for every setup, and thereβs no way for us to know what your URL is. The upgrade.php script tries to check your URL for you to make sure that itβs not null, but at the end of the day itβs your job to read the config docs. APP_URL has always been required.
Debug mode
Describe the bug
I get this error after upgrading from master to develop (RC)
In Request.php line 334:
Argument 1 passed to Symfony\Component\HttpFoundation\Request::create() mus t be of the type string, null given, called in C:\xampp\htdocs\AMS\vendor\l aravel\framework\src\Illuminate\Foundation\Bootstrap\SetRequestForConsole.p hp on line 32
Reproduction steps
1. 2. 3. ...
Expected behavior
Upgrade
Screenshots
No response
Snipe-IT Version
v6.0.0-RC-5
Operating System
Windows
Web Server
XAMPP
PHP Version
7.4
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
Upgrade