As the exception states, you must create an index for the query you are performing.
FAILED_PRECONDITION: The query requires an index. You can create it here: {some link}
The link provided by the exception, when entered into a browser will load the Firebase Console with all the details you need to create the index needed for the query. So you just need to visit the link and follow the instructions.