Giter Club home page Giter Club logo

Comments (17)

drasko avatar drasko commented on May 20, 2024 1

@hashin commit https://github.com/mainflux/mainflux-mqtt/commit/070043878ec905095b34701ea1677c087711e45a should fix the issue. Problem was in the message encoding format in the payload byte array - Go JSON decoder encodes/decodes byte arrays in Base64 format (as you can see here: https://golang.org/src/encoding/json/encode.go), while Aedes uses UTF-8 buffers by default.

from magistrala.

nmarcetic avatar nmarcetic commented on May 20, 2024

@hashin Thank you for reporting this one, we will check it ASAP. @darkodraskovic maybe related with nodejs version https://github.com/mainflux/mainflux-mqtt/blob/5a1818ad938c516d293f18255e74382662c46ca0/mainflux-mqtt.js#L60 http://stackoverflow.com/questions/36899888/getting-typeerror-this-is-not-a-typed-array-using-buffer-from-in-mocha
In docker-compose version 4.x is defined , 6.9.4 is now LTS

from magistrala.

drasko avatar drasko commented on May 20, 2024

@hashin can you please confirm you have adequate NodeJS version before we continue investigation.

from magistrala.

drasko avatar drasko commented on May 20, 2024

@hashin can we close this one?

from magistrala.

hashin avatar hashin commented on May 20, 2024

@drasko I am sorry I couldn't reply on time. I will test this out again and will comeback soon. Please bear with me. And thanks!

from magistrala.

drasko avatar drasko commented on May 20, 2024

@hashin np. @nmarcetic can you please just spin a test on a fresh clone, tell us if everything is OK at your side?

from magistrala.

hashin avatar hashin commented on May 20, 2024

@drasko @nmarcetic My nodejs version is 6.9.4. I just tested this out and the error haven't gone away. The error is exactly the same. Will it be the case that the docker setup is using another version instead of my system nodejs installation?

from magistrala.

drasko avatar drasko commented on May 20, 2024

Yep, might be that MQTT Docker needs some love...

from magistrala.

drasko avatar drasko commented on May 20, 2024

Argh: https://github.com/mainflux/mainflux-mqtt/blob/master/Dockerfile#L6

This must be bumped up!

from magistrala.

drasko avatar drasko commented on May 20, 2024

@hashin we'll push the changes in a couple of hours and new MQTT server docker image will be ready on DockerHub with correct Node version. I'll give you a sign once it is there.

from magistrala.

drasko avatar drasko commented on May 20, 2024

@hashin new version of NodeJS is used now: https://github.com/mainflux/mainflux-mqtt/blob/master/Dockerfile#L6

Can you please replace the docker image (I am not sure if pull will work, maybe docker rmi is needed) and tell us if it works now.

from magistrala.

hashin avatar hashin commented on May 20, 2024

@drasko @nmarcetic I was a bit confused with docker, so I ended up removing all the images (with docker rmi mainflux/mqtt etc) and containers and then did docker-compose rm followed by a docker-compose up. But still the problem persists.

Is it that I am doing it wrong? Or is it something to do with docker?

from magistrala.

hashin avatar hashin commented on May 20, 2024

To be sure, I did a docker rmi mainflux/mainflux-mqtt and then removed the container with docker rm container-id. Then I did a docker pull mainflux/mainflux-mqtt in which I got an output of Status: Downloaded newer image for mainflux/mainflux-mqtt:latest.

Then I did a docker-compose rm followed by a docker-compose up. And the error persists. Is there any other way of going about the issue?

Thanks for your help. :)

from magistrala.

drasko avatar drasko commented on May 20, 2024

@hashin I confirm the bug - you are sending the correct command, but something is wrong with the buffer. I am investigating it right now.

from magistrala.

drasko avatar drasko commented on May 20, 2024

Hello @hashin - is this working for you now? Can it be closed?

from magistrala.

hashin avatar hashin commented on May 20, 2024

@drasco Sorry for my late reply. I tested it today and it is working fine. Thanks for the bug fix! I will close the issue.

Also, I have seen some small errors in the documentation and website. (Grammatical, link fixes etc) Can I send a pull request correcting them? :-)

from magistrala.

drasko avatar drasko commented on May 20, 2024

@hashin thanks lot for the bug report and the test!

All the PRs are more than welcome!

from magistrala.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.