Jump to content
Ketarin forum
Electrosokk

Cant' submit app to online database

Recommended Posts

Could not submit 'Input Overlay (OBS Studio Plugins)' to the online database: Unhandled Doctrine\DBAL\Exception\NotNullConstraintViolationException exception:An exception occurred while executing 'INSERT INTO apps_applicationjobs (ApplicationName, Category, ApplicationXml, ApplicationGuid, AuthorGuid, ExternalId)
                                    VALUES (?, ?, ?, ?, ?, ?)' with params [{"0":"Input Overlay (OBS Studio Plugins)"}, {"0":"Multimedia"}, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Jobs><ApplicationJob xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" Guid=\"1d21f6b0-5a8f-4b79-9650-2a9a089c8f56\"><Category>Multimedia<\/Category><WebsiteUrl>https:\/\/obsproject.com\/forum\/resources\/input-overlay.552\/<\/WebsiteUrl><UserAgent\/><UserNotes>https:\/\/github.com\/univrsal\/input-overlay<\/UserNotes><LastFileSize>3948449<\/LastFileSize><LastFileDate>2018-02-26T15:16:13.7080997<\/LastFileDate><IgnoreFileInformation>false<\/IgnoreFileInformation><DownloadBeta>Default<\/DownloadBeta><DownloadDate xsi:nil=\"true\"\/><CheckForUpdatesOnly>false<\/CheckForUpdatesOnly><VariableChangeIndicator>version<\/VariableChangeIndicator><HashVariable\/><HashType>None<\/HashType><CanBeShared>true<\/CanBeShared><ShareApplication>true<\/ShareApplication><ExclusiveDownload>false<\/ExclusiveDownload><HttpReferer\/><SetupInstructions\/><Variables><item><key><string>appcat<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex\/><TextualContent>{appname:regexreplace: \\(.*\\):}<\/TextualContent><Name>appcat<\/Name><\/UrlVariable><\/value><\/item><item><key><string>appfile<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex\/><TextualContent>{appname:multireplace:|:(|)| :|_|_}<\/TextualContent><Name>appfile<\/Name><\/UrlVariable><\/value><\/item><item><key><string>version<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>RegularExpression<\/VariableType><Regex>input-overlay.v([^\"]*).zip<\/Regex><Url>https:\/\/github.com\/univrsal\/input-overlay\/releases\/latest<\/Url><Name>version<\/Name><\/UrlVariable><\/value><\/item><item><key><string>url<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex>(https[^\"]*youtube-dl.exe)<\/Regex><Url>http:\/\/rg3.github.io\/youtube-dl\/download.html<\/Url><TextualContent>https:\/\/github.com\/{download}<\/TextualContent><Name>url<\/Name><\/UrlVariable><\/value><\/item><item><key><string>download<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>RegularExpression<\/VariableType><Regex>([^\"]*.zip)<\/Regex><Url>https:\/\/github.com\/univrsal\/input-overlay\/releases\/latest<\/Url><Name>download<\/Name><\/UrlVariable><\/value><\/item><item><key><string>subcategory<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex\/><TextualContent>OBS Studio Plugins<\/TextualContent><Name>subcategory<\/Name><\/UrlVariable><\/value><\/item><\/Variables><ExecuteCommand><\/ExecuteCommand><ExecutePreCommand><\/ExecutePreCommand><ExecuteCommandType>Batch<\/ExecuteCommandType><ExecutePreCommandType>Batch<\/ExecutePreCommandType><SourceType>FixedUrl<\/SourceType><PreviousLocation><\/PreviousLocation><DeletePreviousFile>true<\/DeletePreviousFile><Enabled>true<\/Enabled><FileHippoId\/><LastUpdated>2018-02-26T15:16:13.7080997<\/LastUpdated><TargetPath>{downloads}\\{category}\\{subcategory:regexreplace: Plugins:}\\{subcategory}\\{appfile}v{version}.{url:ext}<\/TargetPath><FixedDownloadUrl>{url}<\/FixedDownloadUrl><Name>Input Overlay (OBS Studio Plugins)<\/Name><\/ApplicationJob><\/Jobs>\n", "{guid-here}", "{6b00f891-0086-4c98-9974-bfe5e28151a5}", ""]:

SQLSTATE[HY000]: General error: 1364 Field 'CreatedAt' doesn't have a default value
Could not submit 'VirtualCam (OBS Studio Plugins)' to the online database: Unhandled Doctrine\DBAL\Exception\NotNullConstraintViolationException exception:An exception occurred while executing 'INSERT INTO apps_applicationjobs (ApplicationName, Category, ApplicationXml, ApplicationGuid, AuthorGuid, ExternalId)
                                    VALUES (?, ?, ?, ?, ?, ?)' with params [{"0":"VirtualCam (OBS Studio Plugins)"}, {"0":"Multimedia"}, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Jobs><ApplicationJob xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" Guid=\"09e22f38-4009-4f66-9261-6ec4a0e54a13\"><Category>Multimedia<\/Category><WebsiteUrl>https:\/\/obsproject.com\/forum\/resources\/obs-virtualcam.539\/<\/WebsiteUrl><UserAgent\/><UserNotes>https:\/\/github.com\/CatxFish\/obs-virtual-cam\/releases<\/UserNotes><LastFileSize>384373<\/LastFileSize><LastFileDate>2018-02-26T15:13:07.3458387<\/LastFileDate><IgnoreFileInformation>false<\/IgnoreFileInformation><DownloadBeta>Default<\/DownloadBeta><DownloadDate xsi:nil=\"true\"\/><CheckForUpdatesOnly>false<\/CheckForUpdatesOnly><VariableChangeIndicator>version<\/VariableChangeIndicator><HashVariable\/><HashType>None<\/HashType><CanBeShared>true<\/CanBeShared><ShareApplication>true<\/ShareApplication><ExclusiveDownload>false<\/ExclusiveDownload><HttpReferer\/><SetupInstructions\/><Variables><item><key><string>appcat<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex\/><TextualContent>{appname:regexreplace: \\(.*\\):}<\/TextualContent><Name>appcat<\/Name><\/UrlVariable><\/value><\/item><item><key><string>appfile<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex\/><TextualContent>{appname:multireplace:|:(|)| :|_|_}<\/TextualContent><Name>appfile<\/Name><\/UrlVariable><\/value><\/item><item><key><string>version<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>RegularExpression<\/VariableType><Regex>OBS-VirtualCam([^\"]*)-Installer.exe<\/Regex><Url>https:\/\/github.com\/CatxFish\/obs-virtual-cam\/releases\/latest<\/Url><Name>version<\/Name><\/UrlVariable><\/value><\/item><item><key><string>url<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex>(https[^\"]*youtube-dl.exe)<\/Regex><Url>http:\/\/rg3.github.io\/youtube-dl\/download.html<\/Url><TextualContent>https:\/\/github.com\/{download}<\/TextualContent><Name>url<\/Name><\/UrlVariable><\/value><\/item><item><key><string>download<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>RegularExpression<\/VariableType><Regex>([^\"]*.exe)<\/Regex><Url>https:\/\/github.com\/CatxFish\/obs-virtual-cam\/releases\/latest<\/Url><Name>download<\/Name><\/UrlVariable><\/value><\/item><item><key><string>subcategory<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex\/><TextualContent>OBS Studio Plugins<\/TextualContent><Name>subcategory<\/Name><\/UrlVariable><\/value><\/item><\/Variables><ExecuteCommand><\/ExecuteCommand><ExecutePreCommand><\/ExecutePreCommand><ExecuteCommandType>Batch<\/ExecuteCommandType><ExecutePreCommandType>Batch<\/ExecutePreCommandType><SourceType>FixedUrl<\/SourceType><PreviousLocation><\/PreviousLocation><DeletePreviousFile>true<\/DeletePreviousFile><Enabled>true<\/Enabled><FileHippoId\/><LastUpdated>2018-02-26T15:13:07.3458387<\/LastUpdated><TargetPath>{downloads}\\{category}\\{subcategory:regexreplace: Plugins:}\\{subcategory}\\{appfile}v{version}.{url:ext}<\/TargetPath><FixedDownloadUrl>{url}<\/FixedDownloadUrl><Name>VirtualCam (OBS Studio Plugins)<\/Name><\/ApplicationJob><\/Jobs>\n", "{guid-here}", "{6b00f891-0086-4c98-9974-bfe5e28151a5}", ""]:

SQLSTATE[HY000]: General error: 1364 Field 'CreatedAt' doesn't have a default value

This error occurs with all newly created entries in my database.

Edited by shawn
sanitizing user GUID

Share this post


Link to post
Share on other sites

This is a @crrodriguez thing. The database needs to be modified to add NOW() or CURRENT_TIMESTAMP as the default value for the `CreatedAt` field. 

ALTER TABLE  `apps_applicationjobs` CHANGE  `CreatedAt`  `CreatedAt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ;

 

Share this post


Link to post
Share on other sites

Not sure why it's an issue now and wasn't before, but I made the change to the DB structure.

Share this post


Link to post
Share on other sites
07.03.2018 13:20:18: Could not submit 'Input Overlay (OBS Studio Plugins)' to the online database: Unhandled Doctrine\DBAL\Exception\DriverException exception:An exception occurred while executing 'INSERT INTO apps_applicationjobs (ApplicationName, Category, ApplicationXml, ApplicationGuid, AuthorGuid, ExternalId)
                                    VALUES (?, ?, ?, ?, ?, ?)' with params [{"0":"Input Overlay (OBS Studio Plugins)"}, {"0":"Multimedia"}, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Jobs><ApplicationJob xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" Guid=\"5800d0ed-699f-491f-b224-91ebbde64f93\"><Category>Multimedia<\/Category><WebsiteUrl>https:\/\/obsproject.com\/forum\/resources\/input-overlay.552\/<\/WebsiteUrl><UserAgent\/><UserNotes>https:\/\/github.com\/univrsal\/input-overlay<\/UserNotes><LastFileSize>3948449<\/LastFileSize><LastFileDate>2018-02-21T13:47:31+01:00<\/LastFileDate><IgnoreFileInformation>false<\/IgnoreFileInformation><DownloadBeta>Default<\/DownloadBeta><DownloadDate xsi:nil=\"true\"\/><CheckForUpdatesOnly>false<\/CheckForUpdatesOnly><VariableChangeIndicator>version<\/VariableChangeIndicator><HashVariable\/><HashType>None<\/HashType><CanBeShared>true<\/CanBeShared><ShareApplication>true<\/ShareApplication><ExclusiveDownload>false<\/ExclusiveDownload><HttpReferer\/><SetupInstructions\/><Variables><item><key><string>appcat<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex\/><TextualContent>{appname:regexreplace: \\(.*\\):}<\/TextualContent><Name>appcat<\/Name><\/UrlVariable><\/value><\/item><item><key><string>appfile<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex\/><TextualContent>{appname:multireplace:|:(|)| :|_|_}<\/TextualContent><Name>appfile<\/Name><\/UrlVariable><\/value><\/item><item><key><string>version<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>RegularExpression<\/VariableType><Regex>input-overlay.v([^\"]*).zip<\/Regex><Url>https:\/\/github.com\/univrsal\/input-overlay\/releases\/latest<\/Url><Name>version<\/Name><\/UrlVariable><\/value><\/item><item><key><string>url<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex>(https[^\"]*youtube-dl.exe)<\/Regex><Url>http:\/\/rg3.github.io\/youtube-dl\/download.html<\/Url><TextualContent>https:\/\/github.com\/{download}<\/TextualContent><Name>url<\/Name><\/UrlVariable><\/value><\/item><item><key><string>download<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>RegularExpression<\/VariableType><Regex>([^\"]*.zip)<\/Regex><Url>https:\/\/github.com\/univrsal\/input-overlay\/releases\/latest<\/Url><Name>download<\/Name><\/UrlVariable><\/value><\/item><item><key><string>subcategory<\/string><\/key><value><UrlVariable><RegexRightToLeft>false<\/RegexRightToLeft><VariableType>Textual<\/VariableType><Regex\/><TextualContent>OBS Studio Plugins<\/TextualContent><Name>subcategory<\/Name><\/UrlVariable><\/value><\/item><\/Variables><ExecuteCommand><\/ExecuteCommand><ExecutePreCommand><\/ExecutePreCommand><ExecuteCommandType>Batch<\/ExecuteCommandType><ExecutePreCommandType>Batch<\/ExecutePreCommandType><SourceType>FixedUrl<\/SourceType><PreviousLocation><\/PreviousLocation><DeletePreviousFile>true<\/DeletePreviousFile><Enabled>true<\/Enabled><FileHippoId\/><LastUpdated>2018-03-07T13:19:54.9098525+01:00<\/LastUpdated><TargetPath>{downloads}\\{category}\\{subcategory:regexreplace: Plugins:}\\{subcategory}\\{appfile}v{version}.{url:ext}<\/TargetPath><FixedDownloadUrl>{url}<\/FixedDownloadUrl><Name>Input Overlay (OBS Studio Plugins)<\/Name><\/ApplicationJob><\/Jobs>\n", "{5800d0ed-699f-491f-b224-91ebbde64f93}", "{6b00f891-0086-4c98-9974-bfe5e28151a5}", ""]:

SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'CreatedAt' at row 1

It seems like it's still not working.

Share this post


Link to post
Share on other sites

The error suggests that the field isn't really a timestamp or date field, but is being using an epoch or something instead.

@floele what's the field structure of the CreatedAt column? If you'd like to take this offline you can email me.

Share this post


Link to post
Share on other sites

This is the table structure:

CREATE TABLE `apps_applicationjobs` (
  `ShareId` int(10) UNSIGNED NOT NULL,
  `ApplicationName` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `ApplicationGuid` varchar(38) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `Category` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `AuthorGuid` varchar(38) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `CreatedAt` int(10) UNSIGNED NOT NULL DEFAULT current_timestamp(),
  `UpdatedAt` int(10) UNSIGNED NOT NULL DEFAULT current_timestamp(),
  `ApplicationXml` text COLLATE utf8_unicode_ci NOT NULL,
  `DownloadCount` int(11) NOT NULL DEFAULT 0,
  `ExternalId` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

 

Share this post


Link to post
Share on other sites

I think it should be fixed now. In the old version, the database tables had triggers to update the missing files, the new version didn't have them. The default value current_timestamp() isn't actually working for an integer column.

Share this post


Link to post
Share on other sites

is there a reason why you're using int instead of datetime? i can't imagine it would be anywhere near as useful as an integer.

Share this post


Link to post
Share on other sites

That simply happened because in PHP I get the UNIX timestamp as int. I probably wouldn't use this data type anymore now but it works fine as it is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×