0

尝试将 ROS v1.8.3 与 android realm 4.1.0 连接,但连接时出错:

Connection[1]: Writing failed: End of input 
Connection[1]: Connection closed due to error
Connection[1]: Reconnecting in 472 milliseconds
Connection[1]: Resolving 'ec2....us-west-2.compute.amazonaws.com:9080'
Connection[1]: Connecting to endpoint '34.215.139.88:9080' (1/1)
Connection[1]: Connected to endpoint '34.215.139.88:9080' (from '10.0.2.15:35808')
Connection[1]: WebSocket::initiate_client_handshake()
Connection[1]: HTTP request =
                                                              GET /realm-sync/%2F0e38f9551d63d9e08f0d0bf%2Faccount HTTP/1.1
                                                              Authorization: Realm-Access-Token version=1 token="ey.......=="
                                                              Connection: Upgrade
                                                              Host: ec.....us-west-2.compute.amazonaws.com
                                                              Sec-WebSocket-Key: azTr3bmRnl1FbSvLCK0pvA==
                                                              Sec-WebSocket-Protocol: io.realm.sync.22
                                                              Sec-WebSocket-Version: 13
                                                              Upgrade: websocket

是版本不兼容的问题吗?

以前它适用于领域 3.4.0 构建。我在迁移期间所做的唯一更改:

项目等级:

 classpath "io.realm:realm-gradle-plugin:4.1.0"

毕业典礼:

android {
    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.2'
    }

代码(添加<SyncUser>):

SyncUser.loginAsync(syncCred, serverH, new SyncUser.Callback <SyncUser> () {...

在使用新的领域构建安装之前,应用程序已从手机中删除。

是否需要一些其他选项?

登录服务器:

sync: HTTP Connection[2165]: Connection is closed after HTTP response.
sync: HTTP Connection[2165]: 404 Not Found
sync: HTTP Connection[2165]: HTTP request received, url 
sync: HTTP Connection[2165]: Connection initiates HTTP receipt
proxy: attempting to upgrade client ::ffff:93.85.144.134:48862 => headers: {"authorization":"Realm-Access-Token version=1 token=\"eyJhY...Q==\"","connection":"Upgrade","host":"ec....us-west-2.compute.amazonaws.com","sec-websocket-key":"Wtpq5fNSWwwJicg8E8/RTQ==","sec-websocket-protocol":"io.realm.sync.22","sec-websocket-version":"13","upgrade":"websocket"}.}
4

1 回答 1

1

Realm 4.0.0 更新为使用 Realm Sync 2.0.x,这需要 ROS 2.0,这很可能与 ROS 1.x 不兼容。

使用 Realm Sync 1.x 的最后一个版本是3.7.2.

于 2017-10-23T20:38:42.013 回答