denoland / denoland/deploy_feedback
[Bug]: ISOLATE_INTERNAL_FAILURE using `happy-dom` in Deno Deploy
- Dominant language
- No language data
- Stars
- 79
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
When deploying a Deno HTTP server using Deno Deploy (playground), the `/` endpoint functions correctly. However, when requesting the `/test` endpoint, which utilizes the `happy-dom` library to evaluate some code, the server encounters an error and displays the message: `ISOLATE_INTERNAL_FAILURE`. The playground doesn't seem to output any errors in the logs.
### Steps to reproduce
Create a playground with following code:
```ts
import { Browser, BrowserWindow } from "npm:happy-dom";
import { Application, Router } from "https://deno.land/x/oak@v16.1.0/mod.ts";
import { config } from "https://deno.land/x/dotenv@v3.2.2/mod.ts";
const env = config();
const PORT = env.PORT || 3000;
const app = new Application();
const router = new Router();
router.get('/', context => {
context.response.body = {
"hello": "world"
}
})
router.get('/test', context => {
const browser = new Browser();
const page = browser.newPage();
const window = page.mainFrame.window;
window.eval(1 + 1);
context.response.body = {
"oh": "oh"
}
})
app.use(router.routes());
app.use(router.allowedMethods());
app.addEventListener("listen", ({ hostname, port, secure }) => {
console.log(
`Listening on: ${secure ? "https://" : "http://"}${
hostname ?? "localhost"
}:${port}`
);
});
await app.listen({ port: +PORT });
```
Send a request to `/test` endpoint
### Expected behavior
The server should process the request and evaluate the code using `happy-dom` without errors (or at least show some errors)
### Environment
_No response_
### Possible solution
_No response_
### Additional context
Minimal reproducible playground: https://dash.deno.com/playground/thick-newt-41
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.