looker-open-source/gzr

get cat_dashboard': undefined method `each_index' for nil:NilClass (NoMethodError) last week.

Closed this issue · 6 comments

jlu2 commented

Hi, we are using looker API 3 version and ran into the following error last week. However this week when we ran the same command with the same dashboard. it magically worked.

Would you be able to provide a possible reason why we have intermittent issues like this. We experience the following issue a few months ago as well and same a few days later we don't get the issue anymore.

thanks,

Alice

errors.ShellProcessError: Shell process exited with code 1: /usr/local/bundle/gems/gazer-0.2.54/lib/gzr/modules/dashboard.rb:232:in cat_dashboard': undefined method each_index' for nil:NilClass (NoMethodError)
from /usr/local/bundle/gems/gazer-0.2.54/lib/gzr/commands/dashboard/cat.rb:46:in block in execute' from /usr/local/bundle/gems/gazer-0.2.54/lib/gzr/modules/session.rb:249:in with_session'
from /usr/local/bundle/gems/gazer-0.2.54/lib/gzr/commands/dashboard/cat.rb:45:in execute' from /usr/local/bundle/gems/gazer-0.2.54/lib/gzr/commands/dashboard.rb:62:in cat'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in invoke_command'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in dispatch' from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:116:in invoke'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:243:in block in subcommand' from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in run'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in invoke_command' from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in dispatch'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/base.rb:485:in start' from /usr/local/bundle/gems/gazer-0.2.54/exe/gzr:36:in <top (required)>'
from /usr/local/bundle/bin/gzr:23:in load' from /usr/local/bundle/bin/gzr:23:in

'

Hello @jlu2,

We may need some more info to properly address this. The last code update was over 90 days ago so we would need to rule out what is changing with the source dashboard. Maybe we can start by taking a look at the command you are running and the parameters?

Thanks.
@ddaugherty

hi @jlu2 Would you please be able to provide us with the info requested by @ddaugherty above?

jlu2 commented

Hi @ddaugherty @jannarobertson-bytecode, t

The command we try to run is

gzr dashboard cat collector_segmentation_profile::3_collector_segmentation_profile --host ***.looker.com --port ** --client-id ******** --client-secret ******** --ssl --verify-ssl

What i do notice is, it seems happen during looker upgrade. (but it is just a speculation)
We are also using looker API version 3.

Let me know if you need more details

thanks,

Alice

@jlu2 Thanks for the response. I will need to test in an API v3 environment but be aware that end of life for v3 is coming quickly, you might want to consider migrating to v4 when convenient.

jlu2 commented

@ddaugherty thanks! and yes we are aware as well and are planning to migrate to v4. would be nice to know if this issue we are experiencing is because we are using version 3 and once we move to v4, this issue would be resolved.

FYI: I have tested a. number of times with v3 and v4 and have not been able to replicate the issue. I assume it may be something environmental. We have noticed on rare occasion that these type of issues (when a property may not be populated as expected) can some times be solved by editing and resaving the dashboard. Also, re: your example, I assume "collector_segmentation_profile::3_collector_segmentation_profile" resolved to a dashboard ID?