ddb-proxy
ddb-proxy copied to clipboard
Getting an FetchError on use
Not sure what is going on. I am using FoundryVTT v10.303, dnd5e v2.2.2, and ddb-importer v3.4.57, with ddb-proxy v0.0.24, and am now getting the below error.
D:\Git 2023\ddb-proxy>node index.js
DDB Proxy started on :3000
Retrieving ddb config
undefined
Error retrieving DDB Config
FetchError: invalid json response body at https://www.dndbeyond.com/api/config/json reason: Unexpected token < in JSON at position 0
at D:\Git 2023\ddb-proxy\node_modules\node-fetch\lib\index.js:273:32
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'invalid-json'
}
FetchError: invalid json response body at https://www.dndbeyond.com/api/config/json reason: Unexpected token < in JSON at position 0
at D:\Git 2023\ddb-proxy\node_modules\node-fetch\lib\index.js:273:32
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'invalid-json'
}
This can sometimes happen, ddb-importer should fall back to using a default fallback config though.
I have the same error and it appears that dndbeyond is blocking it.
Here's the message from the response below:
Access to this page has been denied because we believe you are using automation tools to browse the website.
Full reponse:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Access to this page has been denied.</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet">
<style>
html,
body {
margin: 0;
padding: 0;
font-family: \'Open Sans\', sans-serif;
color: #000;
}
a {
color: #c5c5c5;
text-decoration: none;
}
.container {
align-items: center;
display: flex;
flex: 1;
justify-content: space-between;
flex-direction: column;
height: 100%;
}
.container>div {
width: 100%;
display: flex;
justify-content: center;
}
.container>div>div {
display: flex;
width: 80%;
}
.customer-logo-wrapper {
padding-top: 2rem;
flex-grow: 0;
background-color: #fff;
visibility: visible;
}
.customer-logo {
border-bottom: 1px solid #000;
}
.customer-logo>img {
padding-bottom: 1rem;
max-height: 50px;
max-width: 100%;
}
.page-title-wrapper {
flex-grow: 2;
}
.page-title {
flex-direction: column-reverse;
}
.content-wrapper {
flex-grow: 5;
}
.content {
flex-direction: column;
}
.page-footer-wrapper {
align-items: center;
flex-grow: 0.2;
background-color: #000;
color: #c5c5c5;
font-size: 70%;
}
@media (min-width: 768px) {
html,
body {
height: 100%;
}
}
</style> <!-- Custom CSS -->
<link href="https://media-waterdeep.cursecdn.com/attachments/px.css" rel="stylesheet">
</head>
<body>
<section class="container">
<div class="customer-logo-wrapper">
<div class="customer-logo"> <img
src="https://www.dndbeyond.com/content/skins/Waterdeep/images/dnd-beyond-logo-black.svg"
alt="Logo" /> </div>
</div>
<div class="page-title-wrapper">
<div class="page-title">
<h1>Please verify you are a human</h1>
</div>
</div>
<div class="content-wrapper">
<div class="content">
<div id="px-captcha"> </div>
<p> Access to this page has been denied because we believe you are using automation tools to browse the
website. </p>
<p> This may happen as a result of the following: </p>
<ul>
<li> Javascript is disabled or blocked by an extension (ad blockers for example) </li>
<li> Your browser does not support cookies </li>
</ul>
<p> Please make sure that Javascript and cookies are enabled on your browser and that you are not
blocking them from loading. </p>
<p> Reference ID: #b96a2dd3-464e-11ee-bc2d-775871586572 </p>
</div>
</div>
<div class="page-footer-wrapper">
<div class="page-footer">
<p> Powered by <a href="https://www.perimeterx.com/whywasiblocked">PerimeterX</a> , Inc. </p>
</div>
</div>
</section> <!-- Px -->
<script> window._pxAppId = \'PXcNj12cyX\'; window._pxJsClientSrc = \'/cNj12cyX/init.js\'; window._pxFirstPartyEnabled = true; window._pxVid = \'\'; window._pxUuid = \'b96a2dd3-464e-11ee-bc2d-775871586572\'; window._pxHostUrl = \'/cNj12cyX/xhr\'; </script>
<script> var s = document.createElement(\'script\'); s.src = \'/cNj12cyX/captcha/captcha.js?a=c&u=b96a2dd3-464e-11ee-bc2d-775871586572&v=&m=0\'; var p = document.getElementsByTagName(\'head\')[0]; p.insertBefore(s, null); if (true ){s.onerror = function () {s = document.createElement(\'script\'); var suffixIndex = \'/cNj12cyX/captcha/captcha.js?a=c&u=b96a2dd3-464e-11ee-bc2d-775871586572&v=&m=0\'.indexOf(\'/captcha.js\'); var temperedBlockScript = \'/cNj12cyX/captcha/captcha.js?a=c&u=b96a2dd3-464e-11ee-bc2d-775871586572&v=&m=0\'.substring(suffixIndex); s.src = \'//captcha.px-cdn.net/PXcNj12cyX\' + temperedBlockScript; p.parentNode.insertBefore(s, p);};}</script>
<!-- Custom Script -->
</body>
</html>