LNbits 1.5.4 on StartOS 0.4.0-beta.9 — can't install LNURLp: table pay_links already exists, and no "Remove data" option is offered

hi!

Trying to install the LNURLp (Pay Links) extension so I can make a reusable LNURL-pay / Lightning-address donation link. Install fails every time with a 500:

running migration lnurlp.1
WARNING | (sqlite3.OperationalError) table pay_links already exists
[SQL: CREATE TABLE lnurlp.pay_links ( id, wallet, description, amount, served_meta, served_pr )]
ERROR  | HTTPException 500: Failed to install extension 'lnurlp' (1.3.2).

Background: earlier I re-seeded the LNbits core DB (switched the Lightning Implementation backend to Core Lightning and back to LND, to fix a macaroon-path issue after the 0.4.0 migration). That cleared the core DB but left orphan extension tables behind.

The Withdraw extension hit the exact same thing — but its install dialog had a “Remove data” button that dropped the stale table and let it install clean. LNURLp offers no “Remove data” option anywhere:

  • the RELEASES/version dialog only has INSTALL + CLOSE

  • the card’s MORE only shows a video + a REPO link

  • it never appears under the INSTALLED tab

Only v1.3.2 is compatible (older versions show as incompatible); 1.3.2 is the one failing on the existing table.

Tried: installing from both the public domain and from .local, logging out and back in as superuser, multiple attempts — same table pay_links already exists 500 every time.

Question: How do I drop the orphan lnurlp.pay_links table (or otherwise force a clean install) when the UI gives me no “Remove data” for this extension?

Hi @casting – this is a forum for StartOS users and for the community to offer support for StartOS.

This question might best be directed to the developer of the plugin in question if you think there’s a bug – Start9 is not the developer of LNbits or of LNURLp.

That said, you seem to imply that this issue is caused by StartOS 0.4.0-beta.9 – is there any reasoning behind that?

hi @StuPleb - thank you for the reply.
Your earlier reply actually fixed this same kind of thing for me on LNbits Withdraw Links after the 0.4.0 migration, and I’ve seen that fix pointed to for other Start9 users since.
This looks like the identical issue — just the Pay Links extension instead of Withdraw. Same leftover-table problem, except this time there’s no “Remove data” button to clear it.
So if Withdraw was something the community could help with here, I figured this would be too. Is there a StartOS way to clear it like there was last time?
I’ve had my Start9 nearly 2 years but I’m honestly still getting the hang of it — so genuine question: are app issues like this something the community helps with, and if so, is there a better category for them (General, DIY, etc.)? Just want to post in the right place going forward. For what it’s worth, I’m a big fan of Start9 — the whole reason I did the 0.4.0 upgrade was to get into mining and actually use Bitcoin as a medium of exchange. Just trying to do my part with the tools, and I appreciate any direction.

You might have to remind me what I told someone else, I don’t remember telling anyone how to modify tables inside the LNbits database. If I did, then cool, copy it at your own risk, but I must have researched it at the time.

In terms of support scope, we can broadly tell you how to get things running on StartOS, and if errors are caused by StartOS in 3rd party services, we’d like to know about them so we can fix the package (we can’t fix upstream code though).

Are you saying this bug in LNURLp is caused by beta.9? or a upgrade in StartOS rather than LNbits itself?

Or are you asking how to access the database and write SQL commands in LNbits?

For the later, you can see our 040 docs, and the command:

start-cli package attach lnbits

…from there you’d have to examine LNbits to see how it works.

Now you mention it, I briefly recall modifying database records, but that was in 0351.