Decoding halted because of invalid data in the stream - opc

I am using Workstation.UaClient 2.0
when i try to connect to
opc.tcp://My-PC:53530/OPCUA/SimulationServer
i am able to successfully connect to prosys OPC UA simulation server.
But when i try to create subscription,
In this line
BrowseResponse browseResponse = await channel.BrowseAsync(browseRequest);
it throw exception
Decoding halted because of invalid data in the stream.
Same code works with kepserver.
Please help to fix this issue.

Related

Vertx Form Login Handler with Postgresql Failure

I am trying to authenticate user using FormLoginHandler and Postgresql Database with SqlAuthentication.
But I get the following error:
Jun 15, 2022 1:14:34 PM io.vertx.ext.web.RoutingContext
SEVERE: Unhandled exception in router
io.vertx.ext.web.handler.HttpException: Unauthorized
Caused by: io.vertx.core.impl.NoStackTraceThrowable: Invalid username/password
I am providing the right credentials.
The code snippet is:
SqlAuthenticationOptions sauthopts = new SqlAuthenticationOptions();
sauthopts.setAuthenticationQuery(AUTHENTICATE_QUERY);
SqlAuthentication authenticationProvider = SqlAuthentication.create(sqlClient, sauthopts);
router.route("/secure/*").handler(RedirectAuthHandler.create(authenticationProvider, "/login.html"));
FormLoginHandler formLoginHandler = FormLoginHandler.create(authenticationProvider);
router.route("/loginhandler").handler(formLoginHandler);
Please let me know if I am missing something here; or point me to a sample example.
Thanks in Advance.
Your setup doesn't show anything abnormal at first sight. For security reasons, we cannot "just" log the authentication data, as it would be a critical OWASP bug and security vulnerability.
My best guess is that probably is something not totally correct with the query, so this means you have now 2 options:
debug the application and see the query that is being sent + the arguments
prepare a small complete example that shows the bug and open an issue in vert.x so we can debug it further.
If you're upgrading from an older version, be aware that in vert.x 4.2.0 some changes were made to the base64 encoding to keep it consistent across modules. This could be a reason why authentication could fail as the encoded hashes may be slightly different. If you're just doing 4.3.0 from the start, then this would not be a problem.

Not able to run azure logic apps locally using VScode and Azurite

I am using VSCode to create and test my logic apps locally. I have created a simple HTTP trigger and response for it. I have installed all the components and versions correctly. I am getting below error when I run my logic apps,
**Workflow Error: operationName='WorkflowDefinitionProvider.ProcessWorkflow', message='Workflow 'test-1' validate and create workflow failed, the error is 'One or more errors occurred. (Unexpected HTTP status code 'NotFound'.) (Unexpected HTTP status code 'NotFound'.)'', exception='System.AggregateException: One or more errors occurred. (Unexpected HTTP status code 'NotFound'.) (Unexpected HTTP status code 'NotFound'.)
[2022-05-03T02:52:23.134Z] ---> Microsoft.WindowsAzure.Storage.StorageException: Unexpected HTTP status code 'NotFound'.
[2022-05-03T02:52:23.136Z] ---> System.Net.WebException: The remote server returned an error: (404) Not Found.**
It is also giving me below error in the logs,
**ErrorCode:
[2022-05-03T03:08:44.593Z] ', extensionVersion='1.0.0.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.
[2022-05-03T03:08:44.595Z] The listener for function 'Functions.WorkflowDispatcher' was unable to start.
[2022-05-03T03:08:44.595Z] The listener for function 'Functions.WorkflowDispatcher' was unable to start. Microsoft.WindowsAzure.ResourceStack: Unexpected HTTP status code 'NotFound'. The remote server returned an error: (404) Not Found.**
The process to test that I am following,
Start azurite in VSCode
and then Execute function - func host start
Anyone has any clue or faced similar problems? I am using logic apps first time.
To be able to test HTTP triggers locally you need to
"To locally run webhook-based triggers and actions, such as the built-in HTTP Webhook trigger, in Visual Studio Code, you need to set up forwarding for the callback URL."
https://learn.microsoft.com/en-us/azure/logic-apps/create-single-tenant-workflows-visual-studio-code

Getting transport error while watching the document in stitch

When I watch the certain ids in the collection using MongoDB watch I am getting error
ERROR Error: Uncaught (in promise): e: (TRANSPORT_ERROR): the request transport encountered an error communicating with Stitch: event source failed to open and will not reconnect; check network log for more details
e: (TRANSPORT_ERROR): the request transport encountered an error communicating with Stitch: event source failed to open and will not reconnect; check network log for more details
It was working till yesterday it started from today
const db = mongoClient.db(environment.databaseName);
const comments = db.collection('collectionName');
this.changeStream = await comments.watch(ids);
this.changeStream.onNext((event) => {
console.log('Watched document changed:', event);
this.fetchData();
});
I expect that whenever the document is changed in the list of ids. Change event should trigger.
This indicates that your app is unable to communicate with the stitch backend, probably because of not internet or poor network

Error received while deploying code to Pixhawk4 from Simulink

I am trying to run an example Simulink model provided by Mathworks, but while deploying the model to the Pixhawk flight controller, I am receiving the following error:
Error(s) encountered while building "px4demo_uORBReadWrite":
### Failed to generate all binary outputs.
Caused by:
Validation error(s):
### Validating other build tools ...
Unable to locate build tool "GNU PX4 Archiver": echo
I have followed all the steps to configure the hardware properly, except the last part where I was not able to receive the accelerometer data too. The error received while testing the connection at that time was:
Error reading data from the serial port. Operation timed out before requested data was received.
Can someone explain why I am having this issue?
Thanks

How to handle the error "UNet Client Disconnect Error: Timeout"?

How to handle the error "UNet Client Disconnect Error: Timeout"? How not reboot the application, when it occurs?
I now resolve this issue.
I think this can help you too.
myClient.RegisterHandler(MsgType.Error, OnError);
void OnError(NetworkMessage msg){
//Error handler code
}
This Error client receive with "UNET Client Disconnect Error: Timeout".
My solution: If i not have server. I set current client as Server.