Description
using amplify_api: 2.10.0
when we set the amplifyconfiguration.dart api.awsAPIPlugin..endpoint to https://custom-domain/graphql, we can't establish ws connection.
Error during WebSocket handshake: Unexpected response code: 403
ERROR | WebSocketBloc - ... | Shutting down with exception: NetworkException {
"message": "Exception from WebSocketService.",
"underlyingException": "WebSocketChannelException: WebSocketException: Failed to connect WebSocket"
}
Categories
Steps to Reproduce
- change lib/amplifyconfiguration.dart api block.
"api": {
"plugins": {
"awsAPIPlugin": {
"<appsync name>": {
"endpointType": "GraphQL",
"endpoint": "https://<custom-doamin>/graphql",
"region": <region id>,
"authorizationType": "AMAZON_COGNITO_USER_POOLS"
}
}
}
}
- start subscription
const document = r'''
subscription OnCreateTodo($owner: String!) {
onCreateTodo(owner: $owner) {
id owner title done createdAt updatedAt
}
}
''';
final operation = Amplify.API.subscribe(
request,
onEstablished: () {
developer.log('Subscription established', name: 'TodoListScreenController');
state = state.copyWith(subscription_active: true);
},
);
Screenshots
No response
Platforms
Flutter Version
3.38.10
Amplify Flutter Version
2.10.0
Deployment Method
Amplify Gen 2
Schema
Description
using amplify_api: 2.10.0
when we set the amplifyconfiguration.dart api.awsAPIPlugin..endpoint to https://custom-domain/graphql, we can't establish ws connection.
Error during WebSocket handshake: Unexpected response code: 403
ERROR | WebSocketBloc - ... | Shutting down with exception: NetworkException {
"message": "Exception from WebSocketService.",
"underlyingException": "WebSocketChannelException: WebSocketException: Failed to connect WebSocket"
}
Categories
Steps to Reproduce
Screenshots
No response
Platforms
Flutter Version
3.38.10
Amplify Flutter Version
2.10.0
Deployment Method
Amplify Gen 2
Schema