Skip to content

Bug report: Infinite loop on obtaining yammer groups when yammer environment has no groups #4048

@MathijsVerbeeck

Description

@MathijsVerbeeck

Description

While writing the documentation for issue #3928 I wanted to test the command m365 yammer group list and noticed that the command kept running infinitely. I then added a quick log in the 'else' statement in the code and noticed that the else branch would keep triggering. This is because I do not have any groups in my Yammer environment in my developer tenant. Upon adding a group or community, the command started working properly.

I have also noticed that it will be most likely an easy fix, as it is just the if statement in the else branch which always returns true.
image

Steps to reproduce

  1. Have a clean Yammer environment (with no groups)
  2. Execute command m365 yammer group list

Expected results

An empty array due to me not having any groups

Actual results

Command keeps running. After adding a log, it shows that the else branch is called approximately once every second.

Diagnostics

No response

CLI for Microsoft 365 version

v6.0.0

nodejs version

v16.13.0

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

No response

Additional Info

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions