Deta Space app refers to localhost:8080 or returns runtime error
🏷️ WebCrate Version
v1.5.5
⚙️ Environment
Firefox, Chrome
🐞 Describe the bug
Using a Deta Space app, a public crate is not reachable on its public URL.
📚 To Reproduce
I'm using this app on deta.space. After creating a crate and adding a link to it, I clicked "Make public" and tried browsing to the link that was generated. This has (so far) returned two different error messages. This is one:
Error Type:
Runtime.ExitError
Error Message:
RequestId: df914776-af77-4b6e-b114-c315a4f838f6 Error: Runtime exited with error: exit status 1
Logs:
time="2023-08-30T20:04:14Z" level=info msg="serving logs listener on sandbox.localdomain:1234" agent=logsApiAgent
TELEMETRY Name: telemetry-extension State: Already subscribed Types: [Function]
Listening on port 8080
I have also seen another error, which seems like a config issue:
Error Type:
&alloc::boxed::Box
Error Message:
error sending request for url (http://127.0.0.1:8080/crate/public/<crate-id>): connection closed before message completed
Logs:
<empty>
💡 Expected behavior
Some sort of app view that allowed me to see the links in the crate.
📋 Additional context
No response
I'm also finding it weird that the most recent release listed here is 1.4.3, while the app in deta.space says it uses 1.5.5
I have just found the app logs functionality in Deta. I am seeing this error on a number of occasions:
[WebCrate] › -> request 2023-08-30 19:50:18 GET /crate/public/<crate-id>
file:///var/task/build/middleware/index.js:43
const file = await fs.promises.readFile(path.join(__dirname, '../../dist/200.html'));
^
ReferenceError: __dirname is not defined
at renderMetaTags (file:///var/task/build/middleware/index.js:43:59)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I have also seen on several occasions that the service seems to be restarting several times, most poignantly here:
[app] at 2023-08-31T07:37:41.629Z
Listening on port 8080
[app] at 2023-08-31T07:37:41.255Z
Listening on port 8080
[app] at 2023-08-31T07:37:41.016Z
Listening on port 8080
These timestamps roughly correspond to the times when I tried refreshing my browser with the public link, but I'm not sure if the timestamps align fully.
Any news here?
also have this issue