The unexpected outbreak of the Corona virus (COVID-19) disrupted schools and universities around the world. Traditional classes were canceled, forcing schools and universities to switch to online learning. While developed countries have already adopted e-learning and online learning into their teaching practices, which made the transition relatively easy during the COVID-19 crisis, other developing countries continue to struggle with problems of electricity and information technology infrastructure. The purpose of this paper is to investigate the challenges of online learning faced by students and teachers at the Faculty of Sciences Ain Chock, Hassan II University of Casablanca, Morocco. Thus, two anonymous structured Google Forms questionnaires were sent to participants via email. 498 responses were returned from students and 105 from teachers. We use descriptive statistics to better understand the distribution of study participants. The study reveals that the faculty during the lockdown ensured educational continuity and offered a reliable online learning in terms of digital and educational materials. However, technical problems such as the slow speed of the Internet connection, lack of knowledge about the use of information and communication technologies to teach and learn, low motivation of students, were significant challenges to students’ and teachers’ use of the digital tools.