Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - gustavov800

#1
Assets / Ayuda firebase y unity
Noviembre 02, 2019, 04:20:55 PM
Ya encontre el error el inputfield lo tenia validado como email address
#2
Assets / Ayuda firebase y unity
Octubre 21, 2019, 07:25:36 PM
Cita de: mcklem date=1571304755Hola Gustavo,
   
   
      No tengo mucha información del email que estás empleando, no obstante, revisa que no estés enviando un parametro "null" o que el email contenga caracteres extraños.
   
   
      Firebase.FirebaseException: The email address is badly formatted.
   
   
      Firebase Auth Reference
   
   


  1.          Pon un punto de debug justo antes de la llamada y revisa que el parametro email sea el correcto.
          

  2.       

  3.          Realiza alguna limpieza de caracteres de los campos email y password antes de la llamada o restringe la inserción de caracteres extraños desde el InputField.
          

  4.       

  5.          Verifica el formato email Email Format
          

  6.    


auth.CreateUserWithEmailAndPasswordAsync(email, password)



Muchas gracias por tu ayuda mcklen, lo que sucede es que soy nuevo con unity y firebase y estoy tratando de guardar en firebase pero me sale el error antes mencionado.
 
1. Con respecto a el primer punto, entiendo que hay que modificar el codigo talvez me podrias ayudar modificandolo con el codigo que inserte arriba.
 
2. Con respecto al segundo punto, no entiendo la parte de realizar limpieza de caracteres desde la llamada, pero sucede que al ejecutar el proyecto no ingreso información en ninguno de los 2 campos y al dar clic en el boton guardar me da el mismo error.
 
3. Con respecto al tercer punto, he probado con 2 correos de gmail los cuales solo tienen letras y realizo la configuración básica de firebase pero me da el mismo error con los 2 correos de gmail.
 
Tambien descargo los 2 archivos de firebase y realizo la instalación correctamente en unity, de antemano muchas gracias por tu ayuda.
 
 
 

 
 
#3
Assets / Ayuda firebase y unity
Octubre 07, 2019, 11:02:15 PM
Saludos, estoy trabajando con unity y firebase, creando un login algo basico con el codigo que entrega firebase pero me sale un error, si alguien me ayudar selo agradeceria.


   El error sale en unity al ejecutar.


   
   
      
          
      
      
         CreateUserWithEmailAndPasswordAsync encountered an error: System.AggregateException: Exception of type 'System.AggregateException' was thrown.
         -----------------
         Firebase.FirebaseException: The email address is badly formatted.
      
      
         UnityEngine.Debug:LogError(Object)
         AuthManager:<CreateUser>m__0(Task`1) (at Assets/scripts/AuthManager.cs:63)
         System.Threading.Tasks.TaskCompletionSource`1:SetException(AggregateException)
         Firebase.Internal.TaskCompletionSourceCompat`1:SetExceptionInternal(TaskCompletionSource`1, AggregateException) (at Z:/tmp/tmp.BPuGn4thFw/firebase/app/client/unity/proxy/TaskCompletionSourceCompat.cs:29)
         Firebase.Internal.TaskCompletionSourceCompat`1:SetException(TaskCompletionSource`1, AggregateException) (at Z:/tmp/tmp.BPuGn4thFw/firebase/app/client/unity/proxy/TaskCompletionSourceCompat.cs:38)
         Firebase.Auth.FirebaseAuth:CompleteFirebaseUserTask(Task`1, TaskCompletionSource`1) (at Z:/tmp/tmp.t8IpFzDey1/firebase/auth/client/unity/proxy/FirebaseAuth.cs:538)
         Firebase.Auth.<CreateUserWithEmailAndPasswordAsync>c__AnonStoreyA:<>m__0(Task`1) (at Z:/tmp/tmp.t8IpFzDey1/firebase/auth/client/unity/proxy/FirebaseAuth.cs:525)
         System.Threading.Tasks.TaskCompletionSource`1:SetException(Exception)
         Firebase.Auth.<GetTask>c__AnonStorey0:<>m__0() (at Z:/tmp/tmp.t8IpFzDey1/firebase/auth/client/unity/proxy/Future_User.cs:73)
         Firebase.Auth.Future_User:SWIG_CompletionDispatcher(Int32) (at Z:/tmp/tmp.t8IpFzDey1/firebase/auth/client/unity/proxy/Future_User.cs:155)
         Firebase.AppUtilPINVOKE:PollCallbacks()
         Firebase.AppUtil:PollCallbacks() (at Z:/tmp/tmp.BPuGn4thFw/firebase/app/client/unity/proxy/AppUtil.cs:32)
         Firebase.Platform.FirebaseAppUtils:PollCallbacks() (at Z:/tmp/tmp.BPuGn4thFw/firebase/app/client/unity/proxy/FirebaseAppUtils.cs:33)
         Firebase.Platform.FirebaseHandler:Update() (at Z:/tmp/tmp.jXjuHREWLm/firebase/app/client/unity/src/Unity/FirebaseHandler.cs:205)
         Firebase.Platform.FirebaseMonoBehaviour:Update() (at Z:/tmp/tmp.jXjuHREWLm/firebase/app/client/unity/src/Unity/FirebaseMonoBehaviour.cs:45)
      
      
          
      
   
[/quote]

    


   Pero el codigo esta bien y es el mismo que da firebase, ya verifique con 2 cuentas de googlge y me da el mismo error.


    


   Este es el codigo.


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AuthManager : MonoBehaviour
{
    protected Firebase.Auth.FirebaseAuth auth;
    protected Firebase.Auth.FirebaseUser user;
    //private string displayName;
    [SerializeField] private  InputField inputFieldEmail = null;
    [SerializeField] private InputField inputfieldPassword = null;
 
    void Start()
    {
        InitializeFirebase();
    }
 
 
    void InitializeFirebase()
    {
        auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
        auth.StateChanged += AuthStateChanged;
        AuthStateChanged(this, null);
    }
    void AuthStateChanged(object sender, System.EventArgs eventArgs)
    {
        if (auth.CurrentUser != user)
        {
            bool signedIn = user != auth.CurrentUser && auth.CurrentUser != null;
            if (!signedIn && user != null)
            {
                Debug.Log("Signed out " + user.UserId);
            }
            user = auth.CurrentUser;
            if (signedIn)
            {
                //displayName = user.DisplayName ?? "";
                Debug.Log("Signed in " + user.UserId);
            }
        }
    }
    public void CreateUser ()
    {
        string email = inputFieldEmail.text;
        string password = inputfieldPassword.text;
        auth.CreateUserWithEmailAndPasswordAsync(email, password).ContinueWith(task => {
            if (task.IsCanceled)
            {
                Debug.LogError("CreateUserWithEmailAndPasswordAsync was canceled.");
                return;
            }
            if (task.IsFaulted)
            {
                Debug.LogError("CreateUserWithEmailAndPasswordAsync encountered an error: " + task.Exception);
                return;
            }
            // Firebase user has been created.
            Firebase.Auth.FirebaseUser newUser = task.Result;
            Debug.LogFormat("Firebase user created successfully: {0} ({1})",
                newUser.DisplayName, newUser.UserId);
        });
    }
}


    


   
    


    


    
#4
Presentaciones / Saludos a todos
Octubre 07, 2019, 07:12:07 PM
Que tal como les va soy nuevo por aqui.