WinHue icon indicating copy to clipboard operation
WinHue copied to clipboard

Program not showing any objects

Open CarGITmir opened this issue 6 years ago • 8 comments

Your setup

WinHue version : (eg. 3.0.4771.0)

Expected behavior

After pairing bridge, program should display bulbs, sensors etc.

Actual behavior

At first time startup I:

  1. scan for bridges
  2. select my bridge and press "Pair"
  3. Press the button on the bridge, as instructed
  4. Select the paired bridge as default
  5. press "Done" -> The program's main window is empty

logfile: WinHue3.log

CarGITmir avatar Sep 28 '19 13:09 CarGITmir

From the logs it seem that the program cannot find the settings files created when pairing or write them.

2019-09-28 13:33:34,670 [1] ERROR WinHue3.Functions.Application_Settings.Settings.WinHueSettings [SaveBridges:292] ==> Error while saving the bridge settings. System.IO.FileNotFoundException: Could not find file 'C:\Users\Carl\AppData\Roaming\WinHue\WinHueBridges.set'. File name: 'C:\Users\Carl\AppData\Roaming\WinHue\WinHueBridges.set' at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at WinHue3.Functions.Application_Settings.Settings.WinHueSettings.SaveBridges() in C:\Program Files (x86)\Jenkins\workspace\WinHue Dev\WinHue3\Functions\Application Settings\Settings\WinHueSettings.cs:line 281

Do you have any kind of protections on these folders ? I know windows defender has some kind of protection for local files to prevent encryption of local folders. (ransomware)

Hyrules avatar Sep 28 '19 13:09 Hyrules

Didn't get it to work, but it is indeed probably some windows stupidity. -.-

CarGITmir avatar Sep 28 '19 14:09 CarGITmir

if you go into windows defender and then in ransomware protection (manage ransomware protection) is controller folder access on ? also do you run as admin or local user ?

Hyrules avatar Sep 28 '19 15:09 Hyrules

I was having the same issue. I turned off Windows Defender and all other antivirus, made sure .NET was up to date and installed and ran as administrator to no avail. I was still getting the same log message about not being able to save the WinHueBridges.set as WinHueBridges.set.bak file.

I finally fixed it by installing the old version of WinHue saving the bridge, then updating to the latest version. Everything seems to be working after that.

I suspect what may also have worked is to create a file called WinHueBridges.set then try to save the bridge. My suspicion is that there is no logic for what to do if the WinHueBridges.set file does not exist since one of the changes made in the newest version is to make a backup of the settings file before changing it. I did not look at the code nor did I write it at all but based on the behavior this is my guess.

Hyrules, could you please check this? By the way I really like this software so far. Great job!

damiensabin avatar Sep 29 '19 03:09 damiensabin

Installing an old version and then updating fixed it for me, sadly not before I reset my windows (after which it still wasn't working, despite having ransomware protection disabled). Anyways, I'm happy now.

CarGITmir avatar Sep 29 '19 13:09 CarGITmir

Roger that. I will check this condition. Seems to be an issue.

Hyrules avatar Sep 29 '19 14:09 Hyrules

WinHue 3.0.4773.0 Setup.zip I have found the issue. I was trying to backup a file that doesn't exists. This caused the saving function to break before saving the file which didn't exist. So the main page could not load bridge settings because the file didn't exists because it crashed before saving it.

Hyrules avatar Sep 29 '19 14:09 Hyrules

Thanks for the quick response!

CarGITmir avatar Sep 29 '19 16:09 CarGITmir