Closed pcgqueiroz closed 5 months ago
I'll look into this ASAP from a frontend and backend perspective and run end-to-end tests before merging.
@pcgqueiroz I'll probably will need your help to validate that it works behind a proxy since I don't have easy access to that type of environment. Would that be ok?
@pcgqueiroz which version of the frontend, backend and common plugins are you using and getting this error?
I'll look into this ASAP from a frontend and backend perspective and run end-to-end tests before merging.
@pcgqueiroz I'll probably will need your help to validate that it works behind a proxy since I don't have easy access to that type of environment. Would that be ok?
Sure, no problem.
@pcgqueiroz which version of the frontend, backend and common plugins are you using and getting this error?
"@pagerduty/backstage-plugin": "^0.9.2",
"@pagerduty/backstage-plugin-backend": "^0.4.3"
"@pagerduty/backstage-plugin-common": "^0.1.1"
This issue is solved in #38 and is available on version 0.4.6
.
Describe the bug The PagerDuty card never loads because the call from the frontend to the backend plugin API hangs forever. With some debugs, I could find out that the code hangs on the
fetch
function call.To Reproduce I am behind a corporate proxy, maybe that's the reason why.
Expected behavior The
fetch
function should return.Solution I have imported the
fetch
function fromnode-fetch
package as recommended by the Backstage team in ADR013: Proper use of HTTP fetching libraries and it solved the bug.In file pagerduty.ts, I have just added these following lines:
The
node-fetch
package is already imported in thepackage.json
file: https://github.com/PagerDuty/backstage-plugin-backend/blob/main/package.json#L34