无法注册到文本安全服务器工作 [英] Unable to get Registration to text-secure server working

查看:90
本文介绍了无法注册到文本安全服务器工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 Signal 聊天集成到我的 Android 应用程序中.我已经成功设置了服务器端(即推送服务器和文本安全服务器),这意味着服务器日志(后端)中没有错误.但是Android应用程序在注册步骤失败,但是我能够成功接收和验证短信,生成密钥步骤也工作正常.

I am trying to integrate Signal chat to my android application. I have successfully set up the server-side (i.e.Push server and Text-secure server) successfully in the meaning that there are no error in the server logs (back-end). but the android application is failing on the registration step, however I am able to receive and verify SMS successfully, generating keys step is also working fine .

验证和密钥生成成功后,我在屏幕上收到连接错误:无法连接到服务器"

After successful verification and key generation , I get "Connectivity error: unable to connect to server" on the screen

以下是我在 Android 应用程序日志中遇到的异常

Below is the exception that I am getting on the Android application log

            org.thoughtcrime.securesms E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb9f3e948
            org.thoughtcrime.securesms W/TextSecurePreferences: Setting push registered: false
            org.thoughtcrime.securesms W/PushServiceSocket: Push service URL: http://<my_server_ip>:8080
            org.thoughtcrime.securesms W/PushServiceSocket: Opening URL: http://<my_server_ip>:8080/v1/accounts/sms/code/+918130927259
            org.thoughtcrime.securesms W/SMSListener: Got SMS broadcast...
            org.thoughtcrime.securesms W/SmsListener: Got challenge!
            org.thoughtcrime.securesms W/RegistrationService: Got a challenge broadcast...
            org.thoughtcrime.securesms W/PushServiceSocket: Push service URL: http://<my_server_ip>:8080
            org.thoughtcrime.securesms W/PushServiceSocket: Opening URL: http://<my_server_ip>:8080/v1/accounts/code/392553
            org.thoughtcrime.securesms W/PushServiceSocket: Push service URL: http://<my_server_ip>:8080
            org.thoughtcrime.securesms W/PushServiceSocket: Opening URL: http://<my_server_ip>:8080/v2/keys/
            org.thoughtcrime.securesms W/PushServiceSocket: Push service URL: http://<my_server_ip>:8080
            org.thoughtcrime.securesms W/PushServiceSocket: Opening URL: http://<my_server_ip>:8080/v1/accounts/gcm/
            org.thoughtcrime.securesms W/PhoneNumberFormatter: Got local CC: IN
            org.thoughtcrime.securesms W/PhoneNumberFormatter: Error type: TOO_LONG. The string supplied is too long to be a phone number.
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at com.google.i18n.phonenumbers.PhoneNumberUtil.parseHelper(PhoneNumberUtil.java:2895)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at com.google.i18n.phonenumbers.PhoneNumberUtil.parse(PhoneNumberUtil.java:2687)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at com.google.i18n.phonenumbers.PhoneNumberUtil.parse(PhoneNumberUtil.java:2677)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.whispersystems.signalservice.api.util.PhoneNumberFormatter.formatNumber(PhoneNumberFormatter.java:99)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.database.TextSecureDirectory.getPushEligibleContactNumbers(TextSecureDirectory.java:190)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.util.DirectoryHelper.refreshDirectory(DirectoryHelper.java:91)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.service.RegistrationService.handleCommonRegistration(RegistrationService.java:254)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.service.RegistrationService.handleSmsRegistrationIntent(RegistrationService.java:208)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.service.RegistrationService.access$000(RegistrationService.java:63)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.service.RegistrationService$1.run(RegistrationService.java:95)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at java.lang.Thread.run(Thread.java:818)
            org.thoughtcrime.securesms W/ContactsSyncAdapter: onPerformSync(com.android.contacts)
            org.thoughtcrime.securesms W/PhoneNumberFormatter: Got local CC: IN
            org.thoughtcrime.securesms W/PhoneNumberFormatter: Got local CC: IN
            org.thoughtcrime.securesms W/PhoneNumberFormatter: Got local CC: IN
            org.thoughtcrime.securesms W/PhoneNumberFormatter: Error type: TOO_LONG. The string supplied is too long to be a phone number.
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at com.google.i18n.phonenumbers.PhoneNumberUtil.parseHelper(PhoneNumberUtil.java:2895)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at com.google.i18n.phonenumbers.PhoneNumberUtil.parse(PhoneNumberUtil.java:2687)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at com.google.i18n.phonenumbers.PhoneNumberUtil.parse(PhoneNumberUtil.java:2677)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.whispersystems.signalservice.api.util.PhoneNumberFormatter.formatNumber(PhoneNumberFormatter.java:99)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.database.TextSecureDirectory.getPushEligibleContactNumbers(TextSecureDirectory.java:190)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.util.DirectoryHelper.refreshDirectory(DirectoryHelper.java:91)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.service.RegistrationService.handleCommonRegistration(RegistrationService.java:254)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.service.RegistrationService.handleSmsRegistrationIntent(RegistrationService.java:208)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.service.RegistrationService.access$000(RegistrationService.java:63)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at org.thoughtcrime.securesms.service.RegistrationService$1.run(RegistrationService.java:95)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
            org.thoughtcrime.securesms W/PhoneNumberFormatter:     at java.lang.Thread.run(Thread.java:818)
            org.thoughtcrime.securesms W/PhoneNumberFormatter: Got local CC: IN
            org.thoughtcrime.securesms W/PhoneNumberFormatter: Got local CC: IN
            org.thoughtcrime.securesms W/PushServiceSocket: Push service URL: http://<my_server_ip>:8080
            org.thoughtcrime.securesms W/PushServiceSocket: Opening URL: http://<my_server_ip>:8080/v1/directory/tokens
            org.thoughtcrime.securesms W/Directory: Adding active token: +919999555808, X8WadrTVTDs9lw
            org.thoughtcrime.securesms W/Directory: Adding active token: +919555277550, +e9lhGZ8Fzb/jw
            org.thoughtcrime.securesms W/PushServiceSocket: Push service URL: http://<my_server_ip>:8080
            org.thoughtcrime.securesms W/PushServiceSocket: Opening URL: http://<my_server_ip>:8080/v1/accounts/token
            org.thoughtcrime.securesms W/RegistrationService: org.whispersystems.signalservice.api.push.exceptions.NotFoundException: Not found
            org.thoughtcrime.securesms W/RegistrationService:     at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeRequest(PushServiceSocket.java:510)
            org.thoughtcrime.securesms W/RegistrationService:     at org.whispersystems.signalservice.internal.push.PushServiceSocket.getAccountVerificationToken(PushServiceSocket.java:146)
            org.thoughtcrime.securesms W/RegistrationService:     at org.whispersystems.signalservice.api.SignalServiceAccountManager.getAccountVerificationToken(SignalServiceAccountManager.java:259)
            org.thoughtcrime.securesms W/RegistrationService:     at org.thoughtcrime.securesms.service.RegistrationService.handleCommonRegistration(RegistrationService.java:260)
            org.thoughtcrime.securesms W/RegistrationService:     at org.thoughtcrime.securesms.service.RegistrationService.handleSmsRegistrationIntent(RegistrationService.java:208)
            org.thoughtcrime.securesms W/RegistrationService:     at org.thoughtcrime.securesms.service.RegistrationService.access$000(RegistrationService.java:63)
            org.thoughtcrime.securesms W/RegistrationService:     at org.thoughtcrime.securesms.service.RegistrationService$1.run(RegistrationService.java:95)
            org.thoughtcrime.securesms W/RegistrationService:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
            org.thoughtcrime.securesms W/RegistrationService:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
            org.thoughtcrime.securesms W/RegistrationService:     at java.lang.Thread.run(Thread.java:818)

下面是我的 Pushserver.yml

below is my Pushserver.yml

    redis:
      url: redis://localhost:6379/2

    authentication:
      servers:
        -
          name: 123
          password: 123
    gcm:
      xmpp: false
      apiKey: A####################s
      senderId: 1#######1
      redphoneApiKey: A########################i4 

    server:
        applicationConnectors:
        - type: http
          port: 9999
        adminConnectors:
        - type: http
          port: 9998
        gzip:
            enabled: true

    logging:
      level: INFO
      appenders:
        - type: file
          currentLogFilename: /tmp/pushserver.log
          archivedLogFilenamePattern: /tmp/pushserver-%d.log.gz
          archivedFileCount: 5
        - type: console

下面是我的 Textsecure server.yml 或 production.yml

below is my Textsecure server.yml or production.yml

    twilio: # Twilio SMS gateway configuration
      accountId: AC##############51
      accountToken: 8####################7
      numbers:
        -
          +12132414380 #fake
    #  numbers:
    #        -
    #         +12015975380
      localDomain: 127.0.0.1  # The domain Twilio can call back to.

    push: # GCM/APN push server configuration
      host: localhost
      port: 9999
      username: 123
      password: 123

    s3: # AWS S3 configuration
      accessKey: A#####################Q
      accessSecret: 0##########################9

      # Name of the S3 bucket (needs to have been created)
      # for attachments to go.  Should be configured with
      # correct permissions.
      attachmentsBucket: signale

    directory: # Redis server configuration for TS directory
      url: "redis://localhost:6379/0"

    cache: # Redis server configuration for general purpose caching
      url: "redis://localhost:6379/1"

    server:
      applicationConnectors:
        - type: http
          port: 8080
          #keyStorePath: config/example.keystore
          #      #keyStorePassword: example
          #            #validateCerts: true
      adminConnectors:
        - type: http
          port: 8081
          #                              #keyStorePath: config/example.keystore
          #                                    #keyStorePassword: example
          #                                          #validateCerts: true
    websocket:
      enabled: true

    messageStore: # Postgres database configuration for message store
      driverClass: org.postgresql.Driver
      user: "textsecure"
      password: "postgres"
      url: "jdbc:postgresql://127.0.0.1:5432/textsecure_msg"

    database: # Postgres database configuration for account store
      # the name of your JDBC driver
      driverClass: org.postgresql.Driver

      # the username
      user: "uname"

      # the password
      password: "mypas"

      # the JDBC URL
      url: "jdbc:postgresql://127.0.0.1:5432/textsecure_accounts"

      # any properties specific to your JDBC driver:
      properties:
        charSet: UTF-8

推荐答案

在 testsecure 服务器 YML 中需要 redphone authkey 即使根本不需要功能,因为服务器使用相同的注册自己为此,需要在 google 开发者帐户中创建一个项目,并在 yml 文件中使用数字部分作为 authkey.

In the testsecure server YML the redphone authkey is required even functionality is not needed at all because the server register itself using the same for this one need to create a project in google developer account and the use the numeric part as authkey in the yml file.

对于 ex 项目名称my_readphone-112312",那么 authkey 将是 112312

for ex project name "my_readphone-112312" then the authkey will be 112312

然后在yml中添加以下条目

then add the below entry in yml

redphone:
authKey: 112312

这篇关于无法注册到文本安全服务器工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆