lnbits icon indicating copy to clipboard operation
lnbits copied to clipboard

When trying to create LNURLw link I get this error

Open trbouma opened this issue 3 years ago • 2 comments

I can't seem to create any LNURLw links. I get this error (with traceback)

2022-05-18T18:19:53.713307+00:00 app[web.1]: ERROR: Exception in ASGI application 2022-05-18T18:19:53.713308+00:00 app[web.1]: Traceback (most recent call last): 2022-05-18T18:19:53.713308+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 375, in run_asgi 2022-05-18T18:19:53.713308+00:00 app[web.1]: result = await app(self.scope, self.receive, self.send) 2022-05-18T18:19:53.713308+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in call 2022-05-18T18:19:53.713309+00:00 app[web.1]: return await self.app(scope, receive, send) 2022-05-18T18:19:53.713309+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/fastapi/applications.py", line 208, in call 2022-05-18T18:19:53.713309+00:00 app[web.1]: await super().call(scope, receive, send) 2022-05-18T18:19:53.713309+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/applications.py", line 112, in call 2022-05-18T18:19:53.713309+00:00 app[web.1]: await self.middleware_stack(scope, receive, send) 2022-05-18T18:19:53.713309+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/middleware/errors.py", line 181, in call 2022-05-18T18:19:53.713310+00:00 app[web.1]: raise exc from None 2022-05-18T18:19:53.713310+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/middleware/errors.py", line 159, in call 2022-05-18T18:19:53.713310+00:00 app[web.1]: await self.app(scope, receive, _send) 2022-05-18T18:19:53.713310+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/middleware/gzip.py", line 18, in call 2022-05-18T18:19:53.713312+00:00 app[web.1]: await responder(scope, receive, send) 2022-05-18T18:19:53.713312+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/middleware/gzip.py", line 35, in call 2022-05-18T18:19:53.713312+00:00 app[web.1]: await self.app(scope, receive, self.send_with_gzip) 2022-05-18T18:19:53.713312+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/middleware/cors.py", line 86, in call 2022-05-18T18:19:53.713312+00:00 app[web.1]: await self.simple_response(scope, receive, send, request_headers=headers) 2022-05-18T18:19:53.713313+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/middleware/cors.py", line 142, in simple_response 2022-05-18T18:19:53.713313+00:00 app[web.1]: await self.app(scope, receive, send) 2022-05-18T18:19:53.713313+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/exceptions.py", line 82, in call 2022-05-18T18:19:53.713313+00:00 app[web.1]: raise exc from None 2022-05-18T18:19:53.713314+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/exceptions.py", line 71, in call 2022-05-18T18:19:53.713314+00:00 app[web.1]: await self.app(scope, receive, sender) 2022-05-18T18:19:53.713314+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/routing.py", line 580, in call 2022-05-18T18:19:53.713314+00:00 app[web.1]: await route.handle(scope, receive, send) 2022-05-18T18:19:53.713317+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/routing.py", line 241, in handle 2022-05-18T18:19:53.713317+00:00 app[web.1]: await self.app(scope, receive, send) 2022-05-18T18:19:53.713317+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/starlette/routing.py", line 52, in app 2022-05-18T18:19:53.713317+00:00 app[web.1]: response = await func(request) 2022-05-18T18:19:53.713318+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/fastapi/routing.py", line 227, in app 2022-05-18T18:19:53.713318+00:00 app[web.1]: dependant=dependant, values=values, is_coroutine=is_coroutine 2022-05-18T18:19:53.713318+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/fastapi/routing.py", line 159, in run_endpoint_function 2022-05-18T18:19:53.713318+00:00 app[web.1]: return await dependant.call(**values) 2022-05-18T18:19:53.713318+00:00 app[web.1]: File "./lnbits/extensions/withdraw/views_api.py", line 115, in api_link_create_or_update 2022-05-18T18:19:53.713318+00:00 app[web.1]: return {**link.dict(), **{"lnurl": link.lnurl(req)}} 2022-05-18T18:19:53.713319+00:00 app[web.1]: File "./lnbits/extensions/withdraw/models.py", line 55, in lnurl 2022-05-18T18:19:53.713319+00:00 app[web.1]: return lnurl_encode(url) 2022-05-18T18:19:53.713319+00:00 app[web.1]: File "/opt/venv/lib/python3.7/site-packages/lnurl/core.py", line 26, in encode 2022-05-18T18:19:53.713319+00:00 app[web.1]: raise InvalidUrl 2022-05-18T18:19:53.713319+00:00 app[web.1]: lnurl.exceptions.InvalidUrl

trbouma avatar May 18 '22 18:05 trbouma

Can you please provide some more information?

how are you creating the LNURLw? frontend, API, etc?

talvasconcelos avatar Jun 27 '22 11:06 talvasconcelos

i've got the same issue. I'm trying to create an LNURLw Voucher on my self-hosted instance (tried with the Frontend). This instance is available with a valid and open https domain (a nginx-reverse-proxy sits before lnbits)

mroxso avatar Aug 12 '22 06:08 mroxso

You need to be on https, http or localhost will throw an error!

@mroxso does the error still exist? on latest lnbits?

talvasconcelos avatar Oct 28 '22 11:10 talvasconcelos

I completely changed my setup. I created a helm chart and deployed it on my Kubernetes Cluster. Maybe I will publish this Helm Chart when it's ready for public. So far no issues with SSL/TLS (I'm using CloudFlare)

mroxso avatar Nov 22 '22 06:11 mroxso

Can we close this?

talvasconcelos avatar Apr 06 '23 10:04 talvasconcelos

yes

mroxso avatar Apr 06 '23 13:04 mroxso