Coder Social home page Coder Social logo

Comments (10)

notjosh avatar notjosh commented on August 15, 2024 2

Okay, took a quick look, and think I figured it out.

claiming.process_claim_code returns a base64'd string, and encoders.encode_bridge_command was incorrectly updated to wrap that value in base64. Yo dawg.

I'll add a test, fix it, and push a release tomorrow, then hopefully we should be seeing printers back online.

from sirius.

notjosh avatar notjosh commented on August 15, 2024 1

That's...actually a really good question. I don't think it's trivially accessible from your end. Maybe if we start with one of:

  • printer ID (from the URL, like https://littleprinter.nordprojects.co/printer/:id)
  • your claim URL (like https://littleprinter.nordprojects.co/:id/:username/claim)
  • the claim code you used fro the printer

Any one of those should be enough to help track it down.

You're welcome to email it over, if you're not stoked on having those details floating around on GitHub too! (email in profile).

from sirius.

jeremyfranklin avatar jeremyfranklin commented on August 15, 2024 1

Sent it your way.

from sirius.

notjosh avatar notjosh commented on August 15, 2024 1

Hiya @jeremyfranklin, I've merged/deployed a potential fix. Can you let me know if it gets your printer back in action?

from sirius.

dickverbunt avatar dickverbunt commented on August 15, 2024 1

Mine is back alive! Awesome work @notjosh.

from sirius.

jeremyfranklin avatar jeremyfranklin commented on August 15, 2024 1

@notjosh It works! Amazing work and thank you.

from sirius.

jeremyfranklin avatar jeremyfranklin commented on August 15, 2024

My Little Printer says it is online, but I have the red light. Where do I find the ID?

from sirius.

notjosh avatar notjosh commented on August 15, 2024

Welp, frustratingly, I added some tooling that seemed to work just fine!

I manually dumped the event payload, looks something like:

{
  "type": "DeviceCommand",
  "bridge_address": "some-bridge-address",
  "command_id": 1,
  "timestamp": "0",
  "binary_payload": "[base64 blob]",
  "device_address": "[redacted]"
}

And it decoded in my sandbox as:

iTerm2EJrVnp

(images get sent upside down for printing, so this is correct).

SO, that means potentially one of a couple of things:

  1. the failed encoding is in one of the values I stubbed out here, which seems unlikely?
  2. I'm looking at the wrong thing. which seems more likely :)

from sirius.

notjosh avatar notjosh commented on August 15, 2024

OKAY, yes, duh, I'm looking at the wrong thing. The error mentions executeBridgeCommand, and "unpack requires a string argument of length 16", so I'm guessing that's pointing us at this line, which makes way more sense.

I'll take another look tomorrow when I get a chance!

from sirius.

jeremyfranklin avatar jeremyfranklin commented on August 15, 2024

@notjosh I can let you know tonight.

from sirius.

Related Issues (11)

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.