Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors trying to use Remote API feature with Philips Hue #826

Closed
MarcusBluestein opened this issue Jul 27, 2023 · 8 comments
Closed

Errors trying to use Remote API feature with Philips Hue #826

MarcusBluestein opened this issue Jul 27, 2023 · 8 comments

Comments

@MarcusBluestein
Copy link

I am trying to run PresenceLight in a cloud virtual machine and have it control the lights in my home office. I am successful clicking the "Login to Hue Cloud" button, but nothing happens when I press either "Get Hue Lights" or "Get Hue Groups" buttons. I see the errors below in the logs. Is this a bug or am I doing something wrong?

{"Timestamp":"2023-07-27T08:00:57.8067245-04:00","Level":"Error","MessageTemplate":"Error Occured Processing Access Token for Remote Bridge - RemoteHueService:GetAccessToken Line: 109","Exception":"System.UnauthorizedAccessException: Access to the path 'C:\Program Files\WindowsApps\37828IsaacLevin.197278F15330A_5.6.11.0_x64__zfcjmmeb3zeaa\PresenceLight\huetoken.cache' is denied.\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)\r\n at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)\r\n at System.IO.File.WriteToFileAsync(String path, FileMode mode, String contents, Encoding encoding, CancellationToken cancellationToken)\r\n at PresenceLight.Core.RemoteHueService.GetAccessToken()","Properties":{"SourceContext":"PresenceLight.Core.RemoteHueService","LineNumber":109,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\PresenceLight.Core\\Lights\\RemoteHueServices\\RemoteHueService.cs","MemberName":"GetAccessToken","Application":"PresenceLight"}} {"Timestamp":"2023-07-27T08:00:57.8269236-04:00","Level":"Error","MessageTemplate":"Error Occured Registering Remote Bridge - RemoteHueService:RegisterBridge Line: 182","Exception":"System.UnauthorizedAccessException: Access to the path 'C:\\Program Files\\WindowsApps\\37828IsaacLevin.197278F15330A_5.6.11.0_x64__zfcjmmeb3zeaa\\PresenceLight\\huetoken.cache' is denied.\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)\r\n at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)\r\n at System.IO.File.WriteToFileAsync(String path, FileMode mode, String contents, Encoding encoding, CancellationToken cancellationToken)\r\n at PresenceLight.Core.RemoteHueService.GetAccessToken()\r\n at PresenceLight.Core.RemoteHueService.RegisterBridge()","Properties":{"SourceContext":"PresenceLight.Core.RemoteHueService","LineNumber":182,"FilePath":"D:\a\presencelight\presencelight\src\PresenceLight.Core\Lights\RemoteHueServices\RemoteHueService.cs","MemberName":"RegisterBridge","Application":"PresenceLight"}}
{"Timestamp":"2023-07-27T08:00:57.8292437-04:00","Level":"Error","MessageTemplate":"Error Occured Getting Cloud Hue Api Key","Exception":"System.UnauthorizedAccessException: Access to the path 'C:\Program Files\WindowsApps\37828IsaacLevin.197278F15330A_5.6.11.0_x64__zfcjmmeb3zeaa\PresenceLight\huetoken.cache' is denied.\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)\r\n at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)\r\n at System.IO.File.WriteToFileAsync(String path, FileMode mode, String contents, Encoding encoding, CancellationToken cancellationToken)\r\n at PresenceLight.Core.RemoteHueService.GetAccessToken()\r\n at PresenceLight.Core.RemoteHueService.RegisterBridge()\r\n at PresenceLight.Core.RemoteHueServices.RegisterBridgeHandler.Handle(RegisterBridgeCommand command, CancellationToken cancellationToken)\r\n at PresenceLight.Razor.Pages.HueSetup.LoginRemoteApi()","Properties":{"SourceContext":"PresenceLight.Razor.Pages.HueSetup","Application":"PresenceLight"}}

@isaacrlevin
Copy link
Owner

@MarcusBluestein are you still having this issue?

@MarcusBluestein
Copy link
Author

MarcusBluestein commented Jan 17, 2024 via email

@MarcusBluestein
Copy link
Author

I made sure I was on the latest version (5.6.120) and tried again. Still not working. I clicked the button to login to Hue Cloud, logged in, it said to go back to the application and nothing happens. I can click the Get Hue Lights and Get Hue Groups buttons, but nothing happens.

image

@isaacrlevin
Copy link
Owner

Can you try the nightly version? I made some changes and published a new version

@MarcusBluestein
Copy link
Author

Nothing seemed different after I installed the nightly version. Here are the logs:

{"Timestamp":"2024-01-18T06:51:46.6774570-05:00","Level":"Information","MessageTemplate":"Load Settings Initialized - MainWindow.xaml:LoadSettings Line: 127","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":127,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"LoadSettings","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:51:47.6689257-05:00","Level":"Information","MessageTemplate":"Load Settings Successfull - MainWindow.xaml:LoadSettings Line: 137","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":137,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"LoadSettings","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:51:47.7152288-05:00","Level":"Information","MessageTemplate":"Light Mode Set: Graph - MainWindow.xaml:CallGraph Line: 180","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":180,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"CallGraph","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:51:48.7528540-05:00","Level":"Information","MessageTemplate":"Light Mode: Graph","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.Index","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:07.4627133-05:00","Level":"Information","MessageTemplate":"Getting Graph Data: Profile, Image, Presence - GraphWrapper:GetBatchContent Line: 96","Properties":{"SourceContext":"PresenceLight.Core.GraphWrapper","LineNumber":96,"FilePath":"D:\a\presencelight\presencelight\src\PresenceLight.Core\GraphServices\GraphWrapper.cs","MemberName":"GetBatchContent","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:12.9145627-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:18.0714901-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:23.2296365-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:24.0234228-05:00","Level":"Information","MessageTemplate":"Cloud Hue Login Initialized","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.HueSetup","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:28.3184166-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:31.0054862-05:00","Level":"Error","MessageTemplate":"Error Occurred Processing Access Token for Remote Bridge - RemoteHueService:GetAccessToken Line: 427","Exception":"System.UnauthorizedAccessException: Access to the path 'C:\Program Files\WindowsApps\37828IsaacLevin.197278F15330A.Nightly_5.7.1.0_x64__jvewcxq8vj8qt\PresenceLight\huetoken.cache' is denied.\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)\r\n at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)\r\n at System.IO.File.WriteToFileAsync(String path, FileMode mode, String contents, Encoding encoding, CancellationToken cancellationToken)\r\n at PresenceLight.Core.RemoteHueService.GetAccessToken() in D:\\a\\presencelight\\presencelight\\src\\PresenceLight.Core\\Lights\\RemoteHueServices\\RemoteHueService.cs:line 420","Properties":{"SourceContext":"PresenceLight.Core.RemoteHueService","LineNumber":427,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\PresenceLight.Core\\Lights\\RemoteHueServices\\RemoteHueService.cs","MemberName":"GetAccessToken","Application":"PresenceLight"}} {"Timestamp":"2024-01-18T06:52:31.0294973-05:00","Level":"Error","MessageTemplate":"Error Occurred Registering Remote Bridge - RemoteHueService:RegisterBridge Line: 145","Exception":"System.UnauthorizedAccessException: Access to the path 'C:\\Program Files\\WindowsApps\\37828IsaacLevin.197278F15330A.Nightly_5.7.1.0_x64__jvewcxq8vj8qt\\PresenceLight\\huetoken.cache' is denied.\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)\r\n at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)\r\n at System.IO.File.WriteToFileAsync(String path, FileMode mode, String contents, Encoding encoding, CancellationToken cancellationToken)\r\n at PresenceLight.Core.RemoteHueService.GetAccessToken() in D:\a\presencelight\presencelight\src\PresenceLight.Core\Lights\RemoteHueServices\RemoteHueService.cs:line 420\r\n at PresenceLight.Core.RemoteHueService.RegisterBridge() in D:\a\presencelight\presencelight\src\PresenceLight.Core\Lights\RemoteHueServices\RemoteHueService.cs:line 109","Properties":{"SourceContext":"PresenceLight.Core.RemoteHueService","LineNumber":145,"FilePath":"D:\a\presencelight\presencelight\src\PresenceLight.Core\Lights\RemoteHueServices\RemoteHueService.cs","MemberName":"RegisterBridge","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:31.0317867-05:00","Level":"Error","MessageTemplate":"Error Occurred Getting Cloud Hue Api Key","Exception":"System.UnauthorizedAccessException: Access to the path 'C:\Program Files\WindowsApps\37828IsaacLevin.197278F15330A.Nightly_5.7.1.0_x64__jvewcxq8vj8qt\PresenceLight\huetoken.cache' is denied.\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)\r\n at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)\r\n at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)\r\n at System.IO.File.WriteToFileAsync(String path, FileMode mode, String contents, Encoding encoding, CancellationToken cancellationToken)\r\n at PresenceLight.Core.RemoteHueService.GetAccessToken() in D:\a\presencelight\presencelight\src\PresenceLight.Core\Lights\RemoteHueServices\RemoteHueService.cs:line 420\r\n at PresenceLight.Core.RemoteHueService.RegisterBridge() in D:\a\presencelight\presencelight\src\PresenceLight.Core\Lights\RemoteHueServices\RemoteHueService.cs:line 109\r\n at PresenceLight.Core.RemoteHueServices.RegisterBridgeHandler.Handle(RegisterBridgeCommand command, CancellationToken cancellationToken) in D:\a\presencelight\presencelight\src\PresenceLight.Core\Lights\RemoteHueServices\RegisterBridge\RegisterBridgeHandler.cs:line 18\r\n at PresenceLight.Razor.Components.Pages.HueSetup.LoginRemoteApi() in D:\a\presencelight\presencelight\src\PresenceLight.Razor\Components\Pages\HueSetup.razor:line 179","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.HueSetup","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:33.4801736-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:38.0689904-05:00","Level":"Information","MessageTemplate":"Get Hue Lights Initialized","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.HueSetup","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:38.5123308-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:39.5623692-05:00","Level":"Information","MessageTemplate":"Get Hue Groups Initialized","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.HueSetup","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:41.9404113-05:00","Level":"Information","MessageTemplate":"Settings Saved from Hue Page","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.HueSetup","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:42.8109593-05:00","Level":"Information","MessageTemplate":"Get Hue Lights Initialized","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.HueSetup","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:43.3147324-05:00","Level":"Information","MessageTemplate":"Get Hue Groups Initialized","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.HueSetup","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:43.6746992-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:48.8240202-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:53.9128975-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}
{"Timestamp":"2024-01-18T06:52:58.9483887-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}

@isaacrlevin
Copy link
Owner

ok try now :)

@isaacrlevin isaacrlevin reopened this Jan 18, 2024
@MarcusBluestein
Copy link
Author

MarcusBluestein commented Jan 19, 2024 via email

@isaacrlevin
Copy link
Owner

Great, I will close when it gets pushed to the Windows Store

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants