Browser wallet fails to connect to remote daemon.
Closed this issue · 7 comments
Browser wallet restores without problem but fails to connect to a remote daemon. Also tested the sample code below from https://github.com/woodser/xmr-sample-app with same results. Any clue what can be the issue?
`import assert from "assert";
import * as moneroTs from "monero-ts";
/**
- Sample code using monero-ts.
*/
runMain();
async function runMain() {
// create wallet from seed phrase using WebAssembly bindings to monero-project
let walletFull = await moneroTs.createWalletFull({
password: "supersecretpassword123",
networkType: moneroTs.MoneroNetworkType.STAGENET,
server: {
uri: 'https://node.sethforprivacy.com',
username: '',
password: ''
},
seed: "hijack lucky rally sober hockey robot gumball amaze gave fifteen organs gecko skater wizard demonstrate upright system vegan tobacco tsunami lurk withdrawn tomorrow uphill organs",
restoreHeight: 589429
});
console.log('is connected', await walletFull.isConnectedToDaemon())
// synchronize with progress notifications
await walletFull.sync(new class extends moneroTs.MoneroWalletListener {
async onSyncProgress(height: number, startHeight: number, endHeight: number, percentDone: number, message: string) {
// feed a progress bar?
}
});
// synchronize in the background
await walletFull.startSyncing();
await walletFull.close();`
Returns the following errors:
is connected false LibraryUtils.js:262 Uncaught (in promise) Error: Wallet is not connected to daemon at c.deserializeError (http://localhost:8080/sample_code.dist.js:2:1169100) at c.invokeWorker (http://localhost:8080/sample_code.dist.js:2:1168866) at async q.invokeWorker (http://localhost:8080/sample_code.dist.js:2:1363636) at async q.sync (http://localhost:8080/sample_code.dist.js:2:1344675) at async http://localhost:8080/sample_code.dist.js:2:1833141 Worker error: Error: Wallet is not connected to daemon at D.sync (http://localhost:8080/monero_web_worker.js:2:1693166) at async self.sync (http://localhost:8080/monero_web_worker.js:2:1562512) at async self.onmessage (http://localhost:8080/monero_web_worker.js:2:1550098)
https://node.sethforprivacy.com/ is for mainnet, according to https://monero.fail/?web_compatible=true.
https://node.sethforprivacy.com/ is for mainnet, according to https://monero.fail/?web_compatible=true.
Apologies for the overlook in the example given. The issue remains with networkType: moneroTs.MoneroNetworkType.MAINNET,
and returns the same error.
I'm seeing similar behavior in the offical gui with that seed. Have you tried a seed for mainnet?
I'm seeing similar behavior in the offical gui with that seed. Have you tried a seed for mainnet?
I have tried multiple mainnet seeds, same result all across.
It appears there's something wrong with that connection. I can't get https://node.sethforprivacy.com/ to work in the official gui either.
Other daemons are working, like https://node-xmr.encryp.ch:18089, which is web-compatible.
Found the problem. The default port is 443, so https://node.sethforprivacy.com:443 works.
Found the problem. The default port is 443, so https://node.sethforprivacy.com:443 works.
Indeed that was the problem -- thank you very much!