Readme

Blob Admin

This is a lightweight Blob Admin interface to view and debug your Blob data.

Screenshot 2024-11-22 at 15.43.43@2x.png

Versions 0-17 of this val were done with Hono and server-rendering. Versions 18+ were generated with Townie and use client-side React.

To use this val, fork it to your account. Authentication is handled by @stevekrouse/lastlogin, so only the owner of the val will be able to see and edit their own blobs.

Code
HTTP
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
20
pomdtr avatar

Instead of instructing the user to fork the val, why not suggest the user to create a new val referencing your own ?

export { default } from "https://esm.town/v/stevekrouse/blob_admin";

It would allow the user to automatically get update from your, or control them using the version query param.

stevekrouse avatar

Excellent idea! That's how @rodrigotello/hnFollow works.

This way is slightly easier to customize, that way is slightly easier to manage updates.

In theory, Val Town could help users manage forks like Github does:

Screenshot 2023-12-14 at 09.28.40.png

Or even notify users that they should "pull" from the remote val because it has new changes.

The question of when to use something as a dependency vs as a fork is a fascinating one. I'm eager to see what patterns emerge

pomdtr avatar

I see importing as an installation method a val to my val.town account, while forking is just copying a specific version of a val.

I can see myself using, it depends as if I see myself as a user or a contributor.

Even for the same val, I can see myself having my prod endpoint and my dev endpoint.

pomdtr avatar

comments really need an edit button 😅

loshmyy avatar

It's not working anymore. I'm getting an error message. "message": "{"statusCode":500,"error":"Internal Server Error","message":"Failed to create Turso DB: Namespace store has shutdown"}",

stevekrouse avatar

Sorry about that @loshmyy. We haven't seen that error message before. Is everything working properly now?

loshmyy avatar

@stevekrouse Everything is working now, thank you!

artivilla avatar

For UI centric products, I would fork and customize or to contribute a change. With deps I'm specifically looking to use that version. forks are easier to view have updates vs dep generally to me feel like a chore I have to do as maintenance. At min for security patches from socket.io.

but never thought about it as such. This is very fascinating indeed!

rozek avatar

Hello, Steve - I just forked the blob_admin, logged in using Google...and ran into an "Internal Server Error". Any ideas why and how to ged rid of it?

rozek avatar

The browser complains "Failed to load resource: the server responded with a status of 500 ()" for resource "https://rozek-blob_admin.web.val.run/"

stevekrouse avatar

Hey @rozek, thanks for writing in! I was able to get that same error when logging in with a different email address than the one tied to my Val Town account. I then popped open my request logs, saw the error message, and clicked on the line of code, and fixed it. (It took two fixes.) Hope that's your issue and you can fork it again to get it working!

For next time, be sure to check out your request logs. You could even pop open Townie to get help fixing it. And then you can send me a pull request with your fix :)

Here's a video of me reproducing, finding, and fixing the bug: https://share.cleanshot.com/cMrD7kdl

rozek avatar

@stevekrouse cool, how to fix bugs within val.town - thanks for your effort and the video! Unfortunately, your blob_admin does not seem to like me: I forked the new blob_admin, tried it...and failed again. I've taken two screenshots for demonstration: Bildschirmfoto 2024-12-13 um 05.13.19.png

Bildschirmfoto 2024-12-13 um 05.14.16.png

stevekrouse avatar

Sorry about that! Should be good now? I think Townie hallucinated the sign in route, but I fixed it

rozek avatar

So gradually it becomes embarrassing: I forked again - and failed again. Here is a screen shot:

Bildschirmfoto 2024-12-16 um 16.13.06.png

stevekrouse avatar

Sorry to hear that! I just tested it out by logging in with a different account, forking it, and it worked for me.

If you'd like to debug it further, I'd advise you to:

  1. Open the link in a new tab (not view it in val town embedded)
  2. See what's going on on line 106 in your val
  3. See what's going on in your network tab. Maybe there's an error there

Good luck!

rozek avatar

hmmm, guess what? Here is the screen shot:

Bildschirmfoto 2024-12-16 um 16.42.57.png

which occurred after forking your blob_admin and opening the val.run URL in a new tab...the browser console does not contain more details (just HTTP status 500 from the server)

rozek avatar

ah, I tried again and the server responded now...stay tuned...

rozek avatar

no - at first, it looked great because it knew me and allowed me to press "Sign in" - but then I got the same error as above

rozek avatar

FYI: "Logout" and "Signin" produce the same error message

rozek avatar

FYI: I meanwhile received an email titled "Your val @rozek.blob_admin errored" errored with some details - do you want/need them?

stevekrouse-blob_admin.web.val.run
Updated: December 16, 2024