Unable to login or signup #367
Comments
Without chainging any code in the app this the error log I see |
Why is it taking hostname ? in the RealmApplcation file
How to make it to send request only to my localhost:9080 ? BTW I have installed Realm Platform on my Ubuntu 16.04 |
I have resolved the problem by replacing it with the emulator address i.e., 10.0.2.2 instead of localhost but how is it possible ? how it works Please include the details in the documentation or please let me know the details how it works I will be very happy to come up with android sample tutorial so that others can get started easily who are like me Note : I am new to realm platform. |
The example code should not be using There is nothing particularly magic happening here. The Realm Object Server is like any other network resource - you must supply a valid URI to reach it. Think of it like any web page. That would either use a numeric IP address of your Ubuntu machine or a name which is published to a DNS (Domain Name Server) which your phone can see. You mentioned The address 10.0.2.2 only seems to work here because it's a special loopback address to your local machine - it is still not a valid address for other devices to use on your network. See this SO answer. If you are deploying the server to be used solely within your LAN, you need to have at least a local fixed IP address such as 192.168.0.23. If you are using it for external access, it needs to be visible on the broader internet, just like any other web server would be hosted on that machine. |
Error Log :
ailed authenticating user.
UNKNOWN(-1)
java.net.ConnectException: Failed to connect to localhost/127.0.0.1:9080
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:189)
at okhttp3.internal.connection.RealConnection.buildConnection(RealConnection.java:173)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:114)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:193)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:129)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:98)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)
at okhttp3.RealCall.execute(RealCall.java:60)
at io.realm.internal.network.OkHttpAuthenticationServer.authenticate(OkHttpAuthenticationServer.java:92)
at io.realm.internal.network.OkHttpAuthenticationServer.loginUser(OkHttpAuthenticationServer.java:52)
at io.realm.SyncUser.login(SyncUser.java:156)
at io.realm.SyncUser$1.run(SyncUser.java:194)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
The text was updated successfully, but these errors were encountered: