Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] enabling webpush notification give SQL syntax error message #2531

@akovalenko

Description

@akovalenko

Describe the bug
When enabling push notifications on a profile "look and feel" page, the following error pops up in a red box:

(psycopg2.errors.SyntaxError) syntax error at or near "user" LINE 2: ... INSERT INTO webpush_subscriptions (endpoint, user, data... ^ [SQL: INSERT INTO webpush_subscriptions (endpoint, user, data, host) VALUES (%s, %s, %s, %s) ] [parameters: ('https://fcm.googleapis.com/fcm/send/dmHZy5d30lM:APA91bH8LPJc_gJMFqKMB7xH98o9OIbUkAacJPa-XIwAkycnNoI12k1TU9thlzCucpJiM4p_ucmsz2clq99rWnxsvcrqdfyz0xSVFqz6NNHIydJ4gofoY9loKo-4NJMMWj5-olpprc5d', '9ecf81fe79554109a8981b5e16a80dfb', '{"endpoint":"https://fcm.googleapis.com/fcm/send/dmHZy5d30lM:APA91bH8LPJc_gJMFqKMB7xH98o9OIbUkAacJPa-XIwAkycnNoI12k1TU9thlzCucpJiM4p_ucmsz2clq99rWnxs ... (67 characters truncated) ... me":null,"keys":{"p256dh":"BCdzHpFXe9yXTCnllgIenPFTxQecw-bvvIpWneuDtmP52BHXuaKFU1l9zvFb6SYX757eYIT2Z5u2yZ0wC70N0sE","auth":"0jFIovVeEb8T-FJhBq0eJA"}}', 'demo.lnbits.com')] (Background on this error at: http://sqlalche.me/e/13/f405)
500

To Reproduce
Steps to reproduce the behavior:

  1. Use lnbits on mobile
  2. Click on 'My account' -> 'Look and Feel' -> 'Notifications'
  3. See error

Expected behavior
I certainly wouldn't expect a psycopg2 error with an SQLITE-based installation.

Desktop (please complete the following information):

  • LNbits version: 35bb3cc
  • Database sqlite

Additional context
The same problem is seen with demo.lnibts.com.

Screenshot from 2024-05-23 04-36-26

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions