SAN FRANCISCO —Twitter is in danger of becoming the next Internet company forced into a desperation sale if it cannot find a way to start luring people and advertisers back to its sometimes-befuddling messaging service.

The 10-year-old company’s second-quarter report, released Tuesday, provided another sobering snapshot of Twitter stuck on a treadmill, as other digital communications channels such as Facebook and Snapchat are racing ahead in the battle for attention and allegiance.

Twitter averaged 313 million users a month in the April-June period, a gain of just 3 million from the previous quarter. The company lost $107 million in its latest quarter, narrowing from a $137 million loss at the same time last year.