Soloplan / whatson

Build status monitoring for Windows with support for Jenkins, Travis-CI, CC.NET (alternative to CCTray)
MIT License
19 stars 4 forks source link

Can't add project/server #81

Closed thoni56 closed 3 years ago

thoni56 commented 3 years ago

I downloaded the 1.0 zip and unpacked it. Running the .exe presents a nice GUI, but it seems impossible to add a server.

I have tried URL:s to Jenkins servers, Jenkins jobs, Travis and Travis jobs. But it just spins for minutes. Tried both from the "quick add" plus sign on the first screen as well as from the settings.

Is there any configuration that I need to do?

Here's one of the URL:s I tried: https://www.travis-ci.com/github/thoni56/c-xrefactory

krzysztof-lorenc commented 3 years ago

Regarding travis-ci.com, it looks that in order to access API, you need to authenticate and unfortunately, for now we do not support authentication.

We also do not support Travis officially, just Jenkins, there might be differences in the API like urls or response structures, etc.

Is the Jenkins build server that you tried publicly available? If yes, can you share the link to the server/project?

You can also check if the projects are loaded from this example URL: https://builds.apache.org/job/ActiveMQ That is Jenkins build server from Apache Foundation. I don't recommend to add projects permanently to WhatsON because they have limit for requests and they are blocking IPs which generates too much requests. Just checking if the project wizard can read projects list is enough.

thoni56 commented 3 years ago

The Apache URL does not load either. Here's a screenshot of what it gets stuck on on my Windows 10 machine:

image

krzysztof-lorenc commented 3 years ago

Is it possible to share the log file? The log can be found in directory which is shown in the About screen. Maybe the cause can be found there. ql0r6W9Z42

thoni56 commented 3 years ago

Right. So there was something interesting in the log:

2021-07-22 15:09:06.9065 Error Soloplan.WhatsON.Composition.PluginManager+<FindAllPlugins>d__16.MoveNext:200  - System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\Thomas\whatson-1.0.0\Soloplan.WhatsON.Jenkins.GUI.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\Thomas\whatson-1.0.0\Soloplan.WhatsON.Jenkins.GUI.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Soloplan.WhatsON.Composition.PluginManager.<FindAllPlugins>d__16.MoveNext() in C:\jenkins\workspace\tools_whatson_master\src\Soloplan.WhatsON\Composition\PluginManager.cs:line 194

                     System.IO.FileLoadException
Could not load file or assembly 'file:///C:\Users\Thomas\whatson-1.0.0\Soloplan.WhatsON.Jenkins.GUI.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\Thomas\whatson-1.0.0\Soloplan.WhatsON.Jenkins.GUI.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\Thomas\whatson-1.0.0\Soloplan.WhatsON.Jenkins.GUI.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Soloplan.WhatsON.Composition.PluginManager.<FindAllPlugins>d__16.MoveNext() in C:\jenkins\workspace\tools_whatson_master\src\Soloplan.WhatsON\Composition\PluginManager.cs:line 194

   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Soloplan.WhatsON.Composition.PluginManager.<FindAllPlugins>d__16.MoveNext() in C:\jenkins\workspace\tools_whatson_master\src\Soloplan.WhatsON\Composition\PluginManager.cs:line 194
System.NotSupportedException
An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
krzysztof-lorenc commented 3 years ago

Thanks for fast answer. Hmm, log says file C:\Users\Thomas\whatson-1.0.0\Soloplan.WhatsON.Jenkins.GUI.dll is not existing.

Can you please check if you have it on you file system, in that location? As I see, this file is available in zip from release 1.0.0: https://github.com/Soloplan/whatson/releases/download/v1.0.0/whatson-1.0.0.zip so, theoretically, if that zip was fully extracted, that file should be on your file system.

Please ignore what was written before in this note. I was able to reproduce that on fresh Windows installation so we will try to find solution for this problem.

krzysztof-lorenc commented 3 years ago

The problem is that files downloaded by Windows are marked as unsafe. That blocks loading of some dlls. The easiest way to overcome this problem is to unblock all the dlls (unfortunately that has to be done one by one) in the installation directory or download the zip with WhatsON again, unblock the zip itself, then extract it. After that, all dlls should be unblocked. See attached screenshot. bSk4pgSfcT Let us know please if this fixed the problem.

We were already thinking about this issue in the past, but solving it requires signing the application what is not yet implemented. Thank you for reporting this issue and for the assistance.

thoni56 commented 3 years ago

Yes, that fixed the problem. (Yet another aspect of DLL-hell...)

Thanks for the support. I will try it out and see what I think.

krzysztof-lorenc commented 3 years ago

Great, thank you for feedback.