question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[package] paho-mqtt-c/1.3.4: ssl option throws exception constructing async_client using 'wss' protocol broker url

See original GitHub issue

Updated paho-mqtt-cpp package to using the new paho-mqtt-c/1.3.4 package and with the default option ‘ssl’=True. Creating both packages appears to work however there seems to be a couple issues…

  1. regardless of the settings of the options ‘ssl’, ‘asynchronous’, or ‘shared’ the end package appears to contain all variants of the library binaries both static and dynamic, with and without ssl, and asynchronous and synchronous clients. Normally I would expect to see the single library binary for just the specific variant being optioned in the recipe.
  2. consuming application tries to call async client constructor using a ‘wss’ url (requiring ssl support) throws an exception saying that protocol isn’t supported. stepping into the library in a debugger sees the internal ‘OPENSSL’ define as undefined.

It appears to either not be linking to the correct variant of the library supporting ssl or the cpp defines are not working properly between the packaged library and the consuming application, or both.

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: paho-mqtt-c/1.3.4 via bumped paho-mqtt-cpp
  • Operating System+version: Windows
  • Compiler+version: Visual Studio 2018
  • Conan version: 1.24.0
  • Python version: 3.7.7

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=15
build_type=Debug
compiler.runtime=MDd
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

Set recipe ssl option True create package consume package from your application respecting the ssl option as True construct an async_client with a url starting with ‘wss://’ constructor throws exception

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
icraggscommented, Jun 13, 2020

No, it’s not the case that both need to be built. It can be either/or.

0reactions
keysight-darylcommented, Aug 5, 2020

Yes

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebSocket connection failed. Error in browser console, since ...
I need a server warning line to understand, could you guys post warning from server logs which contains Request Origin is not authorized...
Read more >
Getting started — websockets 6.0 documentation
A client connecting to a secure WebSocket server with a valid certificate (i.e. signed by a CA that your Python installation trusts) can...
Read more >
WebSocket connection fails on Chrome without SSL
In Chrome, when I turn SSL off on the server and try to connect via http, it throws an error. Here's the error...
Read more >
Using MQTT Over WebSockets with Mosquitto
In the case of MQTT over Websockets the websockets connection forms an outer pipe for the MQTT protocol. The MQTT broker places the...
Read more >
Writing WebSocket client applications - Web APIs | MDN
In order to communicate using the WebSocket protocol, you need to create a WebSocket object; this will automatically attempt to open the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found