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

Unable to check existence for: lasso/global/history.json #69

Closed
ahaneef29 opened this issue Nov 8, 2022 · 6 comments
Closed

Unable to check existence for: lasso/global/history.json #69

ahaneef29 opened this issue Nov 8, 2022 · 6 comments

Comments

@ahaneef29
Copy link

Hi,

Laravel Version ........................................................................................................................... 9.39.0
PHP Version ................................................................................................................................ 8.1.5
Composer Version ........................................................................................................................... 2.2.8
Environment ................................................................................................................................ local

I'm using Digital Ocean Space for uploading & Downloading compiled assets using Lasso.
php artisan lasso:publish command working without any error. But when using lasso:pull on deployment script, it's throwing an error.

php artisan lasso:pull

🏁 Preparing to download assets from "digitalocean" filesystem.
⏳ Reading Bundle meta file...
⏳ Downloading bundle...
✅ Successfully downloaded bundle.
⏳ Creating backup...
✅ Backed up.
⏳ Updating assets...

League\Flysystem\UnableToCheckDirectoryExistence

Unable to check existence for: lasso/global/history.json

at vendor/league/flysystem/src/UnableToCheckExistence.php:19
15▕ }
16▕
17▕ public static function forLocation(string $path, Throwable $exception = null): static
18▕ {
➜ 19▕ return new static("Unable to check existence for: {$path}", 0, $exception);
20▕ }
21▕
22▕ public function operation(): string
23▕ {

  +41 vendor frames

42 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

@ahaneef29
Copy link
Author

Any workaround?

@Sammyjo20
Copy link
Owner

Hi, thanks for the message - apologies for the late reply - I will take a look likely Sunday for you.

@ajuchacko
Copy link

@ahaneef29 I'd like to help you with this, Unfortunately I am not able to get digital ocean spaces. If you'd like to get me one test credentials or we could chat about this, shoot me an email.

@danmatthews
Copy link

danmatthews commented Apr 7, 2023

@Sammyjo20 - hey Sam, i've just hit this issue with Lasso + S3, i was able to work around it by manually creating the history.json file on my S3 bucket, but i'm assuming it's something that it's something that Lasso should be creating when uploading the assets?

** UPDATE 3 **

Tested all the way back to thephpleague/flysystem-aws-s3-v3 v3.0.0 and it's still busted.

Also confirmed still happens without --use-commit flag.

UPDATE 2

Looks like it's an issue with Flysystem:

laravel/framework#45639

thephpleague/flysystem-aws-s3-v3@ea10034

UPDATE 1
First run of php artisan lasso:publish --use-commit creates the development folder, but no history.json visible in my S3 bucket:

CleanShot 2023-04-07 at 01 50 17

I can then confirm this in Transmit:

CleanShot 2023-04-07 at 01 50 45

Running php artisan lasso:pull --use-commit gives the error:

CleanShot 2023-04-07 at 01 51 50

Now i know i can manually fix this by creatinga JSON file manually, so I do it in tinkerwell, note the empty JSON body:

Storage::disk('s3_assets')->put('/socialsync/development/history.json', '{}');

Checking both Transmit and S3 console now shows history.json:

CleanShot 2023-04-07 at 01 53 27

CleanShot 2023-04-07 at 01 53 35

pull now works, and if you check the history file after running pull, it has content.

Versions:

Laravel Version ........................................................................................................................... 9.52.5
PHP Version ............................................................................................................................... 8.1.16
Composer Version ........................................................................................................................... 2.5.4

Lasso v3.1.0

@ajuchacko
Copy link

Hey @danmatthews, Can you test this PR on your app, where history.json is not empty on s3 also on a new app where no history.json exists, to make sure it works as expected.

thanks

@Sammyjo20
Copy link
Owner

Hey @danmatthews sorry for the delay on this issue! Are you still having this problem?

@Sammyjo20 Sammyjo20 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 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 a pull request may close this issue.

4 participants