lucaconte / BeatTheMeddler

May become the "Signal [Modular] Community Edition"
31 stars 16 forks source link

Signal was unable to connect to the server #3

Open maklei125 opened 8 years ago

maklei125 commented 8 years ago

I have an error for the registration, I can receive the sms, create the key but the last step give me the error below.

also , the /api/v1/accounts/token/+key:password:ffHTTP/1.1" 404 - "-" "okhttp/2.2.0" 3

seems nginx return 404,

org.thoughtcrime.securesms W/RegistrationService: java.io.IOException: Failed to create account: 404 at org.thoughtcrime.redphone.signaling.RedPhoneAccountManager.createAccount(RedPhoneAccountManager.java:83) at org.thoughtcrime.securesms.service.RegistrationService.handleCommonRegistration(RegistrationService.java:261) at org.thoughtcrime.securesms.service.RegistrationService.handleSmsRegistrationIntent(RegistrationService.java:208) at org.thoughtcrime.securesms.service.RegistrationService.access$000(RegistrationService.java:63) at org.thoughtcrime.securesms.service.RegistrationService$1.run(RegistrationService.java:95) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

thank you in advance for any help.

lucaconte commented 8 years ago

Strating from this your issue I suppose that you're try to build from OWS repository version and not mine one. Look here: https://github.com/lucaconte/Signal-Android/blob/master/src/org/thoughtcrime/securesms/service/RegistrationService.java

look at line #261

If you haven't a working RedPhone server running you MUST comment that row.

maklei125 commented 8 years ago

Thank you very much, it's work perfectly! I hope one day, we can have the voice also...

ZennouRachid commented 7 years ago

I have an error like this! i installed textsecure server my own server. and i installed signal app my mobile phone and i modified server address in build.gradle file.i wrote my server ip address that line.

i run push server and textsecure-server i opened signal android app (my modified) i passed first three(Connection,Waiting for sms verification and and generating keys) steps but i didn't pass last step( registering with server),what can i do?

this is textsecure output : "GET /v1/accounts/token HTTP/1.1" 404 301 "-" "okhttp/2.2.0" 7

lucaconte commented 7 years ago

@ZennouRachid have you commented the RedPhone call? Anyway I strictly reccomend the use of Signal-Cli ( https://github.com/AsamK/signal-cli ) in order to test your client-server stack.

s2deathgod commented 7 years ago

Hi,

I have an error similar to ZennouRachid's. I have been able to run my own push and textsecure servers, and the mobile app. However, after I opened the app, I got stuck at the first step: Connecting Server.

Here is the error from the mobile app's side: java.net.UnknownServiceException: CLEARTEXT communication not enabled for client

I think the error lies in this line in PushServerSocket.java: "return okHttpClientBuilder.build().newCall(request.build()).execute(); " after calling: "getConnection(String urlFragment, String method, String body) ", where urlFragment is /v1/accounts/sms/code/+668761XXXXX method is "GET" body is null (url is "http://10.104.68.140:8080")

lucaconte commented 7 years ago

Here is the error from the mobile app's side: java.net.UnknownServiceException: CLEARTEXT communication not enabled for client

I don't know which client you are using but seems to be a problem related to the use of HTTP instead of HTTPS. More than a year ago, when I tested my work on the official Signal-Android app, It wors also in "clear" (aka not https) mode, now I've no idea about it status (probably http was dropped). Try with signal-cli.

ZennouRachid commented 7 years ago

@lucaconte how to commant Redphone? i want use source code available on https://github.com/WhisperSystems/ but i have a problem because Redphone server isn't disponible!

s2deathgod commented 7 years ago

Hi, ZennouRachid I got solution about redphone service. let you try to comment code in line 270-277 from RegistrationService.java >>org.thoughtcrime.securesms.service(signal android app) here code : /*if (supportsGcm) { RedPhoneAccountManager redPhoneAccountManager = new RedPhoneAccountManager(BuildConfig.REDPHONE_MASTER_URL, new RedPhoneTrustStore(this), number, password);

  String verificationToken = accountManager.getAccountVerificationToken();
  redPhoneAccountManager.createAccount(verificationToken, new RedPhoneAccountAttributes(signalingKey, TextSecurePreferences.getGcmRegistrationId(this)));
}*/

because we have no redphone services.

ZennouRachid commented 7 years ago

ok thank you @s2deathgod for your reply, i will get a look on this, then i back to u

ZennouRachid commented 7 years ago

Hi @s2deathgod , do you have an idea about using an other server VOIP instead Redphone server, or where can i find the redphone server source code?

lucaconte commented 7 years ago

Never tried it but someone use coTURN: https://github.com/coturn/coturn

ZennouRachid commented 7 years ago

@lucaconte who is this someone so i can ask him about more informations please!