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

bug: IPv6 addressing doesn't work #147

Open
ghost opened this issue Oct 14, 2022 · 7 comments
Open

bug: IPv6 addressing doesn't work #147

ghost opened this issue Oct 14, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Oct 14, 2022

Describe the bug
The application doesn't seem to support IPv6 addresses in the format: https://[fe80::1ff:fe23:4567:890a]/navidrome (address taken from the Wikipedia IPv6 article only to demonstrate the format)

I tried logging it as the admin user/as a non-admin user - nothing. Tried a simpler password - no dice.

Nginx access log shows no requests made from the device.

To Reproduce
Should be clear from above.

Expected behavior
Same behavior as with IPv4/DNS.

Smartphone (please complete the following information):

  • Device: Xiaomi Redmi 9T
  • OS: Android 11 (MIUI 12.5.8)
  • Subtracks version 1.3.0 (from F-Droid)

Edit: Worth noting that I'm also using a self-signed cert. Possible duplicate of #84? If so, please close.

@ghost ghost added the bug Something isn't working label Oct 14, 2022
@austinried
Copy link
Owner

Has your self-signed certificate also been signed by a CA that is trusted by your phone? In that case it should work without issue, but if not then that would be an issue. I would be curious to know if your issue persists with the v2 alpha though, if you want to try it you can get that here: https://github.com/austinried/subtracks/releases/tag/v2.0.0-alpha.1

@ghost
Copy link
Author

ghost commented May 12, 2023

Hey @austinried thanks for the reply. I tried again with v2.0.0-alpha.2 and it didn't work. I can confirm that I have a trusted self-signed CA installed on my Android phone and that the server is signed by that CA (and a standard lock icon is shown by Chrome without any warnings, hence the cert is trusted by the phone).

The bummer is that no error messages appear inside the app. And sadly there were also no new logs in nginx access logs.

PS. In case someone's interested, this is what I used for generating my certs: https://gist.github.com/stacksmash76/d8076a49da4ca17e460f1c9c5c1f8b7c

@austinried
Copy link
Owner

Gotcha, thanks for the update. I think with the alpha it might have to do with the way I'm trying to parse that into a URL, so I'll have to look into that. More/more specific error messaging is something I'm also going to get in before the beta to hopefully improve that experience as well.

@austinried
Copy link
Owner

How about alpha 3? There should be an error message of some kind this time, and you can share your logs at the bottom in settings for more info.

https://github.com/austinried/subtracks/releases/tag/v2.0.0-alpha.3

@ghost
Copy link
Author

ghost commented May 17, 2023

How about alpha 3? There should be an error message of some kind this time, and you can share your logs at the bottom in settings for more info.

Yep, indeed, there's an error now.

HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: self signed certificate(handshake.cc:393))

Confirmed again in Chrome, certificate is shown as valid and "verified" by Chrome. Going to "Encryption & credentials -> Trusted credentials" I see my CA cert under "User", which, again, seems fine.

Maybe there's some flag which isn't enabled correctly for the underlying Android implementation to handle self-signed certs (even though they're signed by a self-signed CA)?

@austinried
Copy link
Owner

Maybe there's some flag which isn't enabled correctly for the underlying Android implementation to handle self-signed certs (even though they're signed by a self-signed CA)?

Yep, looks like I forgot a bit of network security config that would allow this. By default the app was only trusting the system CA store, and not the user CA store, so I've added that into the config.

If you want to try the build from this PR I think it should get you past that error at least: https://github.com/austinried/subtracks/actions/runs/5008207271?pr=180

@ghost
Copy link
Author

ghost commented May 19, 2023

If you want to try the build from this PR I think it should get you past that error at least: https://github.com/austinried/subtracks/actions/runs/5008207271?pr=180

Unfortunately, same error message. Cleared app cache, uninstalled and then installed the apk artifact.

2023-05-19T23:20:02.297363 INFO GET https://[my-ipv6-address]/navidrome/rest/ping.view?v=1.13.0&c=subtracks&u=REDACTED&s=REDACTED&t=REDACTED
2023-05-19T23:20:02.675349 SEVERE Saving source
HandshakeException: Handshake error in client (OS Error: 
	CERTIFICATE_VERIFY_FAILED: self signed certificate(handshake.cc:393))
#0      _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:99)
#1      _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:142)
#2      _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:915)
#3      _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1044)
<asynchronous suspension>
2023-05-19T23:20:39.590059 INFO GET https://[my-ipv6-address]/navidrome/rest/ping.view?v=1.13.0&c=subtracks&u=REDACTED&p=REDACTED
2023-05-19T23:20:39.905167 SEVERE Saving source
HandshakeException: Handshake error in client (OS Error: 
	CERTIFICATE_VERIFY_FAILED: self signed certificate(handshake.cc:393))
#0      _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:99)
#1      _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:142)
#2      _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:915)
#3      _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1044)
<asynchronous suspension>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant