You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paste in a series of commands that caused the bug.
Example:
lando pull
Tell us about the error you got
The first time I run lando pull I get prompted to create a key for Lagoon, which I do and I add to Lagoon successfully, the lando pull command finishes properly without issue. However, any lando command run afterwards, on any project throws the following error:
Example:
Unhandled rejection TypeError: Cannot read property 'email' of null
at /snapshot/lando/build/cli/integrations/lando-lagoon/lib/keys.js
at arrayMap (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:653:23)
at Function.map (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:9622:14)
at interceptor (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:17094:35)
at thru (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:8859:14)
at /snapshot/lando/build/cli/node_modules/lodash/lodash.js:4430:28
at arrayReduce (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:697:21)
at baseWrapperValue (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:4429:14)
at LazyWrapper.lazyValue [as value] (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:1901:16)
at baseWrapperValue (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:4427:25)
at LodashWrapper.wrapperValue (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:9114:14)
at LazyWrapper.lazyValue [as value] (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:1885:36)
at baseWrapperValue (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:4427:25)
at LodashWrapper.wrapperValue (/snapshot/lando/build/cli/node_modules/lodash/lodash.js:9114:14)
at Object.getKeys (/snapshot/lando/build/cli/integrations/lando-lagoon/lib/keys.js)
at Object.options (/snapshot/lando/build/cli/integrations/lando-lagoon/recipes/lagoon/init.js)
From previous event:
at processImmediate (internal/timers.js:456:21)
It does not matter if it is the same project, or any specific Lagoon commands, this completely breaks Lando for all projects and all commands. lando --clear cannot even run.
Tell us generally about your bug
I tried to debug this for a while and I couldn't see any rhyme or reason for what was going on, until I paid closer attention to the ~/.lando/cache/lagoon.keys file, I noticed at the end of the file I had a null value.
So, I removed that null and suddenly all Lando commands began working again. So, there seemed to be an issue with the initial creation of Lagoon keys in the Lando cache directory.
Tell us more
I began looking at the lando/cli code and set up lando.dev locally to test things out, I was able to isolate the bug and create a patch for it.
The problem exists in integrations/lando-lagoon/app.js on line 87:
Tell us about your setup
What is your lando version and operating system?
v 3.1.4 on Mac OSX 11.4 (Big Sur)
Tell us about your
.lando.yml
Tell us about the command you were running
Paste in a series of commands that caused the bug.
Example:
Tell us about the error you got
The first time I run
lando pull
I get prompted to create a key for Lagoon, which I do and I add to Lagoon successfully, thelando pull
command finishes properly without issue. However, anylando
command run afterwards, on any project throws the following error:Example:
It does not matter if it is the same project, or any specific Lagoon commands, this completely breaks Lando for all projects and all commands.
lando --clear
cannot even run.Tell us generally about your bug
I tried to debug this for a while and I couldn't see any rhyme or reason for what was going on, until I paid closer attention to the
~/.lando/cache/lagoon.keys
file, I noticed at the end of the file I had anull
value.So, I removed that
null
and suddenly all Lando commands began working again. So, there seemed to be an issue with the initial creation of Lagoon keys in the Lando cache directory.Tell us more
I began looking at the lando/cli code and set up
lando.dev
locally to test things out, I was able to isolate the bug and create a patch for it.The problem exists in
integrations/lando-lagoon/app.js
on line 87:app.lagoonKeys = lando.cache.get(app.lagoonKeyCache);
should in fact be
app.lagoonKeys = lando.cache.get(app.lagoonKeyCache) || [];
This is because when
keys.sortKeys(app.lagoonKeys, [newKey])
is called,app.lagoonKeys
is null and has not been initialized to be an empty array.The text was updated successfully, but these errors were encountered: