I've tried the following libraries :
react-native-native-mqtt
react-native-mqtt
react_native_mqtt
sp-react-native-mqtt
Most of them gave me the same Error :
null is not an object (evaluating 'Mqtt.createClient')
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:293:29 in invoke
- node_modules/regenerator-runtime/runtime.js:63:36 in tryCatch
- node_modules/regenerator-runtime/runtime.js:154:27 in invoke
- node_modules/regenerator-runtime/runtime.js:189:16 in PromiseImpl$argument_0
- node_modules/react-native/node_modules/promise/setimmediate/core.js:45:6 in tryCallTwo
- node_modules/react-native/node_modules/promise/setimmediate/core.js:200:22 in doResolve
- node_modules/react-native/node_modules/promise/setimmediate/core.js:66:11 in Promise
- node_modules/regenerator-runtime/runtime.js:188:15 in callInvokeWithMethodAndArg
- node_modules/regenerator-runtime/runtime.js:211:38 in enqueue
- node_modules/regenerator-runtime/runtime.js:238:8 in exports.async
.... its pretty long and probably says nothing of value.
The ones that didn't give me this error; gave me errors about sockets and buffers, almost as if it was trying to run it over web sockets.
What am I doing wrong here?
Is it even possible to get MQTT messages on android react-native?
Is Expo the problem?
question from:
https://stackoverflow.com/questions/65903774/receive-mqtt-messages-on-react-native-expo 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…