Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HyperPlay package added and remember me functionality #984

Merged
merged 10 commits into from
May 30, 2024

Conversation

rob1997
Copy link
Collaborator

@rob1997 rob1997 commented May 29, 2024

No description provided.

@rob1997 rob1997 self-assigned this May 29, 2024
@rob1997 rob1997 linked an issue May 29, 2024 that may be closed by this pull request
@rob1997 rob1997 marked this pull request as ready for review May 29, 2024 10:02
Copy link
Contributor

@kantagara kantagara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SMall change required but overall nice!

Copy link
Contributor

@juans-chainsafe juans-chainsafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember me is working, but when you log out, you can't login again, the issue is that the "Login with Hyperplay" button doesnt do anything.

I see this error log always when I start the session:

[Web3] Failed to clear hyperplay-data.json : File not found.
UnityEngine.Debug:LogError (object)
ChainSafe.Gaming.Web3.Unity.UnityLogWriter/<>c__DisplayClass3_0:<LogError>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher/<ActionWrapper>d__13:MoveNext ()
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
ChainSafe.Gaming.Evm.Unity.Dispatcher/<>c__DisplayClass8_0:<Enqueue>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher:Update ()

And this when I do the logout:

UnexpectedException: DB:File Opened Twice, /Users/juanmanuelspoleti/Library/Application Support/DefaultCompany/UnitySampleProject/db3.box, Threads
iBoxDB.ByteCodes.C277.m523[T] (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C277.m523 (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.Boolean flushBeforeRead, System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C253..ctor (System.String p1, iBoxDB.LocalServer.DatabaseConfig p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C252.m196 (iBoxDB.LocalServer.DatabaseConfig p1, System.String p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C30..ctor (System.Int64 p1, System.String p2, iBoxDB.LocalServer.DatabaseConfig p3, iBoxDB.LocalServer.Replication.IBoxRecycler p4) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.String name, System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.DB.Open (System.Int64 destAddr) (at <4b0517faac254d598dd4ca5cab979027>:0)
Plugins.CountlySDK.Helpers.StorageAndMigrationHelper.OpenDB () (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Helpers/StorageAndMigrationHelper.cs:96)
Plugins.CountlySDK.Countly.Init (Plugins.CountlySDK.Models.CountlyConfiguration configuration) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Countly.cs:316)
CountlyAnalytics..ctor (ChainSafe.Gaming.Web3.IChainConfig chainConfig, ChainSafe.Gaming.Web3.IProjectConfig projectConfig) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/CountlyAnalytics.cs:33)
System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) (at <e307bbb467104258887a104f6151f183>:0)

@rob1997
Copy link
Collaborator Author

rob1997 commented May 29, 2024

Remember me is working, but when you log out, you can't login again, the issue is that the "Login with Hyperplay" button doesnt do anything.

I see this error log always when I start the session:

[Web3] Failed to clear hyperplay-data.json : File not found.
UnityEngine.Debug:LogError (object)
ChainSafe.Gaming.Web3.Unity.UnityLogWriter/<>c__DisplayClass3_0:<LogError>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher/<ActionWrapper>d__13:MoveNext ()
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
ChainSafe.Gaming.Evm.Unity.Dispatcher/<>c__DisplayClass8_0:<Enqueue>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher:Update ()

And this when I do the logout:

UnexpectedException: DB:File Opened Twice, /Users/juanmanuelspoleti/Library/Application Support/DefaultCompany/UnitySampleProject/db3.box, Threads
iBoxDB.ByteCodes.C277.m523[T] (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C277.m523 (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.Boolean flushBeforeRead, System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C253..ctor (System.String p1, iBoxDB.LocalServer.DatabaseConfig p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C252.m196 (iBoxDB.LocalServer.DatabaseConfig p1, System.String p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C30..ctor (System.Int64 p1, System.String p2, iBoxDB.LocalServer.DatabaseConfig p3, iBoxDB.LocalServer.Replication.IBoxRecycler p4) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.String name, System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.DB.Open (System.Int64 destAddr) (at <4b0517faac254d598dd4ca5cab979027>:0)
Plugins.CountlySDK.Helpers.StorageAndMigrationHelper.OpenDB () (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Helpers/StorageAndMigrationHelper.cs:96)
Plugins.CountlySDK.Countly.Init (Plugins.CountlySDK.Models.CountlyConfiguration configuration) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Countly.cs:316)
CountlyAnalytics..ctor (ChainSafe.Gaming.Web3.IChainConfig chainConfig, ChainSafe.Gaming.Web3.IProjectConfig projectConfig) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/CountlyAnalytics.cs:33)
System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) (at <e307bbb467104258887a104f6151f183>:0)

This is a Countly issue, and it happens when we try and initialize Countly again

@rob1997
Copy link
Collaborator Author

rob1997 commented May 29, 2024

Remember me is working, but when you log out, you can't login again, the issue is that the "Login with Hyperplay" button doesnt do anything.
I see this error log always when I start the session:

[Web3] Failed to clear hyperplay-data.json : File not found.
UnityEngine.Debug:LogError (object)
ChainSafe.Gaming.Web3.Unity.UnityLogWriter/<>c__DisplayClass3_0:<LogError>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher/<ActionWrapper>d__13:MoveNext ()
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
ChainSafe.Gaming.Evm.Unity.Dispatcher/<>c__DisplayClass8_0:<Enqueue>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher:Update ()

And this when I do the logout:

UnexpectedException: DB:File Opened Twice, /Users/juanmanuelspoleti/Library/Application Support/DefaultCompany/UnitySampleProject/db3.box, Threads
iBoxDB.ByteCodes.C277.m523[T] (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C277.m523 (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.Boolean flushBeforeRead, System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C253..ctor (System.String p1, iBoxDB.LocalServer.DatabaseConfig p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C252.m196 (iBoxDB.LocalServer.DatabaseConfig p1, System.String p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C30..ctor (System.Int64 p1, System.String p2, iBoxDB.LocalServer.DatabaseConfig p3, iBoxDB.LocalServer.Replication.IBoxRecycler p4) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.String name, System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.DB.Open (System.Int64 destAddr) (at <4b0517faac254d598dd4ca5cab979027>:0)
Plugins.CountlySDK.Helpers.StorageAndMigrationHelper.OpenDB () (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Helpers/StorageAndMigrationHelper.cs:96)
Plugins.CountlySDK.Countly.Init (Plugins.CountlySDK.Models.CountlyConfiguration configuration) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Countly.cs:316)
CountlyAnalytics..ctor (ChainSafe.Gaming.Web3.IChainConfig chainConfig, ChainSafe.Gaming.Web3.IProjectConfig projectConfig) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/CountlyAnalytics.cs:33)
System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) (at <e307bbb467104258887a104f6151f183>:0)

This is a Countly issue, and it happens when we try and initialize Countly again

@kantagara any thoughts

@juans-chainsafe
Copy link
Contributor

Remember me is working, but when you log out, you can't login again, the issue is that the "Login with Hyperplay" button doesnt do anything.
I see this error log always when I start the session:

[Web3] Failed to clear hyperplay-data.json : File not found.
UnityEngine.Debug:LogError (object)
ChainSafe.Gaming.Web3.Unity.UnityLogWriter/<>c__DisplayClass3_0:<LogError>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher/<ActionWrapper>d__13:MoveNext ()
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
ChainSafe.Gaming.Evm.Unity.Dispatcher/<>c__DisplayClass8_0:<Enqueue>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher:Update ()

And this when I do the logout:

UnexpectedException: DB:File Opened Twice, /Users/juanmanuelspoleti/Library/Application Support/DefaultCompany/UnitySampleProject/db3.box, Threads
iBoxDB.ByteCodes.C277.m523[T] (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C277.m523 (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.Boolean flushBeforeRead, System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C253..ctor (System.String p1, iBoxDB.LocalServer.DatabaseConfig p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C252.m196 (iBoxDB.LocalServer.DatabaseConfig p1, System.String p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C30..ctor (System.Int64 p1, System.String p2, iBoxDB.LocalServer.DatabaseConfig p3, iBoxDB.LocalServer.Replication.IBoxRecycler p4) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.String name, System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.DB.Open (System.Int64 destAddr) (at <4b0517faac254d598dd4ca5cab979027>:0)
Plugins.CountlySDK.Helpers.StorageAndMigrationHelper.OpenDB () (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Helpers/StorageAndMigrationHelper.cs:96)
Plugins.CountlySDK.Countly.Init (Plugins.CountlySDK.Models.CountlyConfiguration configuration) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Countly.cs:316)
CountlyAnalytics..ctor (ChainSafe.Gaming.Web3.IChainConfig chainConfig, ChainSafe.Gaming.Web3.IProjectConfig projectConfig) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/CountlyAnalytics.cs:33)
System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) (at <e307bbb467104258887a104f6151f183>:0)

This is a Countly issue, and it happens when we try and initialize Countly again

@kantagara any thoughts

Just in case, these log errors are not happening in dev, and logout login again is working in dev

@rob1997 rob1997 requested a review from juans-chainsafe May 29, 2024 15:13
@rob1997
Copy link
Collaborator Author

rob1997 commented May 29, 2024

Remember me is working, but when you log out, you can't login again, the issue is that the "Login with Hyperplay" button doesnt do anything.

I see this error log always when I start the session:

[Web3] Failed to clear hyperplay-data.json : File not found.
UnityEngine.Debug:LogError (object)
ChainSafe.Gaming.Web3.Unity.UnityLogWriter/<>c__DisplayClass3_0:<LogError>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher/<ActionWrapper>d__13:MoveNext ()
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
ChainSafe.Gaming.Evm.Unity.Dispatcher/<>c__DisplayClass8_0:<Enqueue>b__0 ()
ChainSafe.Gaming.Evm.Unity.Dispatcher:Update ()

And this when I do the logout:

UnexpectedException: DB:File Opened Twice, /Users/juanmanuelspoleti/Library/Application Support/DefaultCompany/UnitySampleProject/db3.box, Threads
iBoxDB.ByteCodes.C277.m523[T] (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C277.m523 (System.String p1, System.Exception p2) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.Boolean flushBeforeRead, System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.IO.BoxFileStreamConfig.CreateStream (System.String path, iBoxDB.LocalServer.StreamAccess access) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C253..ctor (System.String p1, iBoxDB.LocalServer.DatabaseConfig p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C252.m196 (iBoxDB.LocalServer.DatabaseConfig p1, System.String p2, iBoxDB.LocalServer.Replication.IBoxRecycler p3) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.ByteCodes.C30..ctor (System.Int64 p1, System.String p2, iBoxDB.LocalServer.DatabaseConfig p3, iBoxDB.LocalServer.Replication.IBoxRecycler p4) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.String name, System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.LocalDatabaseServer.GetInstance (System.Int64 address) (at <4b0517faac254d598dd4ca5cab979027>:0)
iBoxDB.LocalServer.DB.Open (System.Int64 destAddr) (at <4b0517faac254d598dd4ca5cab979027>:0)
Plugins.CountlySDK.Helpers.StorageAndMigrationHelper.OpenDB () (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Helpers/StorageAndMigrationHelper.cs:96)
Plugins.CountlySDK.Countly.Init (Plugins.CountlySDK.Models.CountlyConfiguration configuration) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Plugins/Countly SDK/Plugins/CountlySDK/Countly.cs:316)
CountlyAnalytics..ctor (ChainSafe.Gaming.Web3.IChainConfig chainConfig, ChainSafe.Gaming.Web3.IProjectConfig projectConfig) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/CountlyAnalytics.cs:33)
System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) (at <e307bbb467104258887a104f6151f183>:0)

Nvm it was a duplicate instance issue, fixed now

Copy link
Contributor

@juans-chainsafe juans-chainsafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issues were fixed, no more log errors and you can logout and login again.

@rob1997 rob1997 added the ready-to-merge Ready to Merge PR - this'll trigger required checks label May 29, 2024
@rob1997 rob1997 added ready-to-merge Ready to Merge PR - this'll trigger required checks and removed ready-to-merge Ready to Merge PR - this'll trigger required checks labels May 29, 2024
@sneakzttv sneakzttv self-requested a review May 29, 2024 15:31
@rob1997 rob1997 added ready-to-merge Ready to Merge PR - this'll trigger required checks and removed ready-to-merge Ready to Merge PR - this'll trigger required checks labels May 30, 2024
@rob1997 rob1997 merged commit 6ed31fe into dev May 30, 2024
5 checks passed
@rob1997 rob1997 deleted the rob/hyper-play-remember-me-961 branch May 30, 2024 12:43
rob1997 added a commit that referenced this pull request Jan 16, 2025
* working remember me

* new HyperPlay package with samples

* Cleanup and Added documentation

* removed erroneous using statement in Web3Builder

* dependency updated to 2.6

* checkpoint

* countly issue fix

* added duplicate_samples text file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to Merge PR - this'll trigger required checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "Remember me" functionality in HyperPlay Login
4 participants