balzack / databag

fast & lightweight self-hosted messenger
Apache License 2.0
885 stars 46 forks source link

Call Ux issues #33

Closed samuraikid0 closed 1 year ago

samuraikid0 commented 1 year ago

If I call from Computer to Mobile the answer button is hide (pic1) 1296-412-max

If I call from mobile to computer and activate mobile camera I get this (pic2) mobile-pc after activate camera

Thanks !!

balzack commented 1 year ago

wow....this is very strange...I will try and reproduce.

Does it work at all, with audio for example? In mobile, is your video permission enabled? In mobile, do you see the video that should be sent (in the lower left)?

samuraikid0 commented 1 year ago

Ok thanks for the reply

I've tested and I got no sound..

When receiving the call on computer I can see that the @domain doesn't show it shows "Myusermame@undefined" instead

Yes I've set the permissions

I can only see each device own camera on Mobile I can see the mobile camera and on computer I can see computer camera and not the other device camera it's blank income call from mobile to computer

Thanks !

balzack commented 1 year ago

Sorry, a couple more questions as I try and reproduce:

Are you using the demo STUN/TURN server (bottom of the github readme); if not could you test with that? If that also doesn't work, could you create two accounts on the demo site 'databag.coredb.org' and try it there?

samuraikid0 commented 1 year ago

Sorry, a couple more questions as I try and reproduce:

Are you using the demo STUN/TURN server (bottom of the github readme); if not could you test with that? If that also doesn't work, could you create two accounts on the demo site 'databag.coredb.org' and try it there?

I'm using my stun server, give me some minutes to test

samuraikid0 commented 1 year ago

Yes just tested with the test stun server on my server and got the exact same results has described above If I call computer - mobile the "Myusername@domain" shows correct If I call mobile - computer get "Myusername@undefined"

Thanks !

balzack commented 1 year ago

I think there are two issues, the '@undefined' is one, but the video should still playback.

To confirm, in that test with the demo stun/turn, the video playback also didn't work?

samuraikid0 commented 1 year ago

I think there are two issues, the '@undefined' is one, but the video should still playback.

To confirm, in that test with the demo stun/turn, the video playback also didn't work?

Correct it shows only the own device camera, If I allow the 2 cameras the window will become like in (pic2)

If I allow one shows this ignore the black square camera is cover dbcore stun test

balzack commented 1 year ago

I am able to reproduce your issues around '@undefined'. I will fix these and see if they have an impact on the video not playing back. Thank you for your help with this bug!

samuraikid0 commented 1 year ago

I am able to reproduce your issues around '@undefined'. I will fix these and see if they have an impact on the video not playing back. Thank you for your help with this bug!

Great ! A lot of functions had been added.

Thanks !

balzack commented 1 year ago

When you get a chance, can you update the software and then try the calling feature again? I pushed an update to both the container and mobile apps. Thanks again for your help!

samuraikid0 commented 1 year ago

When you get a chance, can you update the software and then try the calling feature again? I pushed an update to both the container and mobile apps. Thanks again for your help!

Alright the name now fits in mobile and the @undefined on webpage shows the name of the person calling, without the @domain

Great ! Thanks !!

But still no luck on transmitting video/audio the (pic2) is still happening, do you have your server working with it ?

I notice this on docker logs when calling

2023/05/23 12:18:43 /internal/api_status.go:108 write tcp 172.17.0.3:7000->172.17.0.1:34292: write: broken pipe 2023/05/23 12:18:43 GET /status?mode=ring Status 4m0.007138238s

balzack commented 1 year ago

Could you create two test accounts at [https://databag.coredb.org/#/create] and see if the calling works. You will probably need to click the 'filter' icon to find the other account (as shown in screenshot). That is my public demo server, and it works for me.

If that doesn't work, I've been reading that some networks may require tcp for NAT traversal, and you may want to try the webrtc url as: turn:34.210.172.114:3478?transport=tcp

The log you posted I also frequently see when my phone turns off and the websocket connection is broken. It is expected, and reconnects when the app is used again.

I'll keep researching the issue, sorry for the trouble.

Screen Shot 2023-05-23 at 3 46 24 PM
samuraikid0 commented 1 year ago

Tried the tcp instead udp same issue and have the same issue with using accounts on your server same has when use mine

Assuming the call appears on the other end we can assume the relay server is working ? the test site shows everything correct

I've currently tested with mullvad browser and librewolf the mobile rom is /e/ foundation OS If you want to try debug it

Thanks !!

balzack commented 1 year ago

With the call appearing on the other end, we can only assume the call signaling is working, which doesn't require NAT traversal.

I didn't understand what you meant by 'the test site shows everything correct'

On my laptop, I just opened librewolf and logged into my test account sturn1. I then opened a 'new private window' on my same laptop, and logged into my other test account sturn2. I made a call between the two and enabled video. For me it all works as expected. Because this is on the same device, I think WebRTC avoids any NAT traversal. Is this a test you could also do? If it works, I think I could focus on NAT traversal being the issue.

Thanks for your patience!

samuraikid0 commented 1 year ago

With the call appearing on the other end, we can only assume the call signaling is working, which doesn't require NAT traversal.

I didn't understand what you meant by 'the test site shows everything correct'

On my laptop, I just opened librewolf and logged into my test account sturn1. I then opened a 'new private window' on my same laptop, and logged into my other test account sturn2. I made a call between the two and enabled video. For me it all works as expected. Because this is on the same device, I think WebRTC avoids any NAT traversal. Is this a test you could also do? If it works, I think I could focus on NAT traversal being the issue.

Thanks for your patience!

Alright, I tested your method and it works on both servers using the same computer, but there's little utility in that hehe

Thanks !!

balzack commented 1 year ago

hah, yes I agree, but I think it does suggest NAT traversal is the issue.

When you have time, could you do another test? Could you enable 'wireless hotspot' on your phone, and connect your PC/laptop to the phone hotspot. Then try calling from one account on your phone to the other account on your PC/laptop.

If this works, then there is something about webrtc, or the way I have configured it, that doesn't play nice with your home network.

samuraikid0 commented 1 year ago

hah, yes I agree, but I think it does suggest NAT traversal is the issue.

When you have time, could you do another test? Could you enable 'wireless hotspot' on your phone, and connect your PC/laptop to the phone hotspot. Then try calling from one account on your phone to the other account on your PC/laptop.

If this works, then there is something about webrtc, or the way I have configured it, that doesn't play nice with your home network.

Ok, so doing this test resulted in the same issue (pic2) no video on the other end

Thanks !

balzack commented 1 year ago

hmmm.....perhaps NAT traversal is not the issue. Perhaps it's related to the foundation os, which I haven't tested on, but I do want to support.

I am going to buy an old Pixel 5, which seems well supported by /e/ foundation os, and hopefully be able to reproduce it there.

It will be a little while before I get back to you, but thanks for your support!

samuraikid0 commented 1 year ago

Alright, yes it could be, it's a fork from lineageOS that is developed by /e/ foundation and support currently 227 Smartphones Models

Great ! Take your time it's not a fatal bug and the feature is "new" so it is expected Just one suggestion add a notification or something for when someone calls you, otherwise you'll only get the call if you are inside the app

Thanks once again

balzack commented 1 year ago

I did add notifications for calls, but you might need to logout, then log back in.

Its not ideal, but the notifications to receive are registered at login time. I might need to change that.

samuraikid0 commented 1 year ago

It doesn't appear on this os if I open the app the call box is already there Give me some time your server send me sound now on the call, the video still isn't working

samuraikid0 commented 1 year ago

Yes sound is working now on my server too !!

EDIT

Alright understood it seems tor proxy on mobile doesn't permit the correct function of caller

Is the video call still under development ?

Thanks

balzack commented 1 year ago

Hmm, are you saying I should add notifications to the broswer side?

I don't really follow the last message. Does audio work now, or is this a message intended for a different thread?

samuraikid0 commented 1 year ago

The notification call doesn't seem to work on /e/ Someway to see that someone is calling you (If I'm on android menu and receive a call I can't see, if I open the app I can see someone is calling.

Yes, it was working all along it seems it can't function if you're using the tor network for mobile app, If turned off it work, the call not the video

balzack commented 1 year ago

Well that's great news. It makes sense it wouldn't work with tor. Hopefully we'll get video working once my Pixel5 arrives.

samuraikid0 commented 1 year ago

Alright we can mark this issue has close, at least we found a bug

Cheers !

samuraikid0 commented 1 year ago

Alright, final update video is working and sound is working now the (pic2) expanded into the video call So it's all good I'll open another issue for the caller notification on mobile app