JoinRandomRoom failed. Client is on MasterServer (must be Master Server for matchmaking) but not ready for operations (State: PeerCreated). Wait for callback: OnJoinedLobby or OnConnectedToMaster.

I am trying to make a multiplayer game but I got this error every time I try to start the game and spawn the players. Can you help me with what I should do? I use this code for joining the room:
![using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon;
using Photon.Pun;
using UnityEngine.UI;
using Photon.Realtime;

public class MPManager : MonoBehaviourPunCallbacks
{
    public PlayFabAuth auth;



    public string GameVersion;
    public Text connectState;

    public GameObject[] DisableOnConnected;
    public GameObject[] DisableOnJoinRoom;
    public GameObject[] EnableOnConnected;
    public GameObject[] EnableOnJoinRoom;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void FixedUpdate()
    {
        connectState.text = "Is Connected: " + PhotonNetwork.IsConnected;
    }
    public void ConnectToMaster()
    {
      //  PhotonNetwork.connectionStateDetailed
        PhotonNetwork.ConnectToRegion("EU");
    }

    public virtual void onConnectedToMaster()
    {
       foreach(GameObject disable in DisableOnConnected)
        {
            disable.SetActive(false);
        }
       foreach(GameObject enable in EnableOnConnected)
        {
            enable.SetActive(true);
        }
    }

    public void CreateOrJoin()
    {
        PhotonNetwork.JoinRandomRoom();
    }
    public virtual void OnPhotonRandomJoinFailed()
    {
        RoomOptions rm = new RoomOptions
        {
            MaxPlayers = 3,
            IsVisible = true

        };
        int rndID = Random.Range(0, 3000);
        PhotonNetwork.CreateRoom("Default: "+rndID, rm, TypedLobby.Default);
    }
    public virtual void OnJoinRoom()
    {
        foreach (GameObject disable in DisableOnJoinRoom)
        {
            disable.SetActive(false);
        }
        foreach (GameObject enable in EnableOnJoinRoom)
        {
            enable.SetActive(true);
        }
        GameObject player =  PhotonNetwork.Instantiate("Player", Vector3.zero, Quaternion.identity, 0);

        
}

}][1]
![155620-captura-de-ecran-din-2020-04-01-la-154338.png|254x589](upload://akv7YWYHViClmvnYPcAn2uyEaic.png)

Have you solve it?