Wondering how to fix Cloudflare “Error 1101: Worker Threw Exception”? We can help you.
Generally the “Error 1101: Rendering error. Worker Threw Exception” occurs when Cloudflare Worker is throwing a runtime JavaScript exception.
Here at Bobcares, we often handle requests from our customers using Cloudflare to fix similar errors as a part of our Server Management Services.
Today we will see how our Support Engineers fix this for our customers.
How to troubleshoot Cloudflare “Error 1101: Worker Threw Exception”
Following are the steps with which our Support Engineers troubleshoot this issue:
Identifying error: Workers Metrics
We can find out whether the application is experiencing any downtime or returning any errors by navigating to Workers Metrics in the dashboard.
Debugging exceptions
After identifying the Workers application that is returning exceptions, we can use wrangler tail
to inspect, and fix the exceptions.
Exceptions can be seen under the exceptions
field in the JSON returned by wrangler tail
.
Once we identify the exception that is causing errors, we can redeploy our code with a fix, and continue trailing the logs to confirm that the issue is fixed.
Setting up a logging service
A Worker can make HTTP requests to any HTTP service on the public internet. We can use a service like Sentry to collect error logs from the Worker, by making an HTTP request to the service to report the error.
While logging in using this strategy, we must remember that outstanding asynchronous tasks are canceled as soon as a Worker finishes sending its main response body to the client.
To ensure that a logging subrequest completes, we can pass the request promise to event.waitUntil()
For example:
addEventListener("fetch", event => { event.respondWith(handleEvent(event))}
async function handleEvent(event) { // ...
// Without event.waitUntil(), our fetch() to our logging service may // or may not complete. event.waitUntil(postLog(stack)) return fetch(event.request)}
function postLog(data) { return fetch("https://log-service.example.com/", { method: "POST", body: data, })}
Go to Origin on Error
By using event.passThroughOnException
, the Workers application will pass requests to our origin if it throws an exception.
As a result, it allows us to add logging, tracking, or other features with Workers, without harming our website’s functionality.
addEventListener("fetch", event => { event.passThroughOnException() event.respondWith(handleRequest(event.request))}) async function handleRequest(request) { // An error here will return the origin response, as if the Worker wasn’t present. // ... return fetch(request)}
[Need assistance? We can help you]
Conclusion
To conclude, we saw the steps that our Support Techs follow to fix this error for our customers.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
var google_conversion_label = «owonCMyG5nEQ0aD71QM»;
How to Fix CloudFlare Error 1101 (Worker threw exception)?
After the update to the Load Balancer Node https://steem.justyy.workers.dev a few days ago, I started to notice the `scriptThrewException` error
scriptThrewException
Number of Errors | 6 |
Number of Requests | 6 |
Number of Sub Requests | 42 |
CPU Time P50 (ms) | 2.11 |
CPU Time P90 (ms) | 3.37 |
CPU Time P99 (ms) | 3.8 |
CPU Time P99.9 (ms) | 3.85 |
After investigation, I found out it is due to Error 1101 thrown by CloudFlare Worker.
This usually happens, when the script throws a Javascript exception, and can be handled by Try-Catch.
Further investigation shows that the error is caused by a rejection in a Promise, which is not handled. Thus, changing to the following (error happens when sending API to RPC node to Get the Version of the Steem Blockchain RPC Node)
1 2 3 4 5 6 |
let version = ""; try { version = await getVersion(server); } catch (e) { version = JSON.stringify(e); } |
let version = ""; try { version = await getVersion(server); } catch (e) { version = JSON.stringify(e); }
–EOF (The Ultimate Computing & Technology Blog) —
GD Star Rating
loading…
290 words
Last Post: Python Function to Convert Excel Sheet Column Titles to Numbers
Next Post: Use jQuery Migrate Helper Plugin to Fix the Classic Editor Errors by WordPress 5.5 Update
The Permanent URL is: How to Fix CloudFlare Error 1101 (Worker threw exception)? (AMP Version)
Wondering how to fix Cloudflare “Error 1101: Worker Threw Exception”? We can help you.
Generally the “Error 1101: Rendering error. Worker Threw Exception” occurs when Cloudflare Worker is throwing a runtime JavaScript exception.
Here at Bobcares, we often handle requests from our customers using Cloudflare to fix similar errors as a part of our Server Management Services.
Today we will see how our Support Engineers fix this for our customers.
How to troubleshoot Cloudflare “Error 1101: Worker Threw Exception”
Following are the steps with which our Support Engineers troubleshoot this issue:
Identifying error: Workers Metrics
We can find out whether the application is experiencing any downtime or returning any errors by navigating to Workers Metrics in the dashboard.
Debugging exceptions
After identifying the Workers application that is returning exceptions, we can use wrangler tail
to inspect, and fix the exceptions.
Exceptions can be seen under the exceptions
field in the JSON returned by wrangler tail
.
Once we identify the exception that is causing errors, we can redeploy our code with a fix, and continue trailing the logs to confirm that the issue is fixed.
Setting up a logging service
A Worker can make HTTP requests to any HTTP service on the public internet. We can use a service like Sentry to collect error logs from the Worker, by making an HTTP request to the service to report the error.
While logging in using this strategy, we must remember that outstanding asynchronous tasks are canceled as soon as a Worker finishes sending its main response body to the client.
To ensure that a logging subrequest completes, we can pass the request promise to event.waitUntil()
For example:
addEventListener("fetch", event => { event.respondWith(handleEvent(event))}
async function handleEvent(event) { // ...
// Without event.waitUntil(), our fetch() to our logging service may // or may not complete. event.waitUntil(postLog(stack)) return fetch(event.request)}
function postLog(data) { return fetch("https://log-service.example.com/", { method: "POST", body: data, })}
Go to Origin on Error
By using event.passThroughOnException
, the Workers application will pass requests to our origin if it throws an exception.
As a result, it allows us to add logging, tracking, or other features with Workers, without harming our website’s functionality.
addEventListener("fetch", event => { event.passThroughOnException() event.respondWith(handleRequest(event.request))}) async function handleRequest(request) { // An error here will return the origin response, as if the Worker wasn’t present. // ... return fetch(request)}
[Need assistance? We can help you]
Conclusion
To conclude, we saw the steps that our Support Techs follow to fix this error for our customers.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
var google_conversion_label = “owonCMyG5nEQ0aD71QM”;
-
Home
-
Error Message
-
Cloud Flare
-
Error 1101: Rendering Error – Causes and Fixes
Search For
Contents
Causes
- a Cloudflare Worker throws a runtime JavaScript exception.
Fixes
Step 1: Provide Appropriate Issues Details
Provide appropriate issues details to Cloudflare Support. May refer the link below :
https://support.cloudflare.com/hc/en-us/articles/200172476#h_7b55d494-b84d-439b-8e60-e291a9fd3d16
Updated on June 29, 2020
Was this article helpful?
Yes
No
Related Articles
- Error 1011: Access Denied (Hotlinking Denied) – Causes and Fixes
- Error 1200: Cache Connection Limit – Causes and Fixes
- Error 1025: Please Check Back Later – Causes and Fixes
- Error 1020: Access Denied – Causes and Fixes
- Error 530 / Error 1016: Origin DNS Error – Causes and Fixes
- Error 526: Invalid SSL Certificate – Causes and Fixes
Need Help?
Submit a ticket to us and let our professional team assists you
Support | Billing | Sales |
Support |
Billing |
Sales |
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
oittaa opened this issue
Mar 10, 2022
· 2 comments
· Fixed by #14
Closed
CloudFlare gives an error with code 1101
#9
oittaa opened this issue
Mar 10, 2022
· 2 comments
· Fixed by #14
Comments
This works and outputs "message": "Password must contain at least 1 Greek character"
https://api.passwordpurgatory.com/make-hell?password=Marge1!%C3%A4
This gives Error 1101
https://api.passwordpurgatory.com/make-hell?password=Marge1!%C3%A4%CE%B1
I’m not familiar with CloudFlare workers, but the error probably happens around line 37. There’s also a typo on line 34, where the condition is !== null
when it probably should be === null
and that condition is just basically skipped in these examples.
else if(password.match(‘/Peter|Lois|Chris|Meg|Brian|Stewie/g’) !== null) { | |
badPasswordMessage = ‘Password must not contain any primary Griffin family character’; | |
} | |
else if(password.match(‘/:‑)|:)|:-]|:]|:>|:-}|:}|:o))|:^)|=]|=)|:]|:->|:>|8-)|:-}|:}|:o)|:^)|=]|=)|:‑D|:D|B^D|:‑(|:(|:‑<|:<|:‑[|:[|:-|||>:[|:{|:(|;(|:’‑(|:'(|:=(|:’‑)|:’)|:»D|:‑O|:O|:‑o|:o|:-0|>:O|>:3|;‑)|;)|;‑]|;^)|:‑P|:-/|:/|:‑.|>:|>:/|:|:‑||:||>:‑)|>:)|}:‑)|>;‑)|>;)|>:3||;‑)|:‑J|<:‑||~:>/g’) === null) { | |
badPasswordMessage = ‘Password must contain at least one emoticon’; | |
} |
It’s a syntax error in the emoticon regex.
SyntaxError: Invalid regular expression: //:‑)|:)|:-]|:]|:>|:-}|:}|:o))|:^)|=]|=)|:]|:->|:>|8-)|:-}|:}|:o)|:^)|=]|=)|:‑D|:D|B^D|:‑(|:(|:‑<|:<|:‑[|:[|:-|||>:[|:{|:(|;(|:'‑(|:'(|:=(|:'‑)|:')|:"D|:‑O|:O|:‑o|:o|:-0|>:O|>:3|;‑)|;)|;‑]|;^)|:‑P|:-/|:/|:‑.|>:|>:/|:|:‑||:||>:‑)|>:)|}:‑)|>;‑)|>;)|>:3||;‑)|:‑J|<:‑||~:>/g/: Unmatched ')' at line 0, col -2
I’m getting a 1101 error too.
Password: hunTerBart2456456æα
Ray ID: 6e9c2f5e7a8b5a43
The error triggered when I added the final alpha (α
)