[Unity] Android app will freeze half the time after authenticating a user and loading a new scene

1.536 de afișări
Accesați primul mesaj necitit

Joe Roy

necitită,
16 dec. 2016, 00:03:1516.12.2016
– Firebase Google Group
I built an android app with unity and ran the following code:


 
if (!Application.isEditor)
       
{
            auth
.SignInWithEmailAndPasswordAsync(email, password).ContinueWith(task =>
               
{
                   
if (task.IsCompleted && !task.IsCanceled && !task.IsFaulted)
                   
{
                       
// User is now signed in.
                       
SceneManager.LoadSceneAsync("MainScene");


                   
}
                 
               
});
       
}

Half the time, this will freeze the app completely and the other half the scene is loaded. I get this in logcat when it freezes

D/FirebaseAuth(17967): Notifying listeners about user ( SqmcZYUrLlNL4Yi05ZzFwsTtEF32 ).
D
/FirebaseApp(17967): Notifying auth state listeners.
D
/FirebaseApp(17967): Notified 0 auth state listeners.
W
/DynamiteModule(17967): Local module descriptor class for com.google.firebase.auth not found.

I tried to wait before loading the next scene but that didn't do anything. The object containing the firebase auth code was also initially using dontdestroyonload but commenting out that function didn't change anything.

This is pretty frustrating, I'm thinking at this point I might just have to combine both scenes into one in the hope this avoid the issue.

Stewart Miles

necitită,
16 dec. 2016, 11:35:3216.12.2016
– fireba...@googlegroups.com
Hi Joe,

In order to figure out what's going on here we need some more information, from the log it looks like you're targeting Android:
  • What version of the Firebase Unity SDK are you using? 
  • Which Unity version are you using?
  • What is the host operating system (building on Windows for example)?
  • Are you able to reproduce this behavior with our sample applications?
  • Are you sure this only happens when switching scenes?  We fixed an issue from 1.0.1 (we didn't call DontDestroyOnLoad on our callback dispatcher) which cause our callbacks to break when switching scenes.  This is resolved in version 1.1.0. 
In addition, it would be great if you could you share your complete logs for the successful vs. failing cases.  If you can't do so on a public forum, contact us via sup...@firebase.google.com and we'll continue the conversation there.

Cheers,
Stewart

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/a9cb4d3e-710d-4f49-ad94-f3c8c1046a5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joe Roy

necitită,
16 dec. 2016, 15:23:5216.12.2016
– Firebase Google Group
Hi Stewart,

Sorry I should have included this info in the first place. Answers to your question in the same order:
-Firebase sdk 1.1.0
-Unity 5.5
-Unity is run on Windows 10 64bit. Once built, the app ran on my cellphone (sony xperia D5316; Android 5.1.1.) and also on the genymotion (emulating nexus 5 and Android 5.0.0). Both the emulator and the actual phone suffered the same problem.
-The sample application you mean what is here right? https://github.com/firebase/quickstart-unity  I could not replicate the behavior after 10 to 20 runs that made the scene load itself back on signin success.
-I've started creating a new scene which merges some aspects of my 2 previous scenes(including the firebase auth) and so far I did not have any problem when calling the same function(minus the loadscene) that usually freeze. Also, the scene where the freeze occur works fine without firebase and so too does the scene that it loads. Of course, I can't be sure that the problem is due to the scene load but so far this seems to be the case. 

Please see below for the logs displayed after a successful login without freeze. I will see if I can email you the full log for both.


D/FirebaseAuth( 8553): Notifying listeners about user ( SqmcZYUrLlNL4Yi05ZzFwsTtEF32 ).
D/FirebaseApp( 8553): Notifying auth state listeners.
D/FirebaseApp( 8553): Notified 0 auth state listeners.
D/InitAlarmsService( 7690): Clearing and rescheduling alarms.
I/ActivityManager( 6506): Killing 7110:com.google.android.partnersetup/u0a65 (adj 15): empty #17
W/libprocessgroup( 6506): failed to open /acct/uid_10065/pid_7110/cgroup.procs: No such file or directory
I/Finsky  ( 7168): [1] com.google.android.finsky.dailyhygiene.DailyHygiene$DailyHygieneService.onStartCommand(2375): Beginning daily hygiene, foreground = false
I/Finsky  ( 7168): [1] com.google.android.finsky.dailyhygiene.DailyHygiene.a(435): Probe [FqclO6lne9tCnAHGkooNBQ_H-iQ] for daily hygiene pass
W/ContentTaskController( 7011): Invalid task was provided to stopTracking.
W/Conscrypt( 7270): Could not set socket write timeout: null
W/Conscrypt( 7270): Could not set socket write timeout: null
W/ContentTaskController( 7011): Invalid task was provided to stopTracking.
E/NetworkScheduler.ATC( 7011): Provided calling package not found: com.google.android.apps.photos
I/Finsky  ( 7168): [1] com.google.android.finsky.selfupdate.f.a(165): Skipping DFE self-update. Local Version [80730700] >= Server Version [-1]
I/ActivityManager( 6506): Start proc com.google.android.gms:car for service com.google.android.gms/.car.CarService: pid=8666 uid=10061 gids={50061, 9997, 2001, 3003, 1007, 3006, 1028, 1015, 3002, 3001, 1005, 3007} abi=x86
I/art     ( 6506): Explicit concurrent mark sweep GC freed 28093(1486KB) AllocSpace objects, 9(223KB) LOS objects, 33% free, 12MB/18MB, paused 500us total 48.356ms
W/ResourcesManager( 8666): Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
W/ResourcesManager( 8666): Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
V/JNIHelp ( 8666): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 235 native methods...
I/art     ( 8666): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.OpenSSLExtendedSessionImpl>
I/art     ( 8666): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.OpenSSLExtendedSessionImpl>
W/ActivityThread( 8666): ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
W/System  ( 8666): Could not create com.google.android.gms.org.conscrypt.OpenSSLSocketFactoryImpl with ClassLoader android.app.LoadedApk$WarningContextClassLoader@44794b4: com.google.android.gms.org.conscrypt.OpenSSLSocketFactoryImpl
I/ProviderInstaller( 8666): Installed default security provider GmsCore_OpenSSL
W/DynamiteModule( 8553): Local module descriptor class for com.google.firebase.auth not found.
I/art     ( 8666): Rejecting re-init on previously-failed class java.lang.Class<kss>
I/art     ( 8666): Rejecting re-init on previously-failed class java.lang.Class<kss>
D/CAR.SERVICE( 8666): onBind
D/CAR.SERVICE( 8666): CSB onClientsConnected
D/CAR.TEL.Service( 8666): Binding to InCallService
W/ActivityManager( 6506): Unable to start service Intent { act=local_action cmp=com.google.android.gms/.car.InCallService2 } U=0: not found
E/CAR.TEL.Service( 8666): Failed to bind to InCallService
I/DynamiteModule( 8666): Considering local module com.google.android.gms.googlecertificates:2 and remote module com.google.android.gms.googlecertificates:2
I/DynamiteModule( 8666): Selected remote version of com.google.android.gms.googlecertificates, version >= 2
I/art     ( 8666): DexFile_isDexOptNeeded failed to open oat file '/data/dalvik-cache/x86/data@data@com.google.android.gms@app_chimera@m@00000001@DynamiteModulesA_GmsCore_...@classes.dex' for file location '/data/data/com.google.android.gms/app_chimera/m/00000001/DynamiteModulesA_GmsCore_prodlmp_alldpi_release.apk': Failed to open oat filename for reading: No such file or directory
D/CAR.SERVICE( 8666): Package validated; name: com.android.vending
D/CAR.SERVICE( 8666): Android Auto doesn't have car home but we  have at least on alias in default or enabled state. Nothing to do.
D/CAR.SERVICE( 8666): Registering android.os.BinderProxy@254e7313
D/CAR.SERVICE( 8666): Removing android.os.BinderProxy@254e7313
I/art     ( 7011): Explicit concurrent mark sweep GC freed 31998(2MB) AllocSpace objects, 7(114KB) LOS objects, 39% free, 8MB/13MB, paused 321us total 23.902ms
W/Finsky  ( 7168): [1] com.google.android.finsky.u.e.run(2970): mCallback set, but acquired system apps best effort.
W/ActivityManager( 6506): getRecentTasks: caller 10066 is using old GET_TASKS but privileged; allowing
I/ActivityManager( 6506): Start proc com.android.defcontainer for service com.android.defcontainer/.DefaultContainerService: pid=8694 uid=10003 gids={50003, 9997, 1028, 1015, 1023, 2001, 1035} abi=x86
I/Finsky  ( 7168): [1] com.google.android.finsky.dailyhygiene.DailyHygiene.c(824): Logging device features
I/Finsky  ( 7168): [1] com.google.android.finsky.selfupdate.SelfUpdateCheckerScheduler.a(53): Cancelling accelerated self-Update check
W/InstanceID/Rpc( 7168): Found 10061
I/WearableService( 7011): Wear is not allowed to run on this device. Not starting Wear service.
I/Finsky  ( 7168): [126] com.google.android.finsky.receivers.FlushLogsReceiver$FlushLogsService.onHandleIntent(163): Flushing event logs for [FqclO6lne9tCnAHGkooNBQ_H-iQ]
I/PlayCommon( 7168): [95] com.google.android.play.a.g.e(900): Preparing logs for uploading
I/PlayCommon( 7168): [127] com.google.android.play.a.g.e(900): Preparing logs for uploading
I/PlayCommon( 7168): [127] com.google.android.play.a.g.e(902): No file ready to send
E/Finsky  ( 7168): [1] com.google.android.finsky.wear.bl.a(847): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
I/Finsky  ( 7168): [1] com.google.android.finsky.wear.aj.run(2402): Dropping command=hygiene due to Gms not connected
I/PlayCommon( 7168): [95] com.google.android.play.a.g.a(1040): Connecting to server: https://play.googleapis.com/play/log?format=raw&proto_v2=true
I/Finsky  ( 7168): [1] com.google.android.finsky.utils.ct.a(11133): Logging 1 device features.
I/PlayCommon( 7168): [95] com.google.android.play.a.g.a(1115): Successfully uploaded logs.
I/PlayCommon( 7168): [95] com.google.android.play.a.g.e(900): Preparing logs for uploading
I/PlayCommon( 7168): [95] com.google.android.play.a.g.e(902): No file ready to send
D/CAR.SERVICE( 8666): onUnbind
D/CAR.SERVICE( 8666): CSB onClientsDisconnected
D/CAR.SERVICE( 8666): tearDown
D/CAR.SERVICE( 8666): tearDownCarState
D/CAR.SERVICE( 8666): Skip, car not connected.
D/CAR.SERVICE( 8666): tearDownClientState
D/CAR.TEL.Service( 8666): Unbinding from InCallService
W/ActivityManager( 6506): Unbind failed: could not find connection for android.os.BinderProxy@1d057210
D/CAR.SERVICE( 8666):  isn't installed.
D/CAR.SERVICE( 8666): requestStop
D/CAR.SERVICE( 8666): onDestroy
D/CAR.SERVICE( 8666): tearDown
D/CAR.SERVICE( 8666): tearDownCarState
D/CAR.SERVICE( 8666): Skip, car not connected.
D/CAR.SERVICE( 8666): tearDownClientState
D/CAR.SERVICE( 8666): requestStop
I/ActivityManager( 6506): Killing 7744:com.android.email/u0a31 (adj 15): empty #17
W/libprocessgroup( 6506): failed to open /acct/uid_10031/pid_7744/cgroup.procs: No such file or directory
I/ActivityManager( 6506): Killing 7970:com.google.android.gms.feedback/u0a61 (adj 15): empty #17
W/libprocessgroup( 6506): failed to open /acct/uid_10061/pid_7970/cgroup.procs: No such file or directory
W/ActivityManager( 6506): Scheduling restart of crashed service com.google.android.gms/.feedback.FeedbackService in 1000ms
I/ActivityManager( 6506): Start proc com.google.android.gms.feedback for service com.google.android.gms/.feedback.FeedbackService: pid=8720 uid=10061 gids={50061, 9997, 2001, 3003, 1007, 3006, 1028, 1015, 3002, 3001, 1005, 3007} abi=x86
W/ResourcesManager( 8720): Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
W/ResourcesManager( 8720): Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
V/JNIHelp ( 8720): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 235 native methods...
I/art     ( 8720): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.OpenSSLExtendedSessionImpl>
I/art     ( 8720): Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.OpenSSLExtendedSessionImpl>
W/ActivityThread( 8720): ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
W/System  ( 8720): Could not create com.google.android.gms.org.conscrypt.OpenSSLSocketFactoryImpl with ClassLoader android.app.LoadedApk$WarningContextClassLoader@44794b4: com.google.android.gms.org.conscrypt.OpenSSLSocketFactoryImpl
I/ProviderInstaller( 8720): Installed default security provider GmsCore_OpenSSL
I/art     ( 8720): Rejecting re-init on previously-failed class java.lang.Class<kss>
I/art     ( 8720): Rejecting re-init on previously-failed class java.lang.Class<kss>
I/ActivityManager( 6506): Killing 7911:com.google.android.apps.maps/u0a75 (adj 15): empty #17
D/WifiService( 6506): Client connection lost with reason: 4
W/libprocessgroup( 6506): failed to open /acct/uid_10075/pid_7911/cgroup.procs: No such file or directory
I/Finsky  ( 7168): [113] com.google.android.finsky.d.g.run(1151): Replicating app states via AMAS.
I/Finsky  ( 7168): [113] com.google.android.finsky.d.e.a(313): Completed 0 account content syncs with 0 successful.
I/Finsky  ( 7168): [1] com.google.android.finsky.services.j.a(148): Installation state replication succeeded.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

dev fanzhi

necitită,
26 dec. 2016, 09:21:1526.12.2016
– Firebase Google Group
Hi Joy. I have same problem. 
- Firebase SDk 1.1.0
- Unity 5.4.2
- Windows 10, 
- build target - android
Did you solve this problem? How?

2016년 12월 17일 토요일 오전 4시 23분 52초 UTC+8, Joe Roy 님의 말:
I/art     ( 8666): DexFile_isDexOptNeeded failed to open oat file '/data/dalvik-cache/x86/data@da...@com.google.android.gms@app_chimera@m@00000001@DynamiteModulesA_GmsCore_prodlmp_alldpi_release.apk@classes.dex' for file location '/data/data/com.google.android.gms/app_chimera/m/00000001/DynamiteModulesA_GmsCore_prodlmp_alldpi_release.apk': Failed to open oat filename for reading: No such file or directory

dev fanzhi

necitită,
26 dec. 2016, 21:56:2126.12.2016
– Firebase Google Group

In my case it cause problem to Initialize Firebase in Awake() ( call Firebase controller). I moved this action to Start(). There are still error log in logcat, but app no more freeze. I don't know this is real solution. Any other solution?
2016년 12월 26일 월요일 오후 10시 21분 15초 UTC+8, dev fanzhi 님의 말:

Nicklas Ruiterman

necitită,
29 dec. 2016, 17:35:2129.12.2016
– Firebase Google Group
i also get a freeze on Android

i log in one day with Google, wait a bit, and force close the app
i open the app the next day and the CurrentUser changes 2 times on its own,  
log message "CurrentUser changed from ? to ?" (same user id)
then my code uses the CurrentUser to get their data in Firebase Realtime Database
then the CurrentUser changes another 2 times on its own (same user id)
and then app freeze

same code works fine on iOS with Facebook and Twitter authenticated users

Stewart Miles

necitită,
3 ian. 2017, 18:34:3703.01.2017
– fireba...@googlegroups.com
If you're seeing a hang when logging-in the same user more than once, it's possible we have fixed this issue internally and we'll have a patch out in a our next release which should be pretty soon.  We have a few more issues to work out first.

As far as we can tell this isn't related to scene transitions but instead is a general problem with task completion across the SDK on Android.  i.e if a task completes immediately (e.g if a user is already signed in and you sign in again) the task completion will never be propagated to the application.

Thanks for your patience.
Stewart

I/art     ( 8666): DexFile_isDexOptNeeded failed to open oat file '/data/dalvik-cache/x86/data@da...@com.google.android.gms@app_chimera@m@00000001@DynamiteModulesA_GmsCore_prodlmp_alldpi_relea...@classes.dex' for file location '/data/data/com.google.android.gms/app_chimera/m/00000001/DynamiteModulesA_GmsCore_prodlmp_alldpi_release.apk': Failed to open oat filename for reading: No such file or directory
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Nicklas Ruiterman

necitită,
4 ian. 2017, 10:28:3804.01.2017
– Firebase Google Group
Looking forward to the next release

i think a multi-feature quickstart-unity sample would benefit developers like myself very much
I/art     ( 8666): DexFile_isDexOptNeeded failed to open oat file '/data/dalvik-cache/x86/data@da...@com.google.android.gms@app_chimera@m@00000001@DynamiteModulesA_GmsCore_prodlmp_alldpi_release.apk@classes.dex' for file location '/data/data/com.google.android.gms/app_chimera/m/00000001/DynamiteModulesA_GmsCore_prodlmp_alldpi_release.apk': Failed to open oat filename for reading: No such file or directory

Stewart Miles

necitită,
19 ian. 2017, 07:18:3119.01.2017
– Firebase Google Group
We have released version 1.1.1 of the Firebase Unity SDK, which fixes this issue. You can view the release notes and download the new version from http://firebase.google.com/docs/unity/setup.

Cheers,
Stewart
Răspundeți tuturor
Răspundeți autorului
Redirecționați
0 mesaje noi