I think Podkayne’s answer is close - and I agree that it’s a fascinating question - but I suspect that the uncertainty, particularly in popular accounts, persisted for a bit longer.
To flesh out Podkayne account of the background, several things about Jupiter had become clear by about 1800. From much earlier, people had realised that different visible features were rotating round the planet at different speeds. Thus long before that date, the consensus was that what we were seeing through telescopes were cloud tops. Therefore, it was obvious that the atmosphere on Jupiter had to be reasonably substantial and certainly opaque. The next stage was that Bessel realised that the average density of the planet had to be substantially less than that of the Earth (via the measurement indicated by Podkayne, plus a few others). The average density of the Earth itself was also sort of known at this time.
By way of comparison, it wasn’t even obvious at this time that the Sun was gaseous. Herschel thought it was mainly solid and even inhabited. He also thought that Jupiter was mainly solid with a thin atmosphere, a view also put forward by David Brewster later in the 19th century. This was the concensus opinion about the planet for a good long time. Some others did disagree, arguing that the planet was very, very hot. 18th century exponents of this were Buffon and Kant, but you also find James Nasmyth arguing the same in 1853.
The big late-19th century observational controversy about the interior of Jupiter was then whether there was a source of energy. Some, in retrospect rather primitive, measurements suggested that the planet was radiating significantly more energy than it was receiving from the Sun. Which would suggest that the planet was hot. This wasn’t too difficult to explain, given that in the same period you also had the Helmholtz-Kelvin hypothesis that the heat of the Sun was due to its gravitational contraction. (Oddly enough, the current view is that Jupiter does give off a very. very slight excess of energy - much less than that considered in the 1800s - and that this is probably due to contraction after all.)
I could conceive of people doing serious models of Jupiter’s interior in the late-1800s, to parallel those for the Earth and the Sun. (Indeed, I begin to wonder why nobody did propose any at that time.) The crucial shift would seem to be the renewed interest in such models, particularly for stars, in roughly the 1920s. It’s Eddington’s work on stellar structure that presumably prompted Jeffreys’ model in 1923. That’s Sir Harold Jeffreys, by the way. Yet even though his model had a significant enough atmosphere, it was still only 6000 km deep, compared to a planetary radius of about 70,000 km.
The few examples I know of from the decades immediately following are much the same: big atmospheres, but still mainly a solid core. Rupert Wildt proposed a model in 1934 where the atmosphere was about 13,000 km deep, while even as late as 1951 both Ramsey and DeMarcus suggested that the atmosphere was of neglible depth.
I suspect that the current firm conclusion that the planet is virtually all atmosphere, with only a small solid core, is ultimately a product of the spacecraft mission era.
There’s also the lag with respect to popular understanding to consider. For instance, I happen to have a copy of Sir James Jeans’s Through Space and Time (Cambridge, 1934), his Royal Institution Christmas Lectures from 1933, to hand. As is typical for this sort of popular astronomy book from the period, he devotes an entire chapter to an account of the planets. From the point of view of the current question, what’s striking is that he ducks it entirely. He discusses Jupiter at some length, but just completely avoids the question of what’s beneath the clouds. And this is Jeans, most of whose research was in the same tradition as Jeffreys. He must have been aware of the recent models, yet he seems to regard the entire topic as unsuitable for a popular audience. Any non-specialist looking for guidence in the 1940s might reasonably have turned to Jeans and concluded from the book that nothing was known about the issue.