I built a GRPC Server in NodeJS, Generated the Client Libraries for Dart and then Deployed the Server on Heroku.
When I tried connecting to the GRPC Server by Proividing the url as https://api.appname.come and provided the PORT Number From the Dart Client I keep Getting Failed to resolve host, SocketException.
This is the full Error message that I keep getting:
E/flutter (10136): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connecting: SocketException: Failed host lookup: 'https://appname.herokuapp.com' (OS Error: No address associated with hostname, errno = 7), details: null, rawResponse: null)
E/flutter (10136):
Please, how do I resolve this?
Related
Unhandled Exception: SocketException: Failed to create server socket (OS Error: Operation not permitted, errno = 1),
var server = await HttpServer.bind(InternetAddress.loopbackIPv4, 2022);
error in this line but work in all version except release
I am trying to enter into my flutter app and it is showing this error,infact api is also working fine and getting the right response.but still facing
SocketException: OS Error: Connection refused, errno = 111, address = "", port = 50000
I am trying to connect two peer in flutter webrtc but i am getting below error.I am using firebase as a signalling server.
[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Unable to RTCPeerConnection::setRemoteDescription: peerConnectionSetRemoteDescription(): WEBRTC_SET_REMOTE_DESCRIPTION_ERROR: Failed to set remote answer sdp: Called in wrong state: stable
I am using below code in listening to the changes in firebase
if (val['t'] == "ans") {
assert(isInitiator);
_peerCon.setRemoteDescription(
RTCSessionDescription(
val['sdp'],
val['tp'],
),
);
return;
}
One peer connection can only set one remote description.
You are trying to setRemoteDescription on a peer with an already established connection. That's why you getting this error.
Check this thread for more details:
Failed to set remote answer sdp: Called in wrong state: stable
import 'package:mongo_dart/mongo_dart.dart';
main() async{
Db db = new Db("mongodb://localhost:27017/workouts");
await db.open();
print("success ---------------------------------");
}
this symple code and dont connect, i dont know why.
this is the output:
Syncing files to device Android SDK built for x86...
Restarted application in 306ms.
E/flutter ( 5415): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = localhost, port = 52206
E/flutter ( 5415): #0 _ConnectionManager._connect (package:mongo_dart/src/network/connection_manager.dart:23:5)
....
and more logs
¿some help? :(
solved ==> https://stackoverflow.com/a/55786011/12369361
due to use emulator I need to use 10.0.2.2 instead of localhost
I suppose that you have a local mongoDB server. If it is the case, you have to connect your local server and your android phone to the same network (through wifi).
Then get the IP of your local server and replacing localhost in your url with the IP you found.
If you can't, it is possible that your firewall is blocking your requests.
I am facing below error while accessing the web services in android app. But its working fine in iOS app.Pl help us to resolve this issue
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = localhost, port = 47992
Also I have faced the same problem.
The way I have solved my problem is,
I made sure that there is no error in my code. Then I uninstalled my app, after that I restarted my phone and install the app again. Then it start working.
I hope this will help..