Bug 1090592 - [Build 20180422] openQA test fails in yast2_apparmor - "yast/wfm.rb:253 Client /usr/share/YaST2/clients/aa-settings.rb failed with 'undefined method `toggle' for nil:NilClass' (NoMethodError)."
[Build 20180422] openQA test fails in yast2_apparmor - "yast/wfm.rb:253 Clien...
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
Other Other
: P5 - None : Major (vote)
: ---
Assigned To: Goldwyn Rodrigues
Jiri Srain
https://openqa.opensuse.org/tests/661...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-23 18:05 UTC by Oliver Kurz
Modified: 2019-01-07 20:07 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: Yes
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kurz 2018-04-23 18:05:51 UTC
## Observation

openQA test in scenario opensuse-Tumbleweed-DVD-x86_64-yast2_ncurses@64bit fails in
[yast2_apparmor](https://openqa.opensuse.org/tests/661064/modules/yast2_apparmor/steps/11)

from y2log:

```
2018-04-23 10:09:27 <3> susetest(2765) [Ruby] yast/wfm.rb:253 Client /usr/share/YaST2/clients/aa-settings.rb failed with 'undefined method `toggle' for nil:NilClass' (NoMethodError).
Backtrace:
/usr/share/YaST2/lib/apparmor/profiles.rb:91:in `toggle'
/usr/share/YaST2/lib/apparmor/profiles.rb:162:in `changeMode_handler'
/usr/share/YaST2/lib/ui/event_dispatcher.rb:47:in `public_send'
/usr/share/YaST2/lib/ui/event_dispatcher.rb:47:in `block in event_loop'
/usr/share/YaST2/lib/ui/event_dispatcher.rb:43:in `loop'
/usr/share/YaST2/lib/ui/event_dispatcher.rb:43:in `event_loop'
/usr/share/YaST2/lib/ui/dialog.rb:53:in `run'
/usr/share/YaST2/lib/apparmor/settings.rb:82:in `modeconf_handler'
/usr/share/YaST2/lib/ui/event_dispatcher.rb:47:in `public_send'
/usr/share/YaST2/lib/ui/event_dispatcher.rb:47:in `block in event_loop'
/usr/share/YaST2/lib/ui/event_dispatcher.rb:43:in `loop'
/usr/share/YaST2/lib/ui/event_dispatcher.rb:43:in `event_loop'
/usr/share/YaST2/lib/ui/dialog.rb:53:in `run'
/usr/share/YaST2/clients/aa-settings.rb:4:in `<top (required)>'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:313:in `eval'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:313:in `run_client'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin_wrapper'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:195:in `CallFunction'
/usr/share/YaST2/clients/apparmor.rb:124:in `startDialog'
/usr/share/YaST2/clients/apparmor.rb:46:in `main'
/usr/share/YaST2/clients/apparmor.rb:135:in `<top (required)>'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:313:in `eval'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:313:in `run_client'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:206:in `call_builtin_wrapper'
/usr/lib64/ruby/vendor_ruby/2.5.0/yast/wfm.rb:195:in `CallFunction'
/usr/lib/YaST2/bin/y2start:58:in `<main>'
```


## Reproducible

Fails since (at least) Build [20171029](https://openqa.opensuse.org/tests/518687)


## Expected result

Last good: (unknown) (or more recent)


## Further details

Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?distri=opensuse&machine=64bit&version=Tumbleweed&flavor=DVD&arch=x86_64&test=yast2_ncurses)
Comment 1 Steffen Winterfeldt 2018-04-24 08:46:28 UTC
Looks like selected_item is empty here:

https://github.com/yast/yast-apparmor/blob/master/src/lib/apparmor/profiles.rb#L159-L164

Could you take care?
Comment 2 Goldwyn Rodrigues 2018-04-24 15:26:36 UTC
Submitted pull request to upstream git
https://github.com/yast/yast-apparmor/pull/25
Comment 3 Goldwyn Rodrigues 2019-01-07 20:07:06 UTC
Fix is upstream. Closing as FIXED.