ROS v1.8.3 with android realm 4.1.0 sync issue - android

trying to connect ROS v1.8.3 with android realm 4.1.0, but got an error on connection:
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
is it version incompatibility issue?
previously it works well with realm 3.4.0 build. only changes i've made during migration:
project gradle:
classpath "io.realm:realm-gradle-plugin:4.1.0"
gradle:
android {
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.2'
}
code (added <SyncUser>):
SyncUser.loginAsync(syncCred, serverH, new SyncUser.Callback <SyncUser> () {...
application have been deleted from phone before install with new realm build.
is some other options required?
logs on server:
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"}.}

Realm 4.0.0 was updated to use Realm Sync 2.0.x, which requires ROS 2.0 which is most likely incompatible with ROS 1.x.
The last version to use Realm Sync 1.x is 3.7.2.

Related

Hive MQ “Invalid handshake response getStatus: 426 Upgrade Required” connecting to AWS

I am trying to connect to an AWS MQTT broker/server using the Hive MQ client library for Android Studio (v1.3.0) with an AWS pre-signed URL.
implementation("com.hivemq:hivemq-mqtt-client:1.3.0")
implementation(platform("com.hivemq:hivemq-mqtt-client-websocket:1.3.0"))
The parameters I am using are shown below with the sensitive information removed:
host: xxx.amazonaws.com
path: /mqtt?X-Amz-Algorithm=xxx&X-Amz-Credential=xxx&X-Amz-Date=xxx&X-Amz-SignedHeaders=host&X-Amz-Signature=xxx
This is my latest attempt to connect:
MqttClient.builder()
.identifier(UUID.randomUUID().toString())
.serverHost(host)
.webSocketConfig()
.serverPath(path)
.applyWebSocketConfig()
.sslWithDefaultConfig()
.useMqttVersion3()
.build()
But when connecting, I get the error:
com.hivemq.client.mqtt.exceptions.ConnectionFailedException:
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException:
Invalid handshake response getStatus: 426 Upgrade Required

Http failure response for xxx 0 Unknown Error

PostGraphile v4.9.2 server listening on port 5001
‣ GraphQL API: http://0.0.0.0:5001/graphql
how can i change http to https. i mean, i want https://0.0.0.0:5001/graphql
because, i am getting error while debugging my ionic capacitor app for android
E/Capacitor/Console: File: http://localhost/vendor-es2018.js - Line 41539 -
Msg: ERROR Error: Http failure response for http:// mydomain .com:5001/graphql: 0 Unknown Error
i think it is about http problem but as you see it is unknown error. Thanks in advance
i found the solution here: How to allow all Network connection types HTTP and HTTPS in Android (9) Pie?
i allowed http requests in manifest.xml and i added networkSecurityConfig.xml
Thank you all

Intermittent SSLHandshakeException calling a GET with OKHttp [duplicate]

This question already has answers here:
Trust Anchor not found for Android SSL Connection
(22 answers)
Closed 2 years ago.
EDIT
It does not seem to be a duplicate to me since all the other questions are related with repeatable issues and not intermittent like this one
END-EDIT
I have an app that runs some HTTP GET.
The app runs on API 21+.
It works fine most of the time, but very rarely one HTTP GET fails with the error:
D/OkHttp: --> GET https://url/url2?parm1=value1
D/OkHttp: --> END GET
D/OkHttp: <-- HTTP FAILED: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
When this starts happening, it keeps happening until I kill the app.
I'm using Retrofit with OKHttp 4.3.1. I'm going to update to the latest version now just in case this is a bug in OKHttp but I didn't find any report.
The code for the HTTP call is the usual code with Retrofit:
private val retrofit: Retrofit
get() = Retrofit.Builder()
.baseUrl(BuildConfig.BASE_URL)
.addConverterFactory(GsonConverterFactory.create(gson))
.addCallAdapterFactory(CoroutineCallAdapterFactory())
.client(client)
.build()
internal val service: AppService
get() = retrofit.create<AppService>(AppService::class.java)
internal interface AppService {
#GET
suspend fun loadServerListAsync(#Url url: String): Response<List<Server>>
}
In the past I have seen this error in another app. In that case the error wasn't intermittent and the problem was on the backend: they had changed a certificate, but they hadn't updated all the intermediate certificates.
In this case it looks like the error is different since it is intermittent and killing the app fixes it. There is no load balancer on the backend so it can't be that different servers have different certificates.
It can be related from cypher security protocol TLSv1 to fail and fallback to deprecated SSLv3.
To prevent TLSv1 secure connection to fallback to SSLv3 in simulator and throw connection error because SSLv3 is now deprecated and unsecure (Android Studio Failure in SSL library, usually a protocol error)
Install updated security provider using Google Play Services.
This effectively gives your app access to a newer version of OpenSSL and Java Security Provider, which includes support for TLSv1.2 in SSLEngine.
Once the new provider is installed, you can create an SSLEngine which supports SSLv3, TLSv1, TLSv1.1 and TLSv1.2 the usual way.
This should be the answer to your problem : Javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: Failure in SSL library, usually a protocol error

Android 4.4.2 Request https://restcountries.eu/rest/v2/all Unable success

Android system 4.4.2
Request address https://restcountries.eu/rest/v2/all
Use implementation com.squareup.okhttp3:okhttp:3.1.0 to request success, use implementation com.squareup.okhttp3:okhttp: 3.10.0
Unable to request success prompt ssl handshake failure.
How to solve this problem?

Error while download Robolectric dependencies

I'm getting some error by trying to use Robolectric in my company.
I have configured the proxy, but I don't get to download Robolectric dependencies:
Downloading:
org/robolectric/android-all/5.0.0_r2-robolectric-1/android-all-5.0.0_r2-robolectric-1.pom from repository sonatype at
https://oss.sonatype.org/content/groups/public/
[WARNING] Unable to
get resource 'org.robolectric:android-all:pom:5.0.0_r2-robolectric-1'
from repository sonatype
(https://oss.sonatype.org/content/groups/public/): Error transferring
file: Connection timed out: connectError transferring file: Connection
timed out: connect . .

Categories

Resources