jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
22.83k stars 6.68k forks source link

iOS - changing Default_Server_URL breaks invitation functionality #3833

Closed pdarcos closed 5 years ago

pdarcos commented 5 years ago

Hi again,

Just cloned the ios app and was able to compile and run ok. But when I click on "invite someone" in its new menu location, nothing happens. It used to work fine in the previous version when the button was on the display and not in the menu.

All I see in the xcode debug logs is:

2019-01-24 18:27:45.823077+0000 jitsi-meet[3494:1133586] [MC] Filtering mail sheet accounts for bundle ID: xxx.yyy.zzz, source account management: 1 2019-01-24 18:27:45.823574+0000 jitsi-meet[3494:1133586] [MC] Filtering mail sheet accounts for bundle ID: xxx.yyy.zzz, source account management: 2

Hope this report helps.

Cheers

saghul commented 5 years ago

Thanks for the report! I happen to have tested that today and it worked for me.

What iOS version did you test?

pdarcos commented 5 years ago

Strange. I just did a fresh compilation. I'm using an XR running 12.1.1

saghul commented 5 years ago

Hum, I cannot repro on iOS 10 (iPhone 6) nor iOS 12 (iPhone 7+). Do you see anything in the logs?

pdarcos commented 5 years ago

Hmmm. Let me try to compile on an iPhone 7 I have to see if it is a model specific issue.

I'll get back to you later today

pdarcos commented 5 years ago

OK, I just compiled the same project onto an iPhone 7 (12.1.2) and got the exact same behavior.

Very weird. I can send you the full xcode debug logs privately but I don't see anything besides the messages reported above already.

pdarcos commented 5 years ago

@saghul Here's the logs https://paste.ee/d/kOHzt

pdarcos commented 5 years ago

Hi again @saghul

I just did a fresh git clone and compiled and at first I was having the same issue.

What worked for me was to clean the build, close xcode, reboot the macbook and compile again. For some reason, even though there was no change in the code, it is now working as expected.

Could be that xcode 10.0.1 is buggy. Sorry for the false alarm

saghul commented 5 years ago

No worries, I'm glad it's working for you again!

pdarcos commented 5 years ago

Looks like I spoke too soon. :( It seems this weird behaviour is back.

I see in the debug console addPeopleEnabled":false. Could this be the cause of the problem?

2019-01-27 17:41:58.972619+0000 jitsi-meet[345:16691] Running application "App" with appParams: {"rootTag":1,"initialProps":{"welcomePageEnabled":true,"dialOutEnabled":false,"pictureInPictureEnabled":false,"externalAPIScope":"B8733945-EB72-4496-A0F0-79DC4B003B91","timestamp":38558566650,"addPeopleEnabled":false}}. DEV === true, development-level warning are ON, performance optimizations are OFF

When I click on invite someone I see in the debug logs

2019-01-27 17:42:25.697441+0000 jitsi-meet[345:16685] [MC] Filtering mail sheet accounts for bundle ID: my.bundle.id, source account management: 1 2019-01-27 17:42:25.700672+0000 jitsi-meet[345:16685] [MC] Filtering mail sheet accounts for bundle ID: my.bundle.id, source account management: 2

The only thing that I changed in the code was the bundle ID so I could sign the app. But that shouldn't affect the invite someone option, or is there a new setting somewhere?

Cheers

pdarcos commented 5 years ago

I've closed xcode, rebooted the mac, cleaned the project, etc and still getting that same "Filtering mail sheet accounts for my bundle ID" in the logs when clicking Invite someone. The screen freezes for a split second when clicking Invite someone but then nothing happens and the logs only show that message.

Either I need to update my bundle ID somewhere else in the code, or something's broken with my environment.

Here's the output when I install npm and the pods. There were a bunch of security warnings but I don't think they're the cause of this issue. Should I try to update to npm 6.7.0?

Binary found at /Users/user/Documents/dev/app/temp/jitsi-meet/node_modules/node-sass/vendor/darwin-x64-67/binding.node Testing binary Binary is fine added 1839 packages from 978 contributors and audited 31117 packages in 57.569s found 4 vulnerabilities (2 low, 1 high, 1 critical) run npm audit fix to fix them, or npm audit for details

╭───────────────────────────────────────────────────────────────╮ │ │ │ New minor version of npm available! 6.4.1 → 6.7.0 │ │ Changelog: https://github.com/npm/cli/releases/tag/v6.7.0 │ │ Run npm install -g npm to update! │ │ │ ╰───────────────────────────────────────────────────────────────╯

Downloading dependencies Installing Crashlytics (3.12.0) Installing DoubleConversion (1.1.6) Installing FLAnimatedImage (1.0.12) Installing Fabric (1.9.0) Installing Firebase (5.15.0) Installing FirebaseAnalytics (5.4.0) Installing FirebaseAnalyticsInterop (1.1.0) Installing FirebaseCore (5.1.10) Installing FirebaseDynamicLinks (3.3.0) Installing FirebaseInstanceID (3.3.0) Installing Folly (2016.10.31.00) Installing GTMSessionFetcher (1.2.1) Installing GoogleAppMeasurement (5.4.0) Installing GoogleSignIn (4.4.0) Installing GoogleToolboxForMac (2.2.0) Installing GoogleUtilities (5.3.7) Installing ObjectiveDropboxOfficial (3.9.4) Using RNGoogleSignin (1.0.2) Using RNSound (0.10.9) Using RNVectorIcons (6.0.2) Using React (0.57.8) Installing SDWebImage (4.4.3) Installing boost-for-react-native (1.63.0) Installing glog (0.3.5) Installing nanopb (0.3.901) Using react-native-background-timer (2.1.1) Using react-native-calendar-events (1.6.4) Using react-native-fast-image (5.1.1) Using react-native-keep-awake (4.0.0) Using react-native-webrtc (1.67.1) Using yoga (0.57.8.React) Generating Pods project Integrating client projects Sending stats

Pod installation complete! There are 27 dependencies from the Podfile and 31 total pods installed.

[!] The Podfile contains framework or static library targets (JitsiMeet), for which the Podfile does not contain host targets (targets which embed the framework). If this project is for doing framework development, you can ignore this message. Otherwise, add a target to the Podfile that embeds these frameworks to make this message go away (e.g. a test target).

[118] ./JitsiMeetJS.js 18.9 KiB {0} [built]

node-sass@4.10.0 postinstall /Users/user/Documents/dev/app/temp/jitsi-meet/node_modules/node-sass node scripts/build.js

Binary found at /Users/user/Documents/dev/app/temp/jitsi-meet/node_modules/node-sass/vendor/darwin-x64-67/binding.node Testing binary Binary is fine added 1839 packages from 978 contributors and audited 31116 packages in 56.95s found 4 vulnerabilities (2 low, 1 high, 1 critical) run npm audit fix to fix them, or npm audit for details Henriques-MBP:jitsi-meet user$ npm audit fix npm WARN @atlaskit/inline-dialog@5.3.0 requires a peer of react@15.6.0 - 16.2.0 but none is installed. You must install peer dependencies yourself. npm WARN @atlaskit/inline-dialog@5.3.0 requires a peer of react-dom@15.6.0 - 16.2.0 but none is installed. You must install peer dependencies yourself. npm WARN @atlaskit/layer@2.9.1 requires a peer of react@15.6.0 - 16.2.0 but none is installed. You must install peer dependencies yourself. npm WARN @atlaskit/theme@2.4.1 requires a peer of react@15.6.0 - 16.2.0 but none is installed. You must install peer dependencies yourself. npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

pdarcos commented 5 years ago

Possible related? https://stackoverflow.com/questions/40608727/mfmailcomposeviewcontroller-error-mc-filtering-mail-sheet-accounts-for-bundle

pdarcos commented 5 years ago

Just tested on another iPhone 7 as well as the XS simulator and always get the same result.

Any clues as to where I could look to try and debug this?

saghul commented 5 years ago

I see in the debug console addPeopleEnabled":false. Could this be the cause of the problem?

No, that's related to a feature which replaces this sheet, but it's not enabled.

saghul commented 5 years ago

Any clues as to where I could look to try and debug this?

Not at the moment, I'm afraid. Just to confirm, all you are doing is downloading the app and building it yourself, right?

I think the error you are seeing is related, I don't remember seeing it myself. Do you have an email address setup on your device? Can you reproduce it in a simulator?

pdarcos commented 5 years ago

Yes, I'm doing a fresh git clone and building the app without any changes except the bundle ID.

Yes I do have an email address on the device. Also, when I run it in the simulator I get a black screen so I can't actually access the invite someone menu. I'm going to try and run it in the simulator again.

What environment are you using to build your working version? ie. what version of node, npm and xcode are you using?

saghul commented 5 years ago

Also, when I run it in the simulator I get a black screen so I can't actually access the invite someone menu.

That shouldn't happen. I wonder if something is broken in your env?

What environment are you using to build your working version? ie. what version of node, npm and xcode are you using?

Xcode Version 10.1 (10B61), Node 10.15.0, npm 6.4.1.

pdarcos commented 5 years ago

OK, I downgraded to your version of Node and now I think I know where the problem is.

If I compile without any changes except the bundle ID the invite function works. But as soon as I change the applinks domains to my links the invite function stops working.

At least we're getting closer to pinpointing the issue. Any ideas?

saghul commented 5 years ago

Interesting! Do you have the app site association file properly setup in your web server? Here is how it needs to look like: http://meet.jit.si/.well-known/apple-app-site-association

If this is it, then TIL that those 2 are related :-O

pdarcos commented 5 years ago

Aha. That was it. I also learned something new today.

With the proper apple-app-site-association file it works as expected.

Thanks!

saghul commented 5 years ago

Excellent!

pdarcos commented 5 years ago

Damn. After all this I just tested it and again it's no longer working.

I do have the proper apple-app-site-association file on the server but the issue seems to have reappeared. Would it help if I posted the xcode logs from running it in the simulator?

sajadkhan commented 5 years ago

Hello, I know this may not be related to this issue but I just need small info. I'm using the pod version and 'add people" option appears as the separate button. I tried to update the pod there wasn't any available, how long I expect this to be updated in the pod version. (next release?)

saghul commented 5 years ago

@sajadkhan No ETA, sorry. Please avoid hijaking issues, post to our community forum instead.

saghul commented 5 years ago

Damn. After all this I just tested it and again it's no longer working.

I do have the proper apple-app-site-association file on the server but the issue seems to have reappeared. Would it help if I posted the xcode logs from running it in the simulator?

Maybe they show something. Please post them here.

pdarcos commented 5 years ago

Ok, here you go.

https://paste.ee/d/Qwe8D/0

Thanks

pdarcos commented 5 years ago

Here's the likely problem area in the logs:

mail sheet accounts for bundle ID: my.domain, source account management: 1 2019-01-29 12:04:35.243467+0000 jitsi-meet[9497:134316] [] nw_socket_handle_socket_event [C109.2:1] Socket SO_ERROR [61: Connection refused] 2019-01-29 12:04:35.245207+0000 jitsi-meet[9497:134168] [] nw_connection_get_connected_socket [C109] Client called nw_connection_get_connected_socket on unconnected nw_connection 2019-01-29 12:04:35.275121+0000 jitsi-meet[9497:134169] [MC] Filtering mail sheet accounts for bundle ID: my.domain, source account management: 2 2019-01-29 12:04:35.823121+0000 jitsi-meet[9497:134012] [MC] Reading from private effective user settings. 2019-01-29 12:04:37.653005+0000 jitsi-meet[9497:134165] [] nw_socket_handle_socket_event [C110.1:1] Socket SO_ERROR [61: Connection refused] 2019-01-29 12:04:37.656048+0000 jitsi-meet[9497:134165] [] nw_socket_handle_socket_event [C111.1:1] Socket SO_ERROR [61: Connection refused] 2019-01-29 12:04:37.658116+0000 jitsi-meet[9497:134165] [] nw_socket_handle_socket_event [C110.2:1] Socket SO_ERROR [61: Connection refused]

pdarcos commented 5 years ago

OK, I've done some more experimenting and I have come to the conclusion that as soon as I change the default server URL here to my URL then the invite function stops working completely https://github.com/jitsi/jitsi-meet/blob/bfdfb5321c5744b10f9b75411a5530f27e74282b/react/features/base/settings/constants.js#L6

This had never happened in previous versions of the app so I'm not sure where to start looking for a solution.

Any ideas?

Cheers

pdarcos commented 5 years ago

BTW @saghul , I'm pretty sure it's not related to the apple-app-site-association file after all. I've tested my site on https://branch.io/resources/aasa-validator/ and everything checks out fine.

pdarcos commented 5 years ago

After more testing I'm pretty positive the problem only occurs when I change the meet.jit.si default URL in https://github.com/jitsi/jitsi-meet/blob/bfdfb5321c5744b10f9b75411a5530f27e74282b/react/features/base/settings/constants.js#L6 to my own.

@saghul Can you try to reproduce on your side by changing the URL to see if invite someone also stops working with that one change? Thanks

pdarcos commented 5 years ago

Not sure if this is related by I see org.jitsi.meet hardcoded here https://github.com/jitsi/jitsi-meet/blob/master/react/features/deep-linking/components/DeepLinkingMobilePage.web.js#L189

saghul commented 5 years ago

I'll give it a test.

pdarcos commented 5 years ago

Hi @saghul Did you get a chance to test? I'm stumped since I'm pretty sure that is the origin of the problem but I don't understand why changing the URL brakes the invitation functionality. Specially confusing is that in the past I had never encountered this problem.

saghul commented 5 years ago

Sorry I have not had the time to test this today.

pdarcos commented 5 years ago

No worries @saghul

I'll wait. I imagine I can't be the only one compiling this app for a self-hosted installation. Maybe someone else will compile soon and they should get the same behavior and hopefully they'll confirm it here.

Cheers

pdarcos commented 5 years ago

Hmmm, just noticed that or.jitsi.meet is hardcoded here https://github.com/jitsi/jitsi-meet/blob/342a00a6af323d98eef33fc60f4e2a515c8e254d/ios/sdk/src/invite/Invite.m#L28

I wonder is that's what's causing the problem

saghul commented 5 years ago

Ignore that, it's not related to this type of invite. It's just the name of an internal event.

pdarcos commented 5 years ago

ok, thanks. The search continues

pdarcos commented 5 years ago

@saghul I imagine you're busy and haven't had the time to look into this yet, but I've done a lot of testing and am now certain that all you need to reproduce is to clone latest git and then change the default server URL and you'll see the invite function stops working immediately.

https://github.com/jitsi/jitsi-meet/blob/bfdfb5321c5744b10f9b75411a5530f27e74282b/react/features/base/settings/constants.js#L6

saghul commented 5 years ago

@pdarcos I tested it and indeed I get an error. However, I found an easier way to repro, which I think explains the problem. What seems to fail is sharing a URL for which you haven't declared universal linking support. If you add your domain to the "associated domains" section and that domain has the appropriate description file (the one in .well-known) does it work?

saghul commented 5 years ago

At the same time, I don't get it. We don't share the URL but some text. I'm puzzled.

pdarcos commented 5 years ago

Thanks for confirming. I don't think it's the associated domains thing since I tried that. I even tested it through https://branch.io/resources/aasa-validator/ and everything's fine. Like you said, it doesn't make any sense. There must be something else going on.

pdarcos commented 5 years ago

@saghul if you want I can share with you privately the details of our server so you can confirm for yourself the apple-app-site-association file is there and configured correctly.

Not sure how else I can help debug this strange behavior. The last time I compiled the iOS app was on December 6 2018 and the code at that time was working fine with invites and self-hosted server.

Since then something must have changed in the code that is breaking the invite function.

pdarcos commented 5 years ago

Hi @saghul

Did you have time to look into this at all? Let me know how else I can help debug this.

Cheers

saghul commented 5 years ago

@pdarcos No I haven't taken another look. However, as I said I no longer know how to proceed here. It also doesn't work for us, with other domains, and I cannot find a reasonable explanation. I'll keep it at the back of my head, but I don't know what to try!

pdarcos commented 5 years ago

Gotcha. No worries!

I’m going to compile for Android to see if we get the same behavior.

Sent from my mobile device

On 5 Feb 2019, at 09:04, Saúl Ibarra Corretgé notifications@github.com wrote:

@pdarcos No I haven't taken another look. However, as I said I no longer know how to proceed here. It also doesn't work for us, with other domains, and I cannot find a reasonable explanation. I'll keep it at the back of my head, but I don't know what to try!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

pdarcos commented 5 years ago

It works fine on android, so the problem seems to be iOS specific.

pdarcos commented 5 years ago

Quick update. I can confirm the android app is working fine and doesn't have this bug. The problem seems to be a strange iOS bug that others have encountered but I haven't found any solution online https://forums.developer.apple.com/thread/64751

The lack of any meaningful log message as well as lack of any solution for similar problems online makes me pessimistic in finding a solution anytime soon.

Is there any way to increase the logging level or add debugging info somewhere in order to try and pinpoint this?

Cheers

saghul commented 5 years ago

I don’t know if that’s possible. We just use standard RN module which uses the native API.

I have had certain success in getting more logs by running the app while connected to my laptop and then using Console.app and selecting the device.

pdarcos commented 5 years ago

I'll try with the Console.app to see if I can get any more info. Without any real logs it's impossible to know what's wrong.

I feel tempted to report the issue to https://github.com/facebook/react-native/issues but I'm still not sure if this is a bug in RN, iOS or the jitsi-meet project itself. The only thing I know for certain is that it isn't reproducible on Android which leads me to suspect a bug in RN and/or iOS. The other thing I know for sure is that the last time I compiled the iOS app back in mid December this bug wasn't there, so it must have been introduced sometime between December 16 and last week.

Very frustrating bug hunt indeed

pdarcos commented 5 years ago

I'm more inclined to believe this is a weird bug that happens to RN on iOS since other projects seem to be reporting the same thing https://github.com/chirag04/react-native-mail/issues/105