"EvalError: Code generation from strings disallowed for this context"

I use sveltekit for server side rendering. when I enter the speicific page.svelte that import "@moonmoonbrothers/flutterjs" , 500 error occured and log message is below The library that cause this problem is made by myself. I think there is no "eval" or "new Function" in my library. and my library's dependencies too (popmotion, color-rgba ...) is there any possibility that error can happen? here is log message
6 Replies
문대승
문대승6mo ago
{ "outcome": "ok", "scriptName": "pages-worker--1765743-preview", "diagnosticsChannelEvents": [], "exceptions": [], "logs": [ { "message": [ "EvalError: Code generation from strings disallowed for this context" ], "level": "error", "timestamp": 1702948440201 } ], "eventTimestamp": 1702948439876, "event": { "request": { "url": "https://9a2c39b0.easy-rd-web.pages.dev/", "method": "GET", "headers": { "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7", "accept-encoding": "gzip", "accept-language": "en-US,en;q=0.9", "cache-control": "max-age=0", "cf-connecting-ip": "220.94.163.16", "cf-ipcountry": "KR", "cf-ray": "837bc9452ed43103", "cf-visitor": "{"scheme":"https"}", "connection": "Keep-Alive", "dnt": "1", "host": "9a2c39b0.easy-rd-web.pages.dev", "priority": "u=0, i", "sec-ch-ua": ""Not_A Brand";v="8", "Chromium";v="120"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": ""macOS"", "sec-fetch-dest": "document", "sec-fetch-mode": "navigate", "sec-fetch-site": "same-origin", "sec-fetch-user": "?1", "upgrade-insecure-requests": "1", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "x-forwarded-proto": "https", "x-real-ip": "220.94.163.16" }, "cf": { "longitude": "127.13770", "httpProtocol": "HTTP/3", "tlsCipher": "AEAD-AES128-GCM-SHA256", "continent": "AS", "asn": 4766, "clientAcceptEncoding": "gzip, deflate, br", "country": "KR", "tlsClientAuth": { "certIssuerDNLegacy": "", "certIssuerSKI": "", "certSubjectDNRFC2253": "", "certSubjectDNLegacy": "", "certFingerprintSHA256": "", "certNotBefore": "", "certSKI": "", "certSerial": "", "certIssuerDN": "", "certVerified": "NONE", "certNotAfter": "", "certSubjectDN": "", "certPresented": "0", "certRevoked": "0", "certIssuerSerial": "", "certIssuerDNRFC2253": "", "certFingerprintSHA1": "" }, "requestPriority": "", "tlsExportedAuthenticator": { "clientFinished": "29873f977c9e817760dad9bccc8aaf56cc949def3af3f09679dd698b83f477c7", "clientHandshake": "866c000def3a9958d067a9b1f28e795d147a55ecc7d5634218728cf6b61b6b74", "serverHandshake": "07d2727da20f1fc7fa1966e402a522ce4cb921aa7659d2fc158e66f176dbe2f5", "serverFinished": "efeab86d77c25922943f52777e9e901797b5ae6929e8a4568b31feda946b538e" }, "tlsVersion": "TLSv1.3", "city": "Seongnam-si", "timezone": "Asia/Seoul", "verifiedBotCategory": "", "edgeRequestKeepAliveStatus": 1, "postalCode": "136", "colo": "ICN", "latitude": "37.43310", "region": "Gyeonggi-do", "regionCode": "41", "asOrganization": "Korea Telecom", "pagesHostName": "9a2c39b0.easy-rd-web.pages.dev", "botManagement": { "corporateProxy": false, "verifiedBot": false, "jsDetection": { "passed": false }, "staticResource": false, "detectionIds": {}, "score": 99 } } }, "response": { "status": 500 } }, "id": 0 }
kian
kian6mo ago
I recommend looking at the _worker.js that Svelte builds and you'll likely see the eval usage in there.
문대승
문대승6mo ago
is _worker.js file made after build using coludflrare-adapter ??
kian
kian6mo ago
Yes.
문대승
문대승6mo ago
thank you!! I will investgate it umm.. but some page (that does not import "@moonmoonbrothers/flutterjs") work properly.. but first thing I have to do is that I try build and dig it
mukhtharcm
mukhtharcm6mo ago
did you got any solution?
Want results from more Discord servers?
Add your server
More Posts