medusa icon indicating copy to clipboard operation
medusa copied to clipboard

Error 404 with Mailchimp subscribe

Open lfdadev opened this issue 1 year ago • 17 comments

Bug report

Describe the bug

I can't get the Mailchimp subscription to work. I get 404 error

System information

Medusa version (including plugins): 1.19.0 Mailchimp: 1.1.50 Node.js version: Database: Operating system: Browser (if relevant):

Steps to reproduce the behavior

I get error 404 when I subscribe a new email

Screenshots

image image

My form

image image image

Additional context

I followed the guide from the docs.

lfdadev avatar Jan 07 '24 17:01 lfdadev

Are you sure the plugin is loaded correctly? Do you have any logs on your server when starting?

adrien2p avatar Jan 08 '24 15:01 adrien2p

can you share your plugin section of the medusa config

adrien2p avatar Jan 08 '24 15:01 adrien2p

image image

Are you sure the plugin is loaded correctly? Do you have any logs on your server when starting?

I dont have any log about Mailchimp

lfdadev avatar Jan 08 '24 16:01 lfdadev

When I test the route /mailchimp/subscribe I dont receive any

lfdadev avatar Jan 08 '24 16:01 lfdadev

looks like the version 1.1.5 does not include the build output.

cc @olivermrbl we should re publish the plugin including the output files

adrien2p avatar Jan 08 '24 16:01 adrien2p

@lfdadev I suggest you to downgrade until the new version is released

adrien2p avatar Jan 08 '24 16:01 adrien2p

@lfdadev I suggest you to downgrade until the new version is released

Which version can I use?

lfdadev avatar Jan 08 '24 16:01 lfdadev

I would say 1.1.49

adrien2p avatar Jan 08 '24 16:01 adrien2p

I would say 1.1.49

Ok, I will try

lfdadev avatar Jan 08 '24 16:01 lfdadev

keep me posted 👍

adrien2p avatar Jan 08 '24 16:01 adrien2p

I would say 1.1.49

Tested with that version and it worked perfect! Thanks!!!

lfdadev avatar Jan 08 '24 20:01 lfdadev

It worked locally, but not in production. I got Cors error

image

lfdadev avatar Jan 08 '24 21:01 lfdadev

The plugin router is configured to use the store_cors

  const corsOptions = {
    origin: parseCorsOrigins(config.projectConfig.store_cors || ""),
    credentials: true,
  }

  app.use("/mailchimp", router)

  router.use(cors(corsOptions))

Are you sure it is properly configured?

adrien2p avatar Jan 09 '24 08:01 adrien2p

The plugin router is configured to use the store_cors

  const corsOptions = {
    origin: parseCorsOrigins(config.projectConfig.store_cors || ""),
    credentials: true,
  }

  app.use("/mailchimp", router)

  router.use(cors(corsOptions))

Are you sure it is properly configured?

image

I did it on this way. Locally working perfect. I didnt change nothing

lfdadev avatar Jan 09 '24 13:01 lfdadev

image

Mi package

lfdadev avatar Jan 09 '24 18:01 lfdadev

@adrien2p A mate on the discord told me to try his version and it worked. "medusa-plugin-mailchimp-wine": "^1.1.56" My cors error got fixed. If you wanna compare

davidFCDev avatar Jan 10 '24 15:01 davidFCDev

something about this? it throws CORS error for me too in production with the version 1.1.49. In development works fine. And only the POST route, the PUT route doesn't work.

stepmixx avatar Apr 12 '24 04:04 stepmixx

Hey, thanks for the report! Since v2 brought a lot of architectural and API changes on the backend, we will be closing this ticket since it no longer applies to our new setup, or the issue has already been fixed. If you are still facing issues with v1, please open a new ticket and we will address it as soon as possible. Thanks! 🙏

sradevski avatar Jul 05 '24 11:07 sradevski