Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Mailtrain
  3. [Solved]Unexpected error (Bad Gateway) when uploading image to template with Mosaico or GrapheJS

[Solved]Unexpected error (Bad Gateway) when uploading image to template with Mosaico or GrapheJS

Scheduled Pinned Locked Moved Mailtrain
7 Posts 2 Posters 3.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Camille
    wrote on last edited by Camille
    #1

    Hi,
    Since a few days (and it doesn't seem related to the last update : Mailtrain Package v1.7.0 App v1.24.1), I get this error "Unexpected error (Bad Gateway)" whenever I try to upload an image with Mosaico or GrapeJS.

    With both editors, the logs tell me

    Mar 17 14:47:53 fs.js:168
    Mar 17 14:47:53 throw new ERR_INVALID_CALLBACK(cb);
    Mar 17 14:47:53 ^
    Mar 17 14:47:53
    Mar 17 14:47:53 TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
    Mar 17 14:47:53 at makeCallback (fs.js:168:11)
    Mar 17 14:47:53 at Object.unlink (fs.js:1199:14)
    Mar 17 14:47:53 at ReadStream.<anonymous> (/app/code/node_modules/jquery-file-upload-middleware/lib/uploadhandler.js:149:48)
    Mar 17 14:47:53 at ReadStream.emit (events.js:327:22)
    Mar 17 14:47:53 at ReadStream.EventEmitter.emit (domain.js:467:12)
    Mar 17 14:47:53 at endReadableNT (internal/streams/readable.js:1327:12)
    Mar 17 14:47:53 at processTicksAndRejections (internal/process/task_queues.js:80:21) {
    Mar 17 14:47:53 code: 'ERR_INVALID_CALLBACK'
    Mar 17 14:47:53 }
    Mar 17 14:47:53 npm ERR! code ELIFECYCLE
    Mar 17 14:47:53 npm ERR! errno 1
    Mar 17 14:47:53 npm ERR! mailtrain@1.24.0 start: `node index.js`
    Mar 17 14:47:53 npm ERR! Exit status 1
    Mar 17 14:47:53 npm ERR!
    

    The images actually get uploaded to /tmp.
    Anyone having the same problem or any idea on what to investigate ?

    Thanks !

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Camille
      wrote on last edited by
      #2

      Actually, I get the same problem with a fresh install of the app (Package v1.7.0
      App v1.24.1).
      Has anyone a working instance of this version?

      girishG 1 Reply Last reply
      0
      • C Camille

        Actually, I get the same problem with a fresh install of the app (Package v1.7.0
        App v1.24.1).
        Has anyone a working instance of this version?

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        @camille Sorry for the delay, but I can reproduce the issue. Are you able to report the issue upstream at https://github.com/Mailtrain-org/mailtrain ? Mailtrain has not made a release in quite a while now (almost 2.5 years), so I am not sure what the development status of the project is.

        FWIW, we still we use mailtrain but we just don't use that email builder. Instead, I have a template that I made from https://beefree.io/bee-free/ and then I pasted that html into the newsletter.

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          The root cause of the issue is https://github.com/aguidrevitch/jquery-file-upload-middleware/issues/85

          1 Reply Last reply
          0
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            I ended up deprecating nodejs version and it works after that.

            1caf21a7-252b-419e-8e2c-e768a78f4e65-image.png

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Camille
              wrote on last edited by
              #6

              Thanks @girish for the fix. I have reported the problem upstream : https://github.com/Mailtrain-org/mailtrain/issues/1030

              girishG 1 Reply Last reply
              0
              • C Camille

                Thanks @girish for the fix. I have reported the problem upstream : https://github.com/Mailtrain-org/mailtrain/issues/1030

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #7

                @camille thanks, I have left a note there. We can help them fix/update it if they have interest in keeping mailtrain 1 updated.

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search