question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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):

  • Browser: Brave
  • Version: Happy to share this but version of what? My browser? If so it’s 1.44.112

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'})
    }
},

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:18

github_iconTop GitHub Comments

3reactions
dannyrooseveltcommented, Oct 28, 2022

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.

2reactions
clarkiocommented, Oct 27, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AxiosError: options must be an object · Issue #5142 - GitHub
Seems to be because the config created by create is not being merged correctly Describe the bug F {message: 'options must be an...
Read more >
GetClips with axios returns 401 error - Twitch Developer Forums
When I check the console log, it returnes this error: AxiosError {message: 'Request failed with status code 401', name: 'AxiosError', code: 'ERR_BAD_REQUEST', ...
Read more >
Uncaught (in promise) Error: Request failed with status code ...
Everything was working but my twitch api is not working, please can anyone help me to sort it out this bug. This is...
Read more >
axios error err_bad_response - You.com | The AI Search ...
ERRBADRESPONSE is an error returned by Axios when the server response is malformed or does not match the expected response. This can occur...
Read more >
Warframe | STYANAX: Best Builds Tips & Tricks - YouTube
Styanax, the Axios Champion.Relive his legacy as he ascends to power.Take our Hoplite frame and spearhead your enemies headfirst into the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found