PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.32k stars 5.27k forks source link

[BUG] Axios Error - Twitch Component Won't Execute Due to Error #4565

Closed clarkio closed 1 year ago

clarkio commented 1 year ago

Describe the bug Using any of the Twitch components results in the action failing due to an error with Axios. After further investigation of the error I believe it's due to a recent change to the axios package which is noted in this issue in the Axios repo: https://github.com/axios/axios/issues/5142. This seems to require some changes to what's provided in the configuration object to the axios package - specifically the paramsSerializer option. This option requires a new key called encode.

AxiosError
options must be an object

DETAILS
    at Object.assertOptions 

Note: see attached screen shot for error shown in my workflow

To Reproduce Steps to reproduce the behavior:

  1. Add any Twitch component to a workflow
  2. Fill in all necessary fields for the Twitch component you chose
  3. Test the action using the Twitch component
  4. See the error

Expected behavior Twitch actions to execute requests and return a result

Screenshots

image

Desktop (please complete the following information):

Additional context Axios seems to have made an update that's a breaking change based on this issue in their repo:

I believe this function in the pipedream Twitch component code needs to be updated: https://github.com/PipedreamHQ/pipedream/blob/bdb6a86866a4400dbee0cdb487b783473dcbfe01/components/twitch/twitch.app.mjs#L53

This issue for the Axios docs covers what I believe needs to change: https://github.com/axios/axios-docs/issues/90

Before:

paramsSerializer: function (params) {
    return Qs.stringify(params, {arrayFormat: 'brackets'})
},

After:

paramsSerializer: {
    encode: function(params) {
        return Qs.stringify(params, {arrayFormat: 'brackets'})
    }
},
dilanmadusankaathukorala commented 1 year ago

Hi @clarkio, Thank you for reporting this issue, I am able to recreate it we will prioritize this to be fixed. Please follow this ticket for updates.

dannyroosevelt commented 1 year ago

Thank you so much for the detailed report and breakdown, @clarkio! FYI since it looks like you were in the component code, we're happy to review a PR if you're interested in implementing the fix yourself, otherwise our team will take a look soon.

clarkio commented 1 year ago

@dannyroosevelt thanks and yea I'd be happy to but I see there is a PR open which I'm also happy to see ๐Ÿ‘

dannyroosevelt commented 1 year ago

Oops looks like we jumped the gun on it... but it's in the QA queue, so it should be fixed soon!

clarkio commented 1 year ago

No worries. Glad to see it's moving along quickly and will be resolved

ghost commented 1 year ago

@clarkio TestPassed image

clarkio commented 1 year ago

This is great to see. Does it mean it's been published to the platform now as well? @Hassan-Abbas-SQA @lcaresia @dannyroosevelt

lcaresia commented 1 year ago

@clarkio Yes, it's published!

clarkio commented 1 year ago

@lcaresia great to hear. Is there anything I need to do in my workflows to get it updated? I noticed the error still showing up when I tried earlier.

lcaresia commented 1 year ago

@lcaresia great to hear. Is there anything I need to do in my workflows to get it updated? I noticed the error still showing up when I tried earlier.

Yes, you need to remove the action and create again!

If you still having the problem call me on Slack and I will help you โ˜บ๏ธ

dannyroosevelt commented 1 year ago

@clarkio you actually don't need to remove the action from your workflow -- you should see a red button at the top right of the Twitch step that says "Update".

clarkio commented 1 year ago

@dannyroosevelt oh whew ok that sounds much better. However I did just manually update by removing some steps and re-adding them and it's working now. I'll use what you suggested @dannyroosevelt to update other workflows using this component.

clarkio commented 1 year ago

@dannyroosevelt I'm not seeing that option in my workflows. Here is an example: image

dannyroosevelt commented 1 year ago

Hey @clarkio that's strange. We aren't able to reproduce that issue. Can you try refreshing the page? If you still don't seen a prompt to Update the action, can you visit the settings for that workflow and enable the toggle to Share with Support, then paste the workflow URL so I can check it out?

dannyroosevelt commented 1 year ago

Actually, we were able to reproduce the error and we're looking into it. In the meantime if you want to get the action working asap, you can definitely remove that step and add it again.

dannyroosevelt commented 1 year ago

FYI we've identified the issue and confirmed it's not related to this Twitch update. We are tracking the issue re: not getting prompted to update existing actions here.

dannyroosevelt commented 1 year ago

FYI @clarkio this should be fixed -- you should now be able to update actions normally Screenshot by Dropbox Capture

clarkio commented 1 year ago

Awesome and thanks for sharing the update ๐Ÿ™‚๐Ÿ‘