eXpl0it3r / streamdeck-clockify

Clockify Action for the Elgato Stream Deck
MIT License
51 stars 8 forks source link

Possible issue with Stream Deck 6.3? Plugin keeps stopping #14

Closed EDIflyer closed 9 months ago

EDIflyer commented 1 year ago

Sorry, new to Clockify and trying to get this setup. I keep getting the yellow exclamation mark so I regenerated my API key and carefully repasted (as I understand that's often the issue!) but no change.

Looking at the Stream Deck logs it looks like it keeps exiting - do you have any logging I can switch on to help you debug this, or is it something you've seen before?

22:08:21.770                     StreamDeck                        dbgcommand():                                   using log file 'C:\Users\EDIflyer\AppData\Roaming\Elgato\StreamDeck\logs\StreamDeck0.log'
22:08:21.774                     StreamDeck ESDSentryWrapper   inf ESDSentryWrapper::start():                      Sentry use environment 'production'
22:08:21.794                     StreamDeck                        main():                                         Using preferences from \HKEY_CURRENT_USER\Software\Elgato Systems GmbH\StreamDeck
22:08:22.007                     StreamDeck                        main():                                         Compiled with Qt 6.4.2 ; SSL: OpenSSL 1.1.1m  14 Dec 2021
22:08:22.017                     StreamDeck                        main():                                         Runtime SSL Supported: 1
22:08:22.017                     StreamDeck                        main():                                         Runtime SSL version used: OpenSSL 1.1.1q  5 Jul 2022
22:08:22.017                     StreamDeck                        main():                                         Deployed Qt Webengine version: 6.4.2
22:08:22.017                     StreamDeck                        main():                                         Deployed Chromium version: 102.0.5005.177
22:08:22.017                     StreamDeck                        main():                                         Deployed Chromium security patch version: 108.0.5359.94
22:08:22.017                     StreamDeck                        main():                                         Start Stream Deck App -> Version: 6.3.0.18948
22:08:22.218                     StreamDeck                        EGQTCredentialStore::GetPasswordWithServerAndUserName(): CredRead() - GetLastError() 1168
22:08:22.218                     StreamDeck                        ESDVSD2Server::init():                          ### [VSD2 Server] init with workstationID=AQRWbVBhggc-_h1E71jK4w
22:08:22.218                     StreamDeck                        ESDVSDServer::init():                           ### [SERVER] init
22:08:22.218                     StreamDeck                        ESDCUEHub::init():                              ### [CUESDK] init
22:08:22.234                     StreamDeck                        ESDCustomPluginCommunication::start():          Using port 28196 to communicate with plugins
22:08:22.234                     StreamDeck                        ESDPluginManager::LoadPluginsFromCore():        Load plugins from core...
22:08:22.501                     StreamDeck                        AccountMgr::InitializeAccountMgr():             AccountMgr initialized
22:08:22.501                     StreamDeck                        AccountMgr::ReloadAllAccountsFromPreferences(): Reload all accounts
22:08:22.501                     StreamDeck                        AccountMgr::RecreateServiceInstancesForType():  Recreate service instances for Twitter
22:08:22.501                     StreamDeck                        AccountMgr::RecreateServiceInstancesForType():  Recreate service instances for YouTube
22:08:22.501                     StreamDeck                        AccountMgr::RecreateServiceInstancesForType():  Recreate service instances for Streamlabs
22:08:22.501                     StreamDeck                        AccountMgr::RecreateServiceInstancesForType():  Recreate service instances for Twitch
22:08:22.501                     StreamDeck                        AccountMgr::RecreateServiceInstancesForType():  Recreate service instances for Facebook
22:08:22.598                     StreamDeck                        MainWindow::MainWindow():                       Running in high dpi mode: 1.00
22:08:22.886                     StreamDeck                        ESDVSD2Server::resume():                        ### [VSD2 Server] resuming
22:08:22.887                     StreamDeck                        ESDVSD2Server::resume():                        ### [VSD2 Server] port 28198 is available; starting Bonjour
22:08:34.033                     StreamDeck                        ESDVSD2Server::resume():                        ### [VSD2 Server] resumed
22:08:34.282                     StreamDeck                        ESDAppController::bootstrap():                  All object init done!
22:08:34.560                     StreamDeck                        ESDSharedFileServer::ESDSharedFileServer():     mapfile location C:\ProgramData\Elgato\StreamDeck\STREAMDECKINTERNALSHM
22:08:34.649                      ### DeviceManager: ping          check for pending attached devices
22:08:34.649                      ### DeviceManager: ping          opening device @(1)[4057/128/DL19L2A84572]
22:08:34.650                     StreamDeck                        MainWindow::event():                            Wake up keypad(s).
22:08:34.650                      ### DeviceComm [DL19L2A84572]      warming up unit: @(1)[4057/128/XXXX]
22:08:34.652                      ### DeviceManager                device status changed @(1)[4057/128/XXXX]: connected
22:08:34.673                     StreamDeck                        ESDAppStoreManager::UpdateAppStorePlugins():    Check for Plugin Store updates
22:08:34.673                     StreamDeck                        ESDAppStoreManager::UpdateAppStoreIconPacks():  Check for icon pack Store updates
22:08:34.673                     StreamDeck                        ESDAppController::onDeviceStatusChanged():      Device connected, id: @(1)[4057/128/XXXX], serial number: XXXX, firmware version: 1.01.000
22:08:34.689                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin F34B467C68A2F0A5C18F78C6FAE73BF3 is now connected
22:08:34.707                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin B7178B68138D35EB8CAA2A0AF2D97D3C is now connected
22:08:34.707                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin 59B1EE56B9F780CBC4F25DBB8EFEC993 is now connected
22:08:36.287                     StreamDeck                        ESDElgatoDiscoveryService::onRequestFinished(): ### [ELGATO DISCOVERY] discovery posted successfully
22:08:36.365                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin BDE4F680652817B9E99BCB917C088BCA is now connected
22:08:36.474                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin 4A7A048A0C5A7C782522FF385ADFC3E0 is now connected
22:08:36.774                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin 6145B21C1DBA4FED9EC7B6E32F8F33A2 is now connected
22:08:36.804                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin CF0C1424BF68FDABEFE356D6E0156BD3 is now connected
22:08:36.815                     StreamDeck                        EGQTCredentialStore::GetPasswordWithServerAndUserName(): CredRead() - GetLastError() 1168
22:08:36.993                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin 4B4D654C81B5FDB49C960CC2AA1688FA is now connected
22:08:37.104                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin B4542D6562B730763772F8D7963D79C6 is now connected
22:08:37.359                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin 25D2964EC3FF8A73F557B554F89E67BC is now connected
22:08:38.095                     StreamDeck                        ESDObsConnectionManager::CreateSocket::<lambda_7ea60fb2e90cf27a563bb09880d6e501>::operator ()(): SLOBS returned error Connection refused
22:08:39.052                     StreamDeck                        EGQTSWUpdateDialog::checkForUpdate():           Check for update 2: https://gc-updates.elgato.com/windows/sd-update/final/app-version-check.json
22:08:39.052                     StreamDeck                        EGQTSWUpdateDownloader::startDownload():        Download task name: Update File, file URL: https://gc-updates.elgato.com/windows/sd-update/final/app-version-check.json
22:08:39.510                     StreamDeck                        EGQTSWUpdateDialog::shouldUpdate():             current SW Ver: 6.3.0.18948, remote SW Ver: 6.3.0.18948
22:08:39.510                     StreamDeck                        EGQTSWUpdateDialog::handleUpdateFileDownloaded(): No update available
22:08:47.161                     StreamDeck                        ESDObsConnectionManager::CreateSocket::<lambda_7ea60fb2e90cf27a563bb09880d6e501>::operator ()(): SLOBS returned error Connection refused
22:08:56.180                     StreamDeck                        ESDObsConnectionManager::CreateSocket::<lambda_7ea60fb2e90cf27a563bb09880d6e501>::operator ()(): SLOBS returned error Connection refused
22:09:05.243                     StreamDeck                        KA_Execute::execute():                          execute C:/Windows/explorer.exe
22:09:05.243                     StreamDeck                        ESDObsConnectionManager::CreateSocket::<lambda_7ea60fb2e90cf27a563bb09880d6e501>::operator ()(): SLOBS returned error Connection refused
22:09:46.842                     StreamDeck                        ESDCustomPlugin::onNativeProcessFinished():     The plugin 'Clockify' exited normally with code -532462766
22:09:46.842                     StreamDeck                        ESDCustomPlugin::restartNativeProcess():        Restarting plugin 'Clockify' in 0 seconds(s)
22:09:49.075                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin E6BFA993F867D2B69B749AB297CF99B2 is now connected
22:09:53.879                     StreamDeck                        ESDCustomPlugin::onNativeProcessFinished():     The plugin 'Clockify' exited normally with code -532462766
22:09:53.880                     StreamDeck                        ESDCustomPlugin::restartNativeProcess():        Restarting plugin 'Clockify' in 60 seconds(s)
22:10:23.531                     StreamDeck                        KA_Execute::execute():                          execute C:/Windows/explorer.exe
22:10:56.166                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin 176CF4AE260C11708BD1C39DF40B5211 is now connected
22:11:01.233                     StreamDeck                        ESDCustomPlugin::onNativeProcessFinished():     The plugin 'Clockify' exited normally with code -532462766
22:11:01.233                     StreamDeck                        ESDCustomPlugin::restartNativeProcess():        Restarting plugin 'Clockify' in 0 seconds(s)
22:11:03.467                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin 6C127D80214C801ED17A1894FDBF035B is now connected
22:11:08.506                     StreamDeck                        ESDCustomPlugin::onNativeProcessFinished():     The plugin 'Clockify' exited normally with code -532462766
22:11:08.506                     StreamDeck                        ESDCustomPlugin::restartNativeProcess():        Restarting plugin 'Clockify' in 60 seconds(s)
22:12:10.813                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin 68351F952474A9DBE447EDE1957A9B85 is now connected
22:12:15.828                     StreamDeck                        ESDCustomPlugin::onNativeProcessFinished():     The plugin 'Clockify' exited normally with code -532462766
22:12:15.828                     StreamDeck                        ESDCustomPlugin::restartNativeProcess():        Restarting plugin 'Clockify' in 0 seconds(s)
22:12:18.061                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin 29C632A3036DAED71CCB7C216A08BF8A is now connected
22:12:23.032                     StreamDeck                        ESDCustomPlugin::onNativeProcessFinished():     The plugin 'Clockify' exited normally with code -532462766
22:12:23.032                     StreamDeck                        ESDCustomPlugin::restartNativeProcess():        Restarting plugin 'Clockify' in 60 seconds(s)
22:13:25.291                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin F86B31624FB83EFDEEE0C3E95D388829 is now connected
22:13:30.069                     StreamDeck                        ESDCustomPlugin::onNativeProcessFinished():     The plugin 'Clockify' exited normally with code -532462766
22:13:30.069                     StreamDeck                        ESDCustomPlugin::restartNativeProcess():        Restarting plugin 'Clockify' in 0 seconds(s)
22:13:32.355                     StreamDeck                        ESDCustomPluginCommunication::onMessageReceived(): Plugin D14778FE43B2ED8DD7E39D250B0EA4F0 is now connected
22:13:37.322                     StreamDeck                        ESDCustomPlugin::onNativeProcessFinished():     The plugin 'Clockify' exited normally with code -532462766
22:13:37.322                     StreamDeck                        ESDCustomPlugin::restartNativeProcess():        Restarting plugin 'Clockify' in 60 seconds(s)
eXpl0it3r commented 1 year ago

Sorry to hear that you're running into issues.

There's currently some problems when using multiple buttons, see #11 & #12

You can find the Clockify log files here:

Would be great if you can provide the contents of the log files, so we can determine whether it's an existing issue or something new.

EDIflyer commented 1 year ago

Sorry, took me a while to get round to checking...

2023-08-16 22:44:26.6031|INFO|dev.duerrenberger.clockify|45|Key Pressed
2023-08-16 22:44:26.6031|INFO|dev.duerrenberger.clockify|41|Key Released
2023-08-16 22:44:26.7268|DEBUG|dev.duerrenberger.clockify|1|Logger Initialized
2023-08-16 22:44:26.7268|INFO|dev.duerrenberger.clockify|1|Plugin [dev.duerrenberger.clockify] Loading - 1 Actions Found
2023-08-16 22:44:26.8226|DEBUG|dev.duerrenberger.clockify|1|Plugin Loaded: UUID: 657E04BA46135F00F40F7FAB5CA6A8D5 Device Info: Devices:
[Id: 1863844D0864D2AC45804B3B9FF277F8 Type: StreamDeckClassic Size: Rows: 3 Columns: 5]
[Id: 4880F7632625FE2B6CFAFA7DEE5C2F34 Type: StreamDeckClassic Size: Rows: 3 Columns: 5]
ApplicationInfo: Language: en Platform: windows Version: 6.3.0.18948
PluginInfo: Version: 1.6

2023-08-16 22:44:26.8226|INFO|dev.duerrenberger.clockify|1|Plugin version: 1.6
2023-08-16 22:44:26.8226|INFO|dev.duerrenberger.clockify|1|Connecting to Stream Deck...
2023-08-16 22:44:28.9216|INFO|dev.duerrenberger.clockify|1|Connected to Stream Deck
2023-08-16 22:44:28.9216|INFO|dev.duerrenberger.clockify|1|GlobalSettingsManager initialized
2023-08-16 22:44:30.4216|INFO|dev.duerrenberger.clockify|10|API key successfully set
2023-08-16 22:44:31.1487|FATAL|dev.duerrenberger.clockify|4|Unhandled Exception: System.InvalidOperationException: Sequence contains more than one matching element
   at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 , Func`2 , Boolean& )
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 , Func`2 )
   at Clockify.ClockifyContext.GetRunningTimerAsync(String workspaceName, String projectName, String timeName) in D:\a\streamdeck-clockify\streamdeck-clockify\Clockify\ClockifyContext.cs:line 127
   at Clockify.ToggleAction.OnTick() in D:\a\streamdeck-clockify\streamdeck-clockify\Clockify\ToggleAction.cs:line 61
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object )
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()

I'm guessing it's because I have multiple projects with the same name? The issue I have is the way I've set up Clockify is to have multiple standard projects (emails, virtual meeting, F2F meeting, etc.) for different clients, so I won't have unique project names. Hopefully if support for client this would resolve this?

eXpl0it3r commented 9 months ago

I believe this is indeed a duplicate of #8 and should be fixed in V1.7: https://github.com/eXpl0it3r/streamdeck-clockify/releases/tag/1.7