尝试将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
版本不兼容问题?
以前它适用于realm 3.4.0 build。只有我在迁移过程中所做的更改:
项目gradle:
classpath "io.realm:realm-gradle-plugin:4.1.0"
的gradle:
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"}.}
答案 0 :(得分:1)
Realm 4.0.0已更新为使用Realm Sync 2.0.x,这需要ROS 2.0,这很可能与ROS 1.x不兼容。
使用Realm Sync 1.x的最后一个版本是3.7.2
。