LivelyKernel / LivelyKernel/lively.next
Inadequate error messages on `resource.read()` failure
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 90
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Incomplete error message in failure to load resource. When there's a failure due to CORS access policy (the seventh hell of the Internet), the error message from Lively is: TypeError: Failed to fetch
Whereas if I look at the debug console, I see:
Access to fetch at 'http://127.0.0.1:5000/list_user_dashboards/rick.mcgeer@engageLively.com' from origin 'http://127.0.0.1:9011' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
It's pretty easy to fix once I've looked at the debug console, but it would have saved me a step if the error message had been reproduced in Lively (and it's not clear the users we're targeting will go to the debug console)
To Reproduce
Attempt to load an http resource without specifying CORS policy at the server.
Screenshots


Setup
Please check the applicable boxes:
- Windows
Version: Please paste the lively.next commit on which the problem occurred here (short version from the Version Checker in the bottom left corner is sufficient).
0e22dbdb9416630eaf14c02b4da607af029b508d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the resource.read() entry point and reproduce the failed HTTP load against a server without the required CORS header. Compare the error surfaced by Lively with the browser console message; done means the user-facing failure includes useful CORS context rather than only TypeError: Failed to fetch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100