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

Cannot find GH repo provider if correct credentials are not set as first "Server" in global config #198

Closed
jpfeuffer opened this issue Feb 7, 2017 · 42 comments · Fixed by #199
Milestone

Comments

@jpfeuffer
Copy link

jpfeuffer commented Feb 7, 2017

I could reproduce this behaviour multiple times now:
When you have multiple credentials listed under your global Jenkins settings for "GitHub Server",
the plugin seems to only try the first appearing one. This means if this first user does not have enough rights for all the projects/jobs managed with the plugin, the corresponding jobs fail during configuration time with the following log:

javax.servlet.ServletException: java.lang.IllegalStateException: Can't get repo provider for GH repo test_hooks for %s
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:236)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:236)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:219)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:196)
	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85)
	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:110)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:80)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Can't get repo provider for GH repo test_hooks for %s
	at com.google.common.base.Preconditions.checkState(Preconditions.java:172)
	at com.github.kostyasha.github.integration.generic.GitHubTrigger.getRepoProvider(GitHubTrigger.java:140)
	at org.jenkinsci.plugins.github.pullrequest.GitHubPRTrigger.start(GitHubPRTrigger.java:163)
	at org.jenkinsci.plugins.github.pullrequest.GitHubPRTrigger.start(GitHubPRTrigger.java:86)
	at hudson.model.AbstractProject.submit(AbstractProject.java:1884)
	at hudson.model.Project.submit(Project.java:230)
	at hudson.model.Job.doConfigSubmit(Job.java:1246)
	at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:796)
	at sun.reflect.GeneratedMethodAccessor841.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:335)
	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:52)
	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:175)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:108)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	... 67 more

I can reproduce this by just switching places in the global settings, hitting apply, going back to the job and try to hit apply again.

@KostyaSha
Copy link
Owner

Interesting... During configuration it tries to register hooks, that requires working connection. Search is accumulated in

Optional<GitHub> client = from(GitHubPlugin.configuration().findGithubConfig(withHost(repoFullName.getHost())))

I think you have good idea to iterate over existing and that can limit security to only matching tokens.

cc @atanasenko

@jpfeuffer
Copy link
Author

Wow, thanks for the quick reply. Let me know if you need any more logs, although you already seems to have found the problem. In our case we handle multiple projects and would like to have separate users handling these repositories.

@KostyaSha
Copy link
Owner

KostyaSha commented Feb 7, 2017

The problem that even if you have token you can't really check that it has right scopes or it not blocked by application approval :( Plus github-api doesn't expose headers hub4j/github-api#303
So only .isAdmin() could be checked that makes only small chance to be true. Btw it easily possible to make local to job token configuration.
Internally we have custom implementation that do additional checks around github-api, but they are not ready for opensource.

@stephenc so your ghsource is also affected and limited if you are really using it.

@atanasenko
Copy link
Collaborator

One could check for repo.hasAdminAccess() and if it's there, but the actual action fails, then that token doesn't have correct scopes.
But it means that the iteration over multiple tokens has to happen when the actual action on the repos is performed, which could be a pain to introduce to all actions.

@jpfeuffer
Copy link
Author

jpfeuffer commented Feb 8, 2017

Another option would be to let the user choose from those credentials in the job. Then the user has to make sure that he chooses one with the correct rights/permissions.
Did you consider this, yet? I don't know much about the internals, though.

@KostyaSha
Copy link
Owner

@jpfeuffer both things could be tried

@jpfeuffer
Copy link
Author

Hmm unfortunately the same error appears (but with your changed message, so the update of the plugin definitely worked):
Caused by: java.lang.IllegalStateException: Can't find repo provider for test_openms_hooks at com.google.common.base.Preconditions.checkState(Preconditions.java:172) at com.github.kostyasha.github.integration.generic.GitHubTrigger.getRepoProvider(GitHubTrigger.java:140) at org.jenkinsci.plugins.github.pullrequest.GitHubPRTrigger.start(GitHubPRTrigger.java:163) at org.jenkinsci.plugins.github.pullrequest.GitHubPRTrigger.start(GitHubPRTrigger.java:86)

When looking at the stack trace, could it be that the filtering has to happen earlier, somewhere here maybe?
https://github.com/KostyaSha/github-integration-plugin/blob/resolver/github-pullrequest-plugin/src/main/java/com/github/kostyasha/github/integration/generic/repoprovider/GitHubPluginRepoProvider.java#L108

@KostyaSha
Copy link
Owner

You are correct

@jpfeuffer
Copy link
Author

Hmm.. still does not work? Same exception. But it still works when a correct credential is first in the configuration.

To narrow it down a bit, I get this Logger error:
Can't find repo provider for GitHubBranchTrigger job: test_hooks
If you include more Logs, I could try again.

Seems like checking for admin rights of a specific user in a repo is really not so easy with the github API. Maybe hasAdminRights is for getting the default permissions of the repo?

@KostyaSha
Copy link
Owner

Does it have managehooks checkbox enabled?

@jpfeuffer
Copy link
Author

Yes the checkbox was enabled in both API credentials.

@KostyaSha
Copy link
Owner

Do you have manageHooks checkbox for all repos?

@jpfeuffer
Copy link
Author

Yes. We have one "hook managing" credential with admin access for each of the two projects hosted on GitHub.
Can you explain what this checkbox does and when it should be enabled?

@KostyaSha
Copy link
Owner

github-plugin wasn't designed to have multiple logins for one server cc @lanwen and plugin do 2 different calls to check whether gtihubserverconfiguration from global config allows to manage hooks. I will try one more thing and reply.

@jpfeuffer
Copy link
Author

I see, unfortunately that makes it hard when used with public repositories on the same official GitHub server (all specified with api.github.com).
I am not sure about how much work another selection dialog in an advanced part of the job configuration would be but this might actually be a very flexible approach then.
I am excited about your upcoming solution, thanks.

@lanwen
Copy link
Contributor

lanwen commented Feb 20, 2017

Needed to patch github-api lib to expose token scopes - github api itself provides enough information about each user rights.

@KostyaSha
Copy link
Owner

@lanwen
Copy link
Contributor

lanwen commented Feb 20, 2017

looks ugly, but better than nothing

@KostyaSha
Copy link
Owner

I also found that it possible report issue as Action that will be displayed on Job page, i can patch Trigger code, but hook registration goes to queue that has no item context and ability to catch and report it.

@KostyaSha
Copy link
Owner

KostyaSha commented Feb 22, 2017

Added reporting to UI + found bug with trigger mode check.
screenshot 2017-02-22 04 33 34

@KostyaSha
Copy link
Owner

From what i see repoprovider didn't work for PR trigger. @jpfeuffer could you try new build?

@jpfeuffer
Copy link
Author

jpfeuffer commented Feb 23, 2017

Your new Warning UI element shows me this:

GitHub Pull Requests Trigger Errors
1 GitHub Repo Provider Error
Can't find repo provider for test_hooks.
All providers failed: [java.lang.IllegalArgumentException: byteString == null]

@KostyaSha
Copy link
Owner

[java.lang.IllegalArgumentException: byteString == null]

wtf....

@KostyaSha
Copy link
Owner

Will add more logging

@KostyaSha
Copy link
Owner

KostyaSha commented Feb 23, 2017

Added, please try now and post debug error. I guess hooks registration wouldn't work because it offloaded to github-plugin functionality

@jpfeuffer
Copy link
Author

Here it is:

Provider failed:
java.lang.IllegalArgumentException: byteString == null
	at okio.Buffer.write(Buffer.java:787)
	at com.squareup.okhttp.Cache$Entry.readCertificateList(Cache.java:628)
	at com.squareup.okhttp.Cache$Entry.<init>(Cache.java:555)
	at com.squareup.okhttp.Cache.get(Cache.java:194)
	at com.squareup.okhttp.Cache$1.get(Cache.java:139)
	at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:207)
	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:450)
	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:399)
	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getHeaders(HttpURLConnectionImpl.java:155)
	at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:199)
	at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getHeaderField(DelegatingHttpsURLConnection.java:190)
	at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getHeaderField(HttpsURLConnectionImpl.java:25)
	at org.kohsuke.github.Requester.noteRateLimit(Requester.java:336)
	at org.kohsuke.github.Requester._to(Requester.java:286)
	at org.kohsuke.github.Requester.to(Requester.java:225)
	at org.kohsuke.github.GitHub.getMyself(GitHub.java:362)
	at org.kohsuke.github.GitHub.<init>(GitHub.java:154)
	at org.kohsuke.github.GitHubBuilder.build(GitHubBuilder.java:201)
	at org.jenkinsci.plugins.github.internal.GitHubLoginFunction.applyNullSafe(GitHubLoginFunction.java:73)
	at org.jenkinsci.plugins.github.internal.GitHubLoginFunction.applyNullSafe(GitHubLoginFunction.java:46)
	at org.jenkinsci.plugins.github.util.misc.NullSafeFunction.apply(NullSafeFunction.java:18)
	at org.jenkinsci.plugins.github.config.GitHubServerConfig$ClientCacheFunction.applyNullSafe(GitHubServerConfig.java:351)
	at org.jenkinsci.plugins.github.config.GitHubServerConfig$ClientCacheFunction.applyNullSafe(GitHubServerConfig.java:347)
	at org.jenkinsci.plugins.github.util.misc.NullSafeFunction.apply(NullSafeFunction.java:18)
	at com.google.common.collect.Iterators$8.next(Iterators.java:812)
	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:648)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:647)
	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
	at com.google.common.collect.Iterators.tryFind(Iterators.java:757)
	at com.google.common.collect.Iterables.tryFind(Iterables.java:671)
	at org.jenkinsci.plugins.github.util.FluentIterableWrapper.firstMatch(FluentIterableWrapper.java:126)
	at com.github.kostyasha.github.integration.generic.repoprovider.GitHubPluginRepoProvider.getGitHub(GitHubPluginRepoProvider.java:79)
	at com.github.kostyasha.github.integration.generic.repoprovider.GitHubPluginRepoProvider.getGHRepository(GitHubPluginRepoProvider.java:113)
	at com.github.kostyasha.github.integration.generic.GitHubTrigger.getRepoProvider(GitHubTrigger.java:138)
	at com.github.kostyasha.github.integration.generic.GitHubTrigger.getRemoteRepository(GitHubTrigger.java:167)
	at org.jenkinsci.plugins.github.pullrequest.GitHubPRRepositoryFactory.forProject(GitHubPRRepositoryFactory.java:76)
	at org.jenkinsci.plugins.github.pullrequest.GitHubPRRepositoryFactory.createFor(GitHubPRRepositoryFactory.java:40)
	at org.jenkinsci.plugins.github.pullrequest.GitHubPRRepositoryFactory.createFor(GitHubPRRepositoryFactory.java:31)

@jpfeuffer
Copy link
Author

Seems like you know this error ;) Should I try clearing the cache like here? hub4j/github-api#265

@KostyaSha
Copy link
Owner

please disable cache for now

@KostyaSha
Copy link
Owner

Well, jenkins and github-api stuck on ancient okhttp version. Reporting something to them makes no sense.

@jpfeuffer
Copy link
Author

Where exactly do I disable it? In the job config under your experimental setting or somewhere in the Jenkins config for the github-plugin?

@KostyaSha
Copy link
Owner

KostyaSha commented Feb 23, 2017

Global jenkins config. GithubServers, maybe in advanced. Set cache size to 0 (belong to github-plugin).

@jpfeuffer
Copy link
Author

jpfeuffer commented Feb 23, 2017

It works! Testing actual execution now.

@KostyaSha
Copy link
Owner

perfect, merging and running release. Anything else could be tuned later.

@jpfeuffer
Copy link
Author

Yes, also the trigger works. Thanks a lot again.

@KostyaSha KostyaSha added this to the 0.1.0-rc21 milestone Feb 23, 2017
@KostyaSha
Copy link
Owner

released, should be shortly available in jucies

@ghost
Copy link

ghost commented Apr 19, 2017

I set the cache size to 0 ... and I have a token with admin rights that works ... To prove it when I test it from github config page I get the message :

Credentials verified for user xyzzy-jenkins, rate limit: 4783

However when I run my job ::

java.lang.IllegalStateException: Can't find repo provider for default
at com.google.common.base.Preconditions.checkState(Preconditions.java:172)
at com.github.kostyasha.github.integration.generic.GitHubTrigger.getRepoProvider(GitHubTrigger.java:159)
at com.github.kostyasha.github.integration.branch.GitHubBranchTrigger.start(GitHubBranchTrigger.java:117)
at com.github.kostyasha.github.integration.branch.GitHubBranchTrigger.start(GitHubBranchTrigger.java:57)
at org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty.startTriggers(PipelineTriggersJobProperty.java:103)
at org.jenkinsci.plugins.workflow.job.WorkflowJob.addProperty(WorkflowJob.java:204)
at org.jenkinsci.plugins.workflow.job.WorkflowJob.setTriggers(WorkflowJob.java:473)
at org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad(WorkflowJob.java:144)
at hudson.model.Items.load(Items.java:372)
at hudson.model.ItemGroupMixIn$4.call(ItemGroupMixIn.java:277)
at hudson.model.ItemGroupMixIn$4.call(ItemGroupMixIn.java:275)
at hudson.model.Items.whileUpdatingByXml(Items.java:135)
at hudson.model.ItemGroupMixIn.createProjectFromXML(ItemGroupMixIn.java:275)
at com.cloudbees.hudson.plugins.folder.Folder.createProjectFromXML(Folder.java:247)
at javaposse.jobdsl.plugin.JenkinsJobManagement.createNewItem(JenkinsJobManagement.java:571)
at javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateConfig(JenkinsJobManagement.java:147)
at javaposse.jobdsl.dsl.JobManagement$createOrUpdateConfig$3.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at javaposse.jobdsl.dsl.JobManagement$createOrUpdateConfig$3.call(Unknown Source)
at javaposse.jobdsl.plugin.InterruptibleJobManagement.createOrUpdateConfig(InterruptibleJobManagement.groovy:37)
at javaposse.jobdsl.dsl.JobManagement$createOrUpdateConfig$3.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at javaposse.jobdsl.dsl.JobManagement$createOrUpdateConfig$3.call(Unknown Source)
at javaposse.jobdsl.dsl.AbstractDslScriptLoader$_extractGeneratedJobs_closure4.doCall(AbstractDslScriptLoader.groovy:197)
at sun.reflect.GeneratedMethodAccessor1996.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at groovy.lang.Closure.call(Closure.java:414)
at groovy.lang.Closure.call(Closure.java:430)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at javaposse.jobdsl.dsl.AbstractDslScriptLoader.extractGeneratedJobs(AbstractDslScriptLoader.groovy:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
at javaposse.jobdsl.dsl.AbstractDslScriptLoader.extractGeneratedItems(AbstractDslScriptLoader.groovy:177)
at javaposse.jobdsl.plugin.JenkinsDslScriptLoader.extractGeneratedItems(JenkinsDslScriptLoader.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
at javaposse.jobdsl.dsl.AbstractDslScriptLoader$_runScripts_closure1.doCall(AbstractDslScriptLoader.groovy:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
at groovy.lang.Closure.call(Closure.java:414)
at groovy.lang.Closure.call(Closure.java:430)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2068)
at org.codehaus.groovy.runtime.dgm$164.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at javaposse.jobdsl.dsl.AbstractDslScriptLoader.runScripts(AbstractDslScriptLoader.groovy:46)
at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:287)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:78)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:65)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
at hudson.security.ACL.impersonate(ACL.java:260)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

I'm running GitHub Pull Request Builder 1.36.2
Any ideas ???

@prachikhadke
Copy link

@MichaelGreco did you find a solution to your issue above? I'm running into the same problem. And I've set the cache to 0.

@szeitlin
Copy link

same. on GitHub plugin 1.29.2

@ElijahLynn
Copy link

I had this same issue just now, 1.42.0. Under "experimental" we had it set to ADMIN and I think the user that was attached to the token did have ADMIN at one point and then someone in the org took away admin for that account. I just changed it to PULL and it started working again.
image

@kjartansible
Copy link

Same - 1.42.0
I have not been able to get it to work again though - yet.

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

Successfully merging a pull request may close this issue.

8 participants