pierr3 / VectorAudio

An Audio-For-VATSIM ATC Client for macOS, Linux and Windows
GNU General Public License v3.0
47 stars 11 forks source link

Unable to connect #31

Closed Abbaejet closed 1 year ago

Abbaejet commented 1 year ago

After updating to the latest version 0.6.0 the connect button does nothing. Vector Audio recognises my Euroscope as connected to the network.

jonaseberle commented 1 year ago

Hi @Abbaejet, we probably need a lot more information from you. Like: Which operating system? Which VectorAudio settings? What did you do exactly? What is in the log file (e.g. afv.log)?

0.6.0 works good for me (Linux, pipewire).

Abbaejet commented 1 year ago

Apoligies for not adding this info.

I am on Windows 11.

Here is a screenshot of my settings within Vector audio Screenshot 2023-02-10 202227

For what I did I waited for the connect button to light up before clicking it, but nothing happens. In the VectorAudio log it simply says unable to connect. I have also tried connecting using Ross's AFV software and it worked fine. I also tested it with a completely uninstalled and reinstalled VectorAudio

Here is my log attached vector_audio.log

pierr3 commented 1 year ago

Thanks for the details, that's weird. Can you post your afv.log file if you have any, and could you triple check your password ? It's somehow struggling to connect to the API

Abbaejet commented 1 year ago

If I did have an afv.log file where would I find it, as it's not in the main program folder? A for password I checked that again and seems correct

pierr3 commented 1 year ago

Have you still been getting this issue? The AFV servers have been particularly finicky this past week and this may have been the root cause of the issue.

Abbaejet commented 1 year ago

I have only just now had a chance to test this and it is still doing the same thing. Interestingly though the log has a different line before the Failed to connect note

[2023-02-20 20:07:52.968] [VectorAudio] [info] Client position is unknown, setting default. [2023-02-20 20:07:52.968] [VectorAudio] [error] Failled to connect

Not sure if this is related or not.

pierr3 commented 1 year ago

There is some issue with your internet connection or local configuration. Are you running through a proxy or VPN or anything? I will push a release to add more information to the debug message.

pierr3 commented 1 year ago

Please also check your system time and try to sync your computer clock. Authentication to the AFV API is time-dependent.

pierr3 commented 1 year ago

Version 0.7.0 adds more error messages on failure to connect, give it a try.

Abbaejet commented 1 year ago

Not using a proxy or VPN. I updated to the latest version however the error message still just says "failled to connect". I have managed to connect using Ross's AFV client.

pierr3 commented 1 year ago

Out of curiosity, is this still occurring on the present version?

Abbaejet commented 1 year ago

I hadn't tried it in a while and just tested it and it magically appears to be working. I did reset my firewall settings recently (again) so maybe that's it. Either way thanks for the help :)

Abbaejet commented 1 year ago

Well sadly seems to have been a premature celebration as it's not working again

pierr3 commented 1 year ago

Really strange but I think this is likely something on your end since it seems to be working again after a firewall reset. I changed nothing to the client since it started working again haha. Maybe an issue with the AFV API, or the software being blocked by your system since the executable is not signed on Linux?

MarkVI2 commented 1 year ago

I am having the similar issue but on MacOS M2. Password and CID are both correct. Settings are quite similar to what OP has showed. Where can I find the API call? Maybe there is something wrong with how the API is addressed in the Unix based systems? API and Voice are both shown in red.

vector_audio.log

pierr3 commented 1 year ago

Version 1.0.0 includes a potential fix for this, as well as additional logging. If you still face this issue, please post your vector.log file. Please also report if the issue is no longer. Thanks for your help!

Abbaejet commented 1 year ago

I'll take a look once I'm able and let you know

Abbaejet commented 1 year ago

Had a chance to test, still not working however also found an older AFV.log from last test so able to see that it gets stuck at initialising the headset audio.

Here's both logs for your reference, I'll try some debugging on my end as well.

afv.log vector_audio.log

pierr3 commented 1 year ago

Thanks! Can you try changing the headset device? It is the primary device and must be set in order to connect. If you can also compile on your end in Debug, the log would contain more details about the audio devices. It's looking more like an issue with opening audio devices than the API.

pierr3 commented 1 year ago

I've managed to partially reproduce the issue using Bluetooth headphones. It seems like there is a delay in opening the input device. It does end up connecting but it takes a couple of seconds. As another possible fix, try changing the input device to something else.

Abbaejet commented 1 year ago

So I attempted with a different audio device and it still doesn't work. Is it potentially to do with it being used by other software? I'll continue investigating, the times when it has worked it did have the delay you mentioned with the Bluetooth. I am on Windows 11 64-bit for you. Once I'm able to compile my own debug I'll send you those logs too

pierr3 commented 1 year ago

Yes, maybe the audio device being used by another service would cause issue. I've uploaded debug builds to the latest release, can you try this and look at the logs? Thank you!

Abbaejet commented 1 year ago

I did a fresh install using the debug version and heres the log for that vector_audio.log

pierr3 commented 1 year ago

Nothing special in the log, it definitely seem like it does not open the device at all, I do not know why. Let me know if you manage to experiment more, and if anyone else also faces that issue.

pierr3 commented 1 year ago

v1.1.0 adds back the option to choose the audio API to use, and there is further error logging regarding audio devices. Can you please try again and choose another audio API if available, seeing if that makes a difference? Thank you for your help!

Abbaejet commented 1 year ago

New log for v1.1.0 Settings were changed between DirectSound and Default for the two connection attempts.

vector_audio.log

Abbaejet commented 1 year ago

I've also tried fiddling with audio drivers, settings etc. to no avail.

pierr3 commented 1 year ago

Have you also try the test audio button in the settings to see if that works? You should see the VU meter move below the test button. The logs still show an issue with the API connection. Can you check in settings file if your vatsim credentials are saved properly? There might be an encoding issue or something else. You can check the readme to find the settings file location. Thank you once again for your help!

I also checked in the with AFV Team, it seems like there is not even a trace in the API log, my guess is that it is still audio related.

pierr3 commented 1 year ago

Please try that with the debug builds being uploaded and share your afv.log!

Abbaejet commented 1 year ago

Here's the debug log, doesn't seem to show anything of note. No AFV.log with this build? Seems to be super hit and miss whether an afv.log is generated or not.

vector_audio.log

pierr3 commented 1 year ago

afv.log has been merged into the main log file. It is weird because your last log file clearly showed the connection attempt failed at the API level. Does this log file include you trying the mic test in the settings? Because if so, the log file does not contain any trace of successfully opening the audio devices. Your last log also showed only 2 backends, but now it reflects 4. Can you try and check all your audio drivers, run any updates, see if you have any special audio configuration, recheck 5 times your credentials? Thank you!

Abbaejet commented 1 year ago

So I've got it working on this test, only thing I did differently was run the mic test before clicking connect. I'll do some more testing in the coming days to see if this is the fix

pierr3 commented 1 year ago

Any updates to see if it was that?

Abbaejet commented 1 year ago

Apologies, I did try it again last night and it didn't work again, strangely between that and the last time when it worked I had updated my audio driver. I'll try again tonight and do a fresh log for you.

pierr3 commented 1 year ago

Is any one else facing this issue? Unfortunately @Abbaejet this is looking more and more like an issue on your hand, but the next release will have a small change which may help

Abbaejet commented 1 year ago

No problem at all. I'll continue investigating and if I work out the source I'll let you know.

Abbaejet commented 1 year ago

@pierr3 So in my research it seems that it's a permissions thing and that open vector audio in admin mode and running the mic test in the settings before trying to connect works pretty well 99% of the time.

pierr3 commented 1 year ago

Amazing thanks, I also added code that forces the mic to open before the connection to AFV is attempted, so hopefully just running VectorAudio as admin should be sufficient. I will also force the executable to ask for admin permissions! Thank you so much for your help!

Abbaejet commented 1 year ago

Just wanted to let you know @pierr3 that the latest version works flawlessly. Thanks again for making such a great piece of software!

pierr3 commented 1 year ago

That is so great to hear! Thank you for all your help debugging!