Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-137701

Connecting to unsecured endpoint results in ClientError::UnknownError

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.9.1
    • OpcUA
    • None
    • Windows

    Description

      Compiler: msvc 14.37.32822

      Following code connects to the unsecured endpoint without any problems, when using QtOpcUa 6.8.3 built with msvc 14.37.32822.

      Doesnt work for 6.9.1 anymore. Emits

      QOpcUaClient::errorChanged
      

      with

      UnknownError

      switch (m_connectionSettings) {
            case EndpointConnectionSettings::Default: {
               if (endpoints.size())
                  m_client->connectToEndpoint(endpoints
                          .first());  // Connect to the first endpoint in the list
               break;
            }
            case EndpointConnectionSettings::Unsecure: {
               for (QOpcUaEndpointDescription& epd : endpoints) {
                  // Connect to the unsecured endpoint
                  if (epd.securityMode() ==
                          QOpcUaEndpointDescription::MessageSecurityMode::None &&
                      epd.securityPolicy().contains("None")) {
                     m_client->connectToEndpoint(epd);
                     break;
                  }
               }
               break;
            }
            default: qWarning() << u"Unknown EndpointConnectionSetting"_s;
         }
      

      It seems QtOpcUa.dll is not the culprit, but open62541_backend.dll provided in the plugins folder.
      Using QtOpcUa.dll 6.9.1 with open62541_backend.dll 6.8.3 works and I can connect to the endpoint.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            basyskom.jannis.voelker Jannis Völker
            redman Calvin Flatt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes