eqMac
eqMac copied to clipboard
Bug: The menu is a white box and can't connect to the website
Disclaimer: Please go through existing issues to avoid creating duplicates. If you found a similar issue please post a comment there. If you are uncertain your issue is related to others then create the issue. Obvious ignorance of this rule might get you blocked from posting new issues. Please tick the box below to show that you have followed the guideline.
- [x] I have checked for a similar issue and am sure it hasn't been reported before.
Describe the bug I am connected to my university network for the first time, and I notices that the eqMac menu UI is just a white box. It still works, but I can't change the settings. I tried looking for a newer version on the website, but I can't establish a secure connection to the server "eqmac.app".
Steps to Reproduce
- Go to my university
- Connect to their wifi
- Click on the eqMac button
- See the white box
Expected behavior I expect to see the usual menu with all the buttons and sliders and stuff/
Setup information:
- Audio device used for playback: Dell S2419H
- Audio transmission interface: HDMI through an HDMI-USB-c adapter.
- macOS Version: 11.6
- eqMac UI Version: Unknown, as I can't use the UI
Screenshots or Console.app logs
Hmm seems like your University is blocking access to domains they don't want you to use during time you're on campus. I can't fix the fact that you can't load the website as I don't have access of your Universities networking servers 😆 The reason the UI doesn't load is because I'm checking if there's internet access by doing a request to apple.com domain, I guess your University allows that domain so the app thinks there's internet and tries to load the "Online" version of the UI. I can fix that in the upcoming update by checking internet access to the eqmac.app domain. Thanks for reporting this. Will let you know once it's fixed. Btw does it work when you're home or on a different network?
Btw does it work when you're home or on a different network? It does work at home and on some other university networks.
You know I've experienced the same thing for ages on my company network. https://eqmac.app doesn't load and the UI is white. Thanks @roydbt for reporting this and thanks @nodeful for looking into this.
Ok I looked into this and I don't understand why it's not working... From this code: https://github.com/bitgapp/eqMac/blob/master/native/app/Source/UI/UI.swift#L448-L458
Networking.checkConnected { reachable in
if (!reachable) {
returned = true
return completion(false)
}
HTTP.GET(Constants.UI_ENDPOINT_URL.absoluteString) { response in
returned = true
completion(response.error == nil)
}
}
eqMac does a double check for the reachability of the UI and it either fails it will load the UI locally, so really not sure what's going on, as if the network somehow specifically doesn't allow browsers to load some URLs but allows underlying code to reach those endpoints. One way to test this is by typing this in Terminal.app when on restrictive network:
curl https://ui-v3.eqmac.app
and seeing how it reacts. Please let me know.
I think as a short-term workaround you can DISABLE OTA Updates in the settings when you're on a network that loads eqMac fine:
Hi @nodeful Thank you for looking into this. I'll be at the office on Monday and I'll check it out.
Hi @nodeful So I tried out various things from my corporate network:
CURL
curl https://ui-v3.eqmac.app ─╯
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to ui-v3.eqmac.app:443
SWIFT
import Foundation
let url = URL(string: "https://ui-v3.eqmac.app")
let task = URLSession.shared.dataTask(with: url!) {(data, response, error) in
if let data = data {
print("Data: \(data)")
}
if let response = response {
print("Response: \(response)")
}
if let error = error {
print("Error: \(error)")
}
}
task.resume()
Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x6000009c06f0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <87BDA44D-23F4-45EA-98CE-9AA4D684A468>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <87BDA44D-23F4-45EA-98CE-9AA4D684A468>.<1>"
), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://ui-v3.eqmac.app/, NSErrorFailingURLKey=https://ui-v3.eqmac.app/, _kCFStreamErrorDomainKey=10}
BROWSER
fetch('https://ui-v3.eqmac.app').then(response => console.log(response.ok)).catch(error => console.log(`fetch error: ${error}`))
fetch error: TypeError: Failed to fetch
And yet I get the white screen of death as soon as I'm connected to the network:
Turning off OTA or disconnecting from the network fixes the white screen of death.
I noticed something peculiar though: When I disabled OTA in the eqmac settings, the https://eqmac.app/ website would load. With OTA enabled it didn't load. This isn't reproducible each time. I think I might need to reboot to reproduce this. Does eqmac do any DNS announcements or something with Bonjour?
Thanks for your research @pfei5 really good stuff.
Unfortunately still have no clue what it could be, I'm not too strong in such networking issues.
My DNS and TLS/SSL for the ui-v3 subdomain is handled by Cloudflare, where's all the other subdomain's DNS is handled by Cloudflare but TLS/SSL is issued by LetsEncrypt and managed by Google Cloud...
Can you do a curl https://api.eqmac.app
on the network where UI doesn't load?
Hi @nodeful The output of that is identical to the previous output:
curl https://api.eqmac.app
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to api.eqmac.app:443
I did notice another peculiarity though. Last time when I tried connecting to .eqmac.app addresses I did initially get through, from the corporate network. A few minutes later I no longer got through. My machine is managed by my corporation. If I boot while inside the network the management process starts (root certificates get installed, proxy configurations are set, a whole lot of creepy stuff) and probably takes a while to complete.
Ultimately what happens with network requests is that they get held up by the proxy server. Certain domains are whitelisted, the rest is unreachable, while my machine believes that it has unrestricted network access.
I was wondering at what point the routine you shared is executed: https://github.com/bitgapp/eqMac/blob/master/native/app/Source/UI/UI.swift#L448-L458
Does that run at boot using Launchd? Or does it run when the application is started?
Perhaps deferring the reachability code to run as late as possible could mitigate this issue?
Do you get a viewWillAppear
or something like that when the UI appears? If so, re-running the reachability code at that point might help.
What do you think?