i receive UriFormatException from version 1.05 when login using walletconnect via WebGl. version 1.04 working fine. pls help tq
Hi @enoonmai. I am having the same problem as it was saving my class ACL as “Master Key Only” I set my PublicReadAccess = true and PublicWriteAccess, but I was still getting “Master Key Only”. Have you figured out the solution for this?
Hi, thanks for your solution, I able to run photon 2 in WebGL. but i have problem with player swapping controller. when one player in the room, the playercontroller is working, but when second player join the room, the player 1 control player 2 while player 2 control player 1. Do u hav the same problem? TQ
You have to verify the authority of the player
Use photonView.isMine to do this
If true, you can use and move the player
If false, you can’t
This is the basic logic for multiplayer
Would make a lot of sense as a new thread.
I do note receive the same error. Please double check the fields in your MoralisSetup Controller. Look to see that both Server Uri and RPC Node Uri are set from the values on your Moralis Server.
**
If this values are set, does the same error happen if you run it in the IDE? If so please copy the text of the exception and post it.
Regards,
David
TQ, missing the Rpc node, all working now
where do I find this Rpc Node URI? I have Server URL and AppID, but where is this from?
In the Admin Panel of you Moralis Server click on Speedy Nodes:
Then click on the “Endpoints” button of the target chain. Choose the URI of the endpoint you want to send Web3 requests to.
Regards,
David
Okay I understand this is not a change to any of the core features, just an update to the Examples.
ERROR - ethereum-unity-boilerplate - WEBGL: Websocket.instance.ws.onopen
Hello we are getting an error when we try to test the current sample
Invoking error handler due to
ReferenceError: Runtime is not defined
at WebSocket.instance.ws.onopen (https://d147qom55yq2an.cloudfront.net/Build/Build2022.framework.js.br:3:58138)
PD: I have not made any changes to the code, I just put the parameters of my moralis server and compiled the game.
We are using
Unity version: 2021.2.4f1
Build platform: WebGL
Thank you for letting me know. Looks like a few people are seeing the same with that Unity version.
On the github repo Issue #48 has been opened to track this.
What is the Unity Version who you is using?
2020.3.26.
The issue with 2021.x.x appears to be related to the jslib that WalletConnect is using. I have been trying some adjustments to see if I can fix it. I just do not want to break it for the current Unity version.
Hi !
I’m on v1.0.5 and unity 2020.3.23
This is my WalletConnectHandler method (having changed anything):
public async void WalletConnectHandler(WCSessionData data)
{
Debug.Log("Wallet connection received");
// Extract wallet address from the Wallet Connect Session data object.
string address = data.accounts[0].ToLower();
string appId = MoralisInterface.GetClient().ApplicationId;
long serverTime = 0;
// Retrieve server time from Moralis Server for message signature
Dictionary<string, object> serverTimeResponse = await MoralisInterface.GetClient().Cloud.RunAsync<Dictionary<string, object>>("getServerTime", new Dictionary<string, object>());
if (serverTimeResponse == null || !serverTimeResponse.ContainsKey("dateTime") ||
!long.TryParse(serverTimeResponse["dateTime"].ToString(), out serverTime))
{
Debug.Log("Failed to retrieve server time from Moralis Server!");
}
Debug.Log($"Sending sign request for {address} ...");
string signMessage = $"Moralis Authentication\n\nId: {appId}:{serverTime}";
string response = await walletConnect.Session.EthPersonalSign(address, signMessage);
Debug.Log($"Signature {response} for {address} was returned.");
// Create moralis auth data from message signing response.
Dictionary<string, object> authData = new Dictionary<string, object> { { "id", address }, { "signature", response }, { "data", signMessage } };
Debug.Log("Logging in user.");
// Attempt to login user.
MoralisUser user = await MoralisInterface.LogInAsync(authData);
if (user != null)
{
Debug.Log($"User {user.username} logged in successfully. ");
}
else
{
Debug.Log("User login failed.");
}
HideWalletSelection();
}
here is the full log screenshot :
After you do a login in attempt are there any errors in the Log on your Moralis server?