Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Bad response 301 #62

Open
handihow opened this issue Mar 31, 2020 · 8 comments
Open

Bad response 301 #62

handihow opened this issue Mar 31, 2020 · 8 comments

Comments

@handihow
Copy link

I have a bad response 301 error on the getImage() function

This cloud function was running fine for months.

{ Error: Bad response status code 301
at ClientRequest.handleResponse (/srv/node_modules/plotly/index.js:237:25)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:552:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
at TLSSocket.socketOnData (_http_client.js:454:20)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12) msg: undefined }

I have not changed anything in my code base.

Is there some type of service outage?

@nicolaskruchten
Copy link

We have recently changed the domain name of Chart Studio Cloud from plot.ly to chart-studio.plotly.com, and it looks like this library does not accept the redirection requests... I'll see what I can do about pushing out a patch with the new URL.

@handihow
Copy link
Author

thanks Nicolas

@2dvisio
Copy link

2dvisio commented Mar 31, 2020

same here

@2dvisio
Copy link

2dvisio commented Mar 31, 2020

I have temporarily fixed it by overriding the plot.ly URLs in the file node_modules/plotly/index.js with chart-studio.plotly.com.

@nicolaskruchten
Copy link

From reading the source, it appears that the username parameter can be either a string or an object, so passing in an object with username and apiKey keys, and a host key with value 'chart-studio.plotly.com' should do it, without needing a new release.

@handihow
Copy link
Author

handihow commented Apr 1, 2020

this works for me thanks

@2dvisio
Copy link

2dvisio commented Apr 2, 2020

Have tried after undoing my fix and it works for me as well.

@shaedmorgan
Copy link

shaedmorgan commented Dec 21, 2020

I'm running into this same issue now months later. Code was working just fine until it all of the sudden stopped working. I tried implementing the updated URL to no avail. Error message is almost exactly the same as above, but I'm getting a 500 code instead of the 301.

Any ideas?

Code:
image

Error:
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants