grundic / teamcity-avatar

Plugin for displaying user avatars in Teamcity
13 stars 4 forks source link

Gravatar ist served using http if TeamCity is behind https proxy #3

Closed agross closed 9 years ago

agross commented 9 years ago

I use nginx to secure my TeamCity with SSL. The Gravatar images are loaded via http, which leads to mixed content and a warning when you click the https icon left of the address in Chrome.

grundic commented 9 years ago

Hello, @agross. Thank you for report. Will investigate it in the spare time.

agross commented 9 years ago

Thanks!

grundic commented 9 years ago

@agross, it's friday evening so don't expect perfect fix :) But you can check and verify it. Have a good weekends!

agross commented 9 years ago

Hm, after uploading the new zip and removing 1.1 and a service restart there's no longer the Avatar section in the Administration. The plugin is listed in Plugins List as version 1.2 in <TeamCity Data Directory>/.unpacked/avatar-1.2, though. And there are no avatar images next to user names, either. Any ideas? I'm using the latest 9.1 EAP.

I'd say using protocol-relative URLs (//gravatar.com/foo/bar) might have been the easier solution - the browser decides what to use depending on the protocol used to fetch the page.

agross commented 9 years ago

This happens at server startup (now on TeamCity RC):

[2015-07-11 10:27:47,090]  ERROR - gins.spring.SpringPluginLoader - Failed to initialize spring context for plugin teamcity-avatar
java.lang.NoClassDefFoundError: jetbrains/buildServer/serverSide/impl/ServerSettings
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
        at java.lang.Class.getDeclaredConstructors(Unknown Source)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:234)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1041)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1021)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:951)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:862)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:811)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:739)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:185)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
        at jetbrains.buildServer.plugins.spring.SpringPluginLoader.pluginClassesLoaded(SpringPluginLoader.java:95)
        at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:120)
        at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:67)
        at com.sun.proxy.$Proxy16.pluginClassesLoaded(Unknown Source)
        at jetbrains.buildServer.plugins.PluginManagerImpl$2.visitPlugin(PluginManagerImpl.java:137)
        at jetbrains.buildServer.plugins.PluginsCollection.foreachLoadedPlugins(PluginsCollection.java:222)
        at jetbrains.buildServer.plugins.PluginManagerImpl.firePluginClassesLoaded(PluginManagerImpl.java:135)
        at jetbrains.buildServer.plugins.PluginManagerImpl.loadPlugins(PluginManagerImpl.java:81)
        at jetbrains.buildServer.web.plugins.PluginManagerConfigurator.initializePlugins(PluginManagerConfigurator.java:1)
        at jetbrains.buildServer.web.impl.BuildServerConfigurator.loadConfiguration(BuildServerConfigurator.java:49)
        at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet$WebApplicationCreatorAndDestroyer.createApplication(TeamCityDispatcherServlet.java:11)
        at jetbrains.buildServer.maintenance.StartupProcessor.doApplicationStarting(StartupProcessor.java:583)
        at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStage(StartupProcessor.java:86)
        at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStageSafe(StartupProcessor.java:384)
        at jetbrains.buildServer.maintenance.StartupProcessor.processTeamCityLifecycle(StartupProcessor.java:506)
        at jetbrains.buildServer.maintenance.StartupProcessor.access$000(StartupProcessor.java:442)
        at jetbrains.buildServer.maintenance.StartupProcessor$1.run(StartupProcessor.java)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Class 'jetbrains.buildServer.serverSide.impl.ServerSettings' was not found
        at jetbrains.buildServer.plugins.classLoaders.TeamCityClassLoader.doLoadClass(TeamCityClassLoader.java:85)
        at jetbrains.buildServer.plugins.classLoaders.TeamCityClassLoader.loadClass(TeamCityClassLoader.java:40)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 50 more