-
Notifications
You must be signed in to change notification settings - Fork 95
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
Unidentified index in SafeStorage.php:30 when reading a file #36
Comments
Any help ? |
@lourdrivera123 within 15 hours you've opened this issue AND send an email to my personal account. If you think that's the way you're getting your issue fixed you're sorely mistaken. |
@frankdejonge Sorry about that, just had the thought that you or others also experienced the same issue. |
Tried googling around, found this guy having the same issue as mine: |
@frankdejonge I could have a look at it tomorrow morning and come up with a PR. This is an open source project after all. |
Thank you so much @Stelian |
@lourdrivera123 what version of Laravel are you experiencing the issue with? Can you also add a gist with the actual code? |
@lourdrivera123 looked into it and it does not seem to be an issue with the SFTP package, tested it and there is no way to reproduce that unless you do not properly construct the class or overwrite the hash somewhere. I also do not see in your call stack where you actually call the __construct of the FTP Adapter, that seems to be missing. Can you give me a bit more context here? |
Closed due to lack of response. |
If the problem still persists please comment and I'll reopen. |
I just ran into this same error. I was using Lumen (basically same as Laravel), and pushed a Job into a Amazon SQS queue. In my case, within the job I was just trying to If I had a guess the key is not getting set initially when setting a password, could this be a difference between plain text vs private key? |
I've now run into the same error. I've done the same as @nextafter-dan and pushed a job into the queue. This is NOT a problem when using the queue synchronously (e.g. |
I was able to get it working. Seems we can't send the filesystem through the queue nor can we instantiate the file system in the constructor. It seems like SafeStorage forces the filesystem instantiation and use to be within the same method call. Huge win for getting it working, but super confusing problem. |
This issue should be in Flysystem proper, but I will document it here.
When unserializing, the object hash will be different, hence the missing keys. I would argue, and this should be documented, that this is the correct behavior. Preventing serialization of credentials is a good thing. We should probably implement |
Hi, I am using Laravel and I updated my version to 1.0.13. The sftp adapter connects well, but when trying to read a file from the FTP, I encountered Unidentified index error.
[2017-02-21 23:08:56] local.ERROR: ErrorException: Undefined index: 0000000007f314c30000000000f2f7e7 in /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem/src/SafeStorage.php:30
Stack trace:
#0 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem/src/SafeStorage.php(30): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined index...', '/home/vagrant/c...', 30, Array)
#1 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php(250): League\Flysystem\SafeStorage->retrieveSafely('password')
#2 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem-sftp/src/SftpAdapter.php(246): League\Flysystem\Adapter\AbstractFtpAdapter->getPassword()
#3 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem-sftp/src/SftpAdapter.php(191): League\Flysystem\Sftp\SftpAdapter->getAuthentication()
#4 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem-sftp/src/SftpAdapter.php(172): League\Flysystem\Sftp\SftpAdapter->login()
#5 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem/src/Adapter/AbstractFtpAdapter.php(575): League\Flysystem\Sftp\SftpAdapter->connect()
#6 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem-sftp/src/SftpAdapter.php(491): League\Flysystem\Adapter\AbstractFtpAdapter->getConnection()
#7 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem-sftp/src/SftpAdapter.php(483): League\Flysystem\Sftp\SftpAdapter->getMetadata('20.order/orders...')
#8 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem/src/Filesystem.php(56): League\Flysystem\Sftp\SftpAdapter->has('20.order/orders...')
#9 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem/src/Filesystem.php(384): League\Flysystem\Filesystem->has('20.order/orders...')
#10 /home/vagrant/code/kundan-v4-backend/vendor/league/flysystem/src/Filesystem.php(178): League\Flysystem\Filesystem->assertPresent('20.order/orders...')
#11 /home/vagrant/code/kundan-v4-backend/app/Listeners/EDI/SaveOrders.php(26): League\Flysystem\Filesystem->read('20.order/orders...')
#12 [internal function]: App\Listeners\EDI\SaveOrders->handle(Object(App\Events\EDI\FTPWasChecked))
#13 /home/vagrant/code/kundan-v4-backend/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(354): call_user_func_array(Array, Array)
#14 [internal function]: Illuminate\Events\Dispatcher->Illuminate\Events{closure}(Object(App\Events\EDI\FTPWasChecked))
#15 /home/vagrant/code/kundan-v4-backend/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(221): call_user_func_array(Object(Closure), Array)
#16 /home/vagrant/code/kundan-v4-backend/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(480): Illuminate\Events\Dispatcher->fire('App\Events\EDI\...')
#17 /home/vagrant/code/kundan-v4-backend/routes/console.php(56): event(Object(App\Events\EDI\FTPWasChecked))
#18 [internal function]: Illuminate\Foundation\Console\ClosureCommand->{closure}()
#19 /home/vagrant/code/kundan-v4-backend/vendor/laravel/framework/src/Illuminate/Container/Container.php(508): call_user_func_array(Object(Closure), Array)
#20 /home/vagrant/code/kundan-v4-backend/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClosureCommand.php(55): Illuminate\Container\Container->call(Object(Closure), Array)
#21 /home/vagrant/code/kundan-v4-backend/vendor/symfony/console/Command/Command.php(261): Illuminate\Foundation\Console\ClosureCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /home/vagrant/code/kundan-v4-backend/vendor/laravel/framework/src/Illuminate/Console/Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /home/vagrant/code/kundan-v4-backend/vendor/symfony/console/Application.php(817): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /home/vagrant/code/kundan-v4-backend/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Foundation\Console\ClosureCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /home/vagrant/code/kundan-v4-backend/vendor/symfony/console/Application.php(116): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /home/vagrant/code/kundan-v4-backend/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /home/vagrant/code/kundan-v4-backend/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 {main}
The text was updated successfully, but these errors were encountered: