Arc
CDCloudflare Developers
•Created by Arc on 1/14/2024 in #pages-help
different behaviour with same deployments | 522 error on cloudflare pages
i've setup two cloudflare pages apps, and with exact same deployments (i've not touched settings in the dashboard), one of them gives error while other is working as it should.
(redacted domain names, if possible i'd rather not share them publicly)
any idea what might be wrong?
$ cat www2/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
</body>
</html>
$ wrangler pages deploy --project-name redacted5 www2
🌍 Uploading... (1/1)
✨ Success! Uploaded 0 files (1 already uploaded) (0.53 sec)
✨ Deployment complete! Take a peek over at https://227df032.redacted5.pages.dev
$ wrangler pages deploy --project-name redacted6 www2
🌍 Uploading... (1/1)
✨ Success! Uploaded 0 files (1 already uploaded) (0.24 sec)
✨ Deployment complete! Take a peek over at https://e52e954d.redacted6.pages.dev
$ curl https://redacted5.pages.dev
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
</body>
</html>
$ curl https://redacted6.pages.dev
error code: 522%
$ cat www/_worker.js
export default {
/**
* @param {Request} request
*/
async fetch(request) {
return new Response("hello to " + request.headers.get("User-Agent") || "N/A")
},
}
$ wrangler pages deploy --project-name redacted6 www
🌍 Uploading... (0/0)
✨ Success! Uploaded 0 files (0.19 sec)
✨ Compiled Worker successfully
✨ Uploading Worker bundle
✨ Deployment complete! Take a peek over at https://e83e374a.redacted6.pages.dev
$ wrangler pages deploy --project-name redacted5 www
🌍 Uploading... (0/0)
✨ Success! Uploaded 0 files (0.20 sec)
✨ Compiled Worker successfully
✨ Uploading Worker bundle
✨ Deployment complete! Take a peek over at https://be17aa6c.redacted5.pages.dev
$ curl https://redacted6.pages.dev
error code: 522%
$ curl https://redacted5.pages.dev
hello to curl/8.4.0%
$ cat www2/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
</body>
</html>
$ wrangler pages deploy --project-name redacted5 www2
🌍 Uploading... (1/1)
✨ Success! Uploaded 0 files (1 already uploaded) (0.53 sec)
✨ Deployment complete! Take a peek over at https://227df032.redacted5.pages.dev
$ wrangler pages deploy --project-name redacted6 www2
🌍 Uploading... (1/1)
✨ Success! Uploaded 0 files (1 already uploaded) (0.24 sec)
✨ Deployment complete! Take a peek over at https://e52e954d.redacted6.pages.dev
$ curl https://redacted5.pages.dev
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
</body>
</html>
$ curl https://redacted6.pages.dev
error code: 522%
$ cat www/_worker.js
export default {
/**
* @param {Request} request
*/
async fetch(request) {
return new Response("hello to " + request.headers.get("User-Agent") || "N/A")
},
}
$ wrangler pages deploy --project-name redacted6 www
🌍 Uploading... (0/0)
✨ Success! Uploaded 0 files (0.19 sec)
✨ Compiled Worker successfully
✨ Uploading Worker bundle
✨ Deployment complete! Take a peek over at https://e83e374a.redacted6.pages.dev
$ wrangler pages deploy --project-name redacted5 www
🌍 Uploading... (0/0)
✨ Success! Uploaded 0 files (0.20 sec)
✨ Compiled Worker successfully
✨ Uploading Worker bundle
✨ Deployment complete! Take a peek over at https://be17aa6c.redacted5.pages.dev
$ curl https://redacted6.pages.dev
error code: 522%
$ curl https://redacted5.pages.dev
hello to curl/8.4.0%
8 replies