Error: SyntaxError: Failed to construct 'WebSocket': The URL 'undefined' is invalid.
- Dominant language
- TypeScript
- Stars
- 147
- Forks
- 96
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 87
Description
### Describe the bug
https://learn.microsoft.com/en-us/azure/azure-web-pubsub/tutorial-serverless-static-web-app
While following this tutorial, I came across this error on the last step, i think it has something to do with the url parameters.
I have followed all the steps exactly as they should be done.
This is the error i get is on the 'Configure the Web PubSub event handler' step:
{'error': {'code': 'BadArgument', 'message': 'Invalid arguments', 'details': [{'code': 'BadArgument', 'message': 'Upstream URL template is not valid.', 'target': 'properties.eventHandlers[0].urlTemplate'}, {'code': 'BadArgument', 'message': 'Upstream URL template is not valid.', 'target': 'properties.eventHandlers[1].urlTemplate'}]}}
I tried to replace the $STATIC_WEB_APP with my static web app url and it ended up running, but then when i actually visited the static web app site it returns with "Error: Request failed with status code 500"
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked Azure tutorial at the “Configure the Web PubSub event handler” step and reproduce the invalid upstream URL template error. Check how $STATIC_WEB_APP is defined and used, then verify that the event handler accepts the documented templates and the static web app loads without a 500 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100