MyAlgo Connect works fine when it’s called from non secured HTTP site, but when it’s called from secured HTTPS site, it attempts then quits without asking for password, and no error msg. This only happens on MyAlgo, other wallets are connecting fine. Can anyone help?
<script src="myalgo.min.js"></script>
const myAlgoWallet = new MyAlgoConnect();
const settings = {
shouldSelectOneAccount: false,
openManager: false
};
try {
const accounts = await myAlgoWallet.connect(settings);
..
Hi @itchibahn. Out of curiosity: did you get a specific error in the console or network tabs of the dev tools?
Thanks for a reply. There are no error message of any kind in neither the Network nor Console tab. This is what throws me off, no error or warning whatsoever to work with…
I can see in the Network capture:
myalgo.min.js
Status=200
time=2ms
Calling MyAlgo from HTTPS causes above issue, and calling from HTTP was working, but seems to work only to connect. After signing transaction it fails with
Error: Can not open popup windows - blocked
Strangely, no issue on development server, just on EC2.
Error: Can not open popup windows - blocked
Make sure popups are enabled for the site. MyAlgoConnect relies on opening a new window to interact with MyAlgo, which browser may restrict by default.
There’s a brief mention on this in the documentation: Important Considerations | MyAlgo Connect
Correction, it’s working fine with http://ipaddress and http://domain-name.
So just the original issue with https:domain-name.
I wonder if the issue is with the free SSL provided by the AWS EC2 with load balancing. The Apache2 is served over port 80, and the load balancer is forwarding port 443 to 80. I’m gonna try purchasing the SSL and set it within Apache2 to see that would correct the issue.
var arrRsp = [];
var txRsp;
var txn;
algos *= 1000000; // In micro Algo
const algodClient = new algosdk.Algodv2(algodToken, algodServer, algodPort);
try {
const params = await algodClient.getTransactionParams().do();
txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
suggestedParams: {
...params,
},
from: sender,
to: algoEscrowAddr,
amount: algos
});
} catch (err) {
alert("Error: " + err);
return;
}
try {
const myAlgoConnect = new MyAlgoConnect();
const signedTxn = await myAlgoConnect.signTransaction(txn.toByte());
// Returns: {"txId":"string"}
txRsp = await algodClient.sendRawTransaction(signedTxn.blob).do();
} catch (err) {
alert("Error: " + err);
return;
}
I’ve disabled load balancing and SSL certificate on EC2. Manually installed external certificate, and all webpages comes up ok. But still same issue, MyAlgo pops up then disappears after few seconds. Don’t understand why it works from HTTP but not HTTPS site.
So happens that I had debug off, preventing error messages. Got the debug on, and now getting the message: Error: Windows not loaded
And this error message comes up only in HTTPS.
Would appreciate some help.
I was using myalgo.min.js v1.3, I just upgraded to myalgo.min.js v1.4.1, and got little more detailed error message:
TypeError: Cannot read properties of undefined (reading ‘WINDOWS_NOT_LOADED’)