-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Can't connect via TLS #55
Comments
Also, if I start spark with |
Can you try making a request from a remote machine using |
Yes. When I run it it gets stuck for a couple of minutes in the following state:
and then prints the error below and exits:
|
Are you able to access it from the same host running the server using |
No, I can't. It fails with essentially the same output as before (changing the issue title to reflect). |
I have the same problem and can't use Spark wallet except with --no-tls. |
@hillelt @sumBTC which OS and nodejs version are you using? Btw, another alternative that you could consider is using |
Ubuntu 16.04, spark-wallet 0.2.2 and nodejs 11.8.0 |
Ubuntu 18.04 spark-wallet 0.2.2 nodejs v11.6.0 Got an error trying to start with |
Can confirm, also cannot open without the --no-tls flag. Simply goes to connection refused |
can also confirm, cannot open without the --no-tls flag. |
By the way, I just found out that my router (Bezeq Be) comes with a "secure surfing" protection that randomly blocks me from establishing secure connections with certain web-sites (e.g. Tor). Not sure yet but I have a feeling the problems might be related. |
Having the same issue on debian. port allowed on firewall but https fails. --no-tls works. |
Same issue on Ubuntu 16. Can't access remotely. |
@shesek see also https://github.com/mimblewimble/grin/issues/2523 (maybe an opportunity for cross pollination: solutions like i2pd might be relevant for spark or maybe some of the work on spark-wallet could be relevant to grin). |
I am unable to open even with --no-tls flag. Keeps redirecting to https. |
@shesek After trying to tweak tls/ssl for Ubuntu for days and not being able to connect via In
into
and that made spark-wallet finally work in a browser (including the camera permission) without --no-tls. See the comment (As of NodeJS 10.x ...) in your own hint. I don't understand why the App still refuses to connect. I have added the TLS certificate (cert.pem) as a user trusted certificate. I don't see anything in the server logs when the App tries to connect, while I do see text lines appear when spark-wallet (successfully) connects in a browser. Now, I would be more than happy to use spark-wallet in a browser but there the camera has permission but when I try to scan a QR-code (for example via coinpanic.com) a red line starts scanning but the QR-code isn't read, whatever I try. While with the App (with --no-tls) the QR-code is read immediately. |
This is necessary as of nodejs 10 and was preventing TLS from working properly (#55). Thanks to @sumBTC for figuring this out! #55 (comment) Also see the "As of NodeJS 10 ..." comment in https://stackoverflow.com/a/42019773/865693
This is necessary as of nodejs 10 and was preventing TLS from working properly (#55). Thanks to @sumBTC for figuring this out! #55 (comment) Also see the "As of NodeJS 10 ..." comment in https://stackoverflow.com/a/42019773/865693
@sumBTC Thank you! I was finally able to reproduce the issue by upgrading to nodejs 10 and was able to resolve it by resuming the socket asynchronously as you suggested. I implemented this in 3fc7e1a.
I'm not entirely sure, but I think that some Android versions/configurations may not respect user-trusted certificates for connections made by apps (and block the requests). It worked for me when I tried it awhile back (I normally use onion), but I've heard of others having issues.
Which browser and version are you using? I'm wondering if this is also somehow related to the user-trusted self-signed tls certificate. Websites without tls or with invalid certs are not allowed to access the camera, perhaps this restriction is still in place for websites with user-trusted certs? I'll try to look a bit more into how user-trusted certs affect these two issues. Would it be possible for you to point some (sub)domain at your IP address and try the letsencrypt integration, to help pinpoint if the self-signed cert is the cause? |
Glad to hear that because if you can't reproduce an issue it's kind of impossible to solve it.
But I am allowed to access the camera now that tls is working.
I tried it with Google Chrome (79.0.3967.93) and Firefox (6.8.30) (on my android (9) phone). Both give me permission to use the camera and start scanning the QR code for Pay but are never able to read it and report back what's in the QR-code while other scanners report back immediately (including the spark-wallet App) Am I right that Pay will not accept any QR-code but only specific QR-codes that are valid invoices? If so, I think the problem lies there. The QR-code is not seen as valid for some reason. |
I installed spark from npm (v0.2.2) and I can connect locally. However, when starting the server with
spark-wallet -i 0.0.0.0
and browsing tohttps://<internal_ip>:9737
my web browser times out trying to establish connection. The client machine is a different box on my home network and I tried connecting with Firefox, Chrome and Brave, all timing out in the same fashion.Note that I can telnet to the internal ip and the server machine is responsive. It seems like something in the TLS handshake might be broken.
On the server:
On the client (browsers timing out, telnet is working):
The text was updated successfully, but these errors were encountered: