ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
36 stars 4 forks source link

issues with lastest EXOv3 module #3409

Closed alexrgreenwood closed 4 months ago

alexrgreenwood commented 4 months ago

Summary of the feedback

as per my previous issue , this doesnt seem to be 100% a PSU problem , i think the EXO module has some flaws running on linux

on attempting PSU (5b6) install though, clicking on one button makes both of them spin, there is no feedback to say it hasnt worked

image


2024-06-18 10:19:55.367 +01:00 [ERR] Error saving module ExchangeOnlineManagement 3.5.1
Microsoft.PowerShell.PSResourceGet.UtilClasses.ResourceNotFoundException: Package(s) 'ExchangeOnlineManagement' could not be installed from repository 'PSGallery'.
2024-06-18 10:19:55.368 +01:00 [ERR] Error saving module ExchangeOnlineManagement 3.5.1
System.Exception: Failed to install module. Package(s) 'ExchangeOnlineManagement' could not be installed from repository 'PSGallery'.
   at Universal.Server.Services.ModuleService.SaveModule(String repository, String name, String version, Boolean prerelease) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\ModuleService.cs:line 256
2024-06-18 10:19:55.374 +01:00 [WRN] Unhandled exception rendering component: Failed to install module. Package(s) 'ExchangeOnlineManagement' could not be installed from repository 'PSGallery'.
System.Exception: Failed to install module. Package(s) 'ExchangeOnlineManagement' could not be installed from repository 'PSGallery'.
   at Universal.Server.Services.ModuleService.SaveModule(String repository, String name, String version, Boolean prerelease) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\ModuleService.cs:line 256
   at PowerShellUniversal.RepositoryModules.SaveModule(Module module) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Pages\Platform\Modules\RepositoryModules.razor:line 54
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at AntDesign.Button.HandleOnClick(MouseEventArgs args)
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
2024-06-18 10:19:55.380 +01:00 [ERR] Unhandled exception in circuit 'gx9g5ZAG968300irYyV4EsAnyB8WB1RBLneaHilTMG4'.
System.Exception: Failed to install module. Package(s) 'ExchangeOnlineManagement' could not be installed from repository 'PSGallery'.
   at Universal.Server.Services.ModuleService.SaveModule(String repository, String name, String version, Boolean prerelease) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\ModuleService.cs:line 256
   at PowerShellUniversal.RepositoryModules.SaveModule(Module module) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Pages\Platform\Modules\RepositoryModules.razor:line 54
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at AntDesign.Button.HandleOnClick(MouseEventArgs args)
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

if i install that version locally then map my local modules folder into the container using a volume then i get this error on server startup


2024-06-18 10:31:59.376 +01:00 [ERR] Failed to read module.
System.IO.FileNotFoundException: Could not find file '/root/.PowerShellUniversal/Repository/Modules/ExchangeOnlineManagement/3.5.1/.\netCore\ExchangeOnlineManagementBeta.psm1'.
File name: '/root/.PowerShellUniversal/Repository/Modules/ExchangeOnlineManagement/3.5.1/.\netCore\ExchangeOnlineManagementBeta.psm1'
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failFor2024-06-18 10:32:11.619 +01:00 [INF] Creating services.
)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.File.AsyncStreamReader(String path, Encoding encoding)
   at System.IO.File.InternalReadAllTextAsync(String path, Encoding encoding, CancellationToken cancellationToken)
   at UniversalAutomation.Services.ModulesConfigurationScript.LoadModule(Runspace runspace, DirectoryInfo directory, String moduleName) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\Configuration\Modules.cs:line 117

same error occurs on version 3.3.0 and 2.0.5 which are all quite old now from the ExchangeOnlineManagement.psd1

image

adamdriscoll commented 4 months ago

I've got this working in the most recent nightly (will be released tonight). More information on the resolution in #3113.