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

lando init with platformsh recipe fails after entering token #184

Closed
gilzow opened this issue Jan 20, 2023 · 16 comments
Closed

lando init with platformsh recipe fails after entering token #184

gilzow opened this issue Jan 20, 2023 · 16 comments
Labels
bug Something isn't working

Comments

@gilzow
Copy link

gilzow commented Jan 20, 2023

Using Lando 3.9.0 on macOS

lando init Errors after entering a token (or after selecting an account if PSH token is already set up)

Occurs with either an empty directory, of if running it when the project's code is present in the directory

Prompt for token
Capture d’écran 2023-01-20 à 15 16 18

Empty directory, token set
Screen Shot 2023-01-20 at 9 12 10 AM

Project code in directory, token set
Screen Shot 2023-01-20 at 9 14 24 AM

Adding --verbose flag
Screen Shot 2023-01-20 at 9 16 16 AM

Happy to provide additional information and/or debug further.

@gilzow gilzow added the bug Something isn't working label Jan 20, 2023
@gilzow
Copy link
Author

gilzow commented Feb 8, 2023

coming back to this as it is still an issue after updating to lando v3.11.0

❯ lando version
v3.11.0

Docker:

❯ docker --version
Docker version 20.10.22, build 3a2c30b

Docker desktop v4.16.2

Any combination of selecting the platformsh recipe results in

ERROR ==>

If I add the --verbose flag the error is still the same as originally posted.

@RightsandWrongsgit
Copy link

Did you get the Docker versions from Lando's 3.11.0 or did you independently update Docker? I have always found success trailing Docker's updates and letting Lando be the controlling point for the Docker version I run.

@gilzow
Copy link
Author

gilzow commented Feb 9, 2023

I never update Docker outside of lando, letting lando control when I update docker.

@gilzow
Copy link
Author

gilzow commented Feb 22, 2023

@pirog @reynoldsalec is there anything I can do to help troubleshoot this issue? We've had a couple of other people report to us they're experiencing the same issue.

@gilzow
Copy link
Author

gilzow commented Feb 22, 2023

So far existing projects are fine. It only happens where I'm trying to start from scratch (ie running lando init).
Alternatively, I can add a lando.yml file with name: and recipe:platformsh properties defined and then run lando start and everything works. In my experience so far, it's isolated to just lando init

@reynoldsalec
Copy link
Sponsor Member

Thanks for narrowing that down @gilzow, I'll take a look and replicate later today. Chatting with Chad and Jan tomorrow, so they might be able to answer P.sh-related questions if I have them.

@reynoldsalec
Copy link
Sponsor Member

Based on the error I'm seeing when running lando init -vvv, my guess is that there's been a change in platformsh-client. Specifically I'm seeing...

lando 09:34:33 ERROR ==> Error
    at /Users/alec/.lando/plugins/@lando/platformsh/recipes/platformsh/init.js:39:40
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

...which points to an error when we call the getAccountInfo() function of platformsh-client. Going to see if anything changed about the implementation of that function that would cause an error...hopefully we just need to update our usage of the platformsh-client.

@reynoldsalec
Copy link
Sponsor Member

reynoldsalec commented Feb 24, 2023

I poked around trying different versions of platformsh-client-js and I do notice a change in the error behavior between version 0.1.198, where the process just seems to hang when we call api.getAccountInfo(), and 0.1.199 which throws an error (sadly an unhelpful error, since platformsh-client is minified). It looks like isomorphic-fetch was updated between those two tags and the function that retrieves the user (which is what getAccountInfo() relies upon), so it does seem like a likely place to focus on. Timing also seems to make since, considering the versions of platformsh-client the Lando integration has been bundling in its releases.

@DavidVaini
Copy link

What is the work around for this in the mean time? I started a new project and I cant seem to get lando init working.

@gilzow
Copy link
Author

gilzow commented Apr 10, 2023

@DavidVaini , I don't believe there is one yet.
If you have an existing project on platform.sh, you can clone it, then add a .lando.yaml file with the name: property and recipe: platformsh and it should work with lando start instead of lando init.

Example .lando.yaml

name: myapp
recipe: platformsh

@gilzow
Copy link
Author

gilzow commented Apr 20, 2023

@reynoldsalec The platformsh js client has been updated. Can you see if this update resolves this issue? Thanks!

@reynoldsalec
Copy link
Sponsor Member

Should have a chance to check it out before the weekend, thanks for the ping @gilzow!

@reynoldsalec
Copy link
Sponsor Member

reynoldsalec commented Apr 21, 2023

Looks like this did the trick, merged in on PR #188. Note that you'll have to install the latest version of the P.sh plugin until this change is reflected in the Lando CLI 3.16.0 release.

Note that I had to refresh my token to get things to work...would be interested if other folks have the same experience.

@gilzow
Copy link
Author

gilzow commented Apr 21, 2023

Looks like this did the trick, merged in on PR #188. Note that you'll have to install the latest version of the P.sh plugin until this change is reflected in the Lando CLI 3.16.0 release.

FANTASTIC NEWS!!! Thanks so much!

Note that I had to refresh my token to get things to work...would be interested if other folks have the same experience.

I'll try testing it this afternoon and see if I run into the same scenario with the token.

@reynoldsalec
Copy link
Sponsor Member

...and this is now in Lando 3.16.0 for general consumption 🍕

@gilzow
Copy link
Author

gilzow commented Apr 26, 2023

THANK YOU @reynoldsalec !!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants