PlayStation 4 went on sale in the United States and Canada early Friday, the first new gaming system in seven years from Sony, which desperately needs a hit.

The new system, which sells for $399, won't be on shelves by itself for long. Microsoft's (MSFT) rival Xbox One goes on sale in one week, although it will cost $100 more. Both companies are counting on strong sales through the holiday shopping season.

Shoppers lined up outside many stores across the country for a special midnight debut of the system, hoping to grab up one of the limited supply. Analysts expect the demand for the system to outstrip supply through Christmas. Sony's forecast is that it will sell 5 million of the PlayStation 4's by the end of March.

Related: Console smackdown - comparing PlayStation 4 to Xbox One

The gaming console comes with greater connectivity to social media networks, apps to link to online streaming video services and a catalog of 20 games, which is set to expand up to 30 games by the end of the year. But the Xbox One will come with more initial games and apps to some popular streaming services missing from PlayStation 4, including HBO Go and Watch ESPN.

And the 80 million customers who bought a PlayStation 3 will not be able to play the games they own on the new console.

Related: The top 10 PS4 launch games

The debut comes two weeks after Sony disappointed investors by posting an unexpected loss for the most recent quarter and warning that profits for the year would be 40% lower than forecast just three months ago. Shares of Sony (SNE) plunged 11% in reaction to that announcement.

The problems were mostly from the company's studio unit as well as declining prices and margins in the television business. But Sony shares are still up more than 60% year to date, greatly due to hopes for the PlayStation 4.