ptrumpis/snap-camera-server

Unknown column 'custom_import' in 'field list' (latest main branch)

MattJeanes opened this issue · 1 comments

Describe the bug
Variations of error message is spammed in the logs upon startup and no lenses work in Snap Camera:

webapp-1    | Error: Unknown column 'custom_import' in 'field list'
                    webapp-1    |     at Packet.asError (/usr/src/app/node_modules/mysql2/lib/packets/packet.js:738:17)
                    webapp-1    |     at Query.execute (/usr/src/app/node_modules/mysql2/lib/commands/command.js:29:26)
                    webapp-1    |     at PoolConnection.handlePacket (/usr/src/app/node_modules/mysql2/lib/connection.js:481:34)
                    webapp-1    |     at PacketParser.onPacket (/usr/src/app/node_modules/mysql2/lib/connection.js:97:12)
                    webapp-1    |     at PacketParser.executeStart (/usr/src/app/node_modules/mysql2/lib/packet_parser.js:75:16)
                    webapp-1    |     at Socket.<anonymous> (/usr/src/app/node_modules/mysql2/lib/connection.js:104:25)
                    webapp-1    |     at Socket.emit (node:events:513:28)
                    webapp-1    |     at addChunk (node:internal/streams/readable:315:12)
                    webapp-1    |     at readableAddChunk (node:internal/streams/readable:289:9)
                    webapp-1    |     at Socket.Readable.push (node:internal/streams/readable:228:10)
                    webapp-1    |     at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
                    webapp-1    |   code: 'ER_BAD_FIELD_ERROR',
                    webapp-1    |   errno: 1054,
                    webapp-1    |   sqlState: '42S22',
                    webapp-1    |   sqlMessage: "Unknown column 'custom_import' in 'field list'",
                    webapp-1    |   sql: "INSERT INTO lenses SET `unlockable_id` = '58846810876', `uuid` = '0f2a44c5053e4adc907c56165b996e25', `snapcode_url` = 'https://snapcodes.storage.googleapis.com/png/95435d63-0635-35da-9c5e-e16f47baa633_320_c856ce89-93d2-4f69-ae76-bcbb3bd6d019.png', `user_display_name` = 'Phoebe Layton', `lens_name` = 'Dark EN', `lens_tags` = '', `lens_status` = 'Live', `deeplink` = 'https://www.snapchat.com/unlock/?type=SNAPCODE&uuid=0f2a44c5053e4adc907c56165b996e25&metadata=01', `icon_url` = 'https://lens-storage.storage.googleapis.com/png/202cf5e7eefe4cb7b8180a7437db45cf', `thumbnail_media_url` = 'https://community-lens.storage.googleapis.com/preview-media/thumbnail/83991ec7-3f52-4489-b516-7fe5e020541c.jpg', `thumbnail_media_poster_url` = '', `standard_media_url` = 'https://community-lens.storage.googleapis.com/preview-media/final/83991ec7-3f52-4489-b516-7fe5e020541c.jpg', `standard_media_poster_url` = '', `obfuscated_user_slug` = 'qUTSplMPOkdJUtjlh5zhVw', `image_sequence` = '{}', `web_import` = 0, `custom_import` = 0"
                    webapp-1    | } 58846810876 Dark EN

To Reproduce
Steps to reproduce the behavior:

  1. Follow the guide to set up
  2. Look at the docker compose logs to see the errors
  3. Attempt to click on snap lenses, any one clicked on disappears and throws more of the above error

Expected behavior
I expected to see no errors in the logs and Snap Camera to apply lenses correctly

Screenshots
image
image

System (please complete the following information):

  • OS: Windows 11 22H2
  • Server Version: latest main
  • Snap Camera Version: 1.21.0
  • Signature Patch applied: yes

Additional context
Note that I am on latest main and not the latest release. The latest release of v3.2.1 works as expected.

My pull request at #160 fixes this issue.
The pull request adds another migration to add the missing column that the server is complaining about.