SCM VALIDATE FAILED

62 views
Skip to first unread message

Suthar robert

unread,
Mar 18, 2024, 5:51:49 AMMar 18
to go-cd
Hi all,
I am using a git feature plugin for my works here, for that i need to configure the scm plugin in it. So that i can able to use git feature plugin, i am a facing a problem here which is validate which return without entering the value in the field which is like 

{{ GOINPUTNAME['url'].$error.server }}
like this error for every input field. I don't know how to fix this.

i am using a pluing this one https://github.com/ashwanthkumar/gocd-build-github-pull-requests

Chad Wilson

unread,
Mar 18, 2024, 6:06:18 AMMar 18
to go...@googlegroups.com
It may help if you share screenshots of exactly what you are doing and entering in the fields, as it's a bit difficult to understand what you are seeing?

Can you also share the versions of your GoCD server and plugins, plus which browser you are using?

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/fcdceb39-542b-41bd-ba34-244341f12a56n%40googlegroups.com.

Suthar robert

unread,
Mar 18, 2024, 7:39:26 AMMar 18
to go-cd
Sure here i am using a gocd versoin = 23.3.0, plugins is git featrure plugin which is the link i provide here https://github.com/ashwanthkumar/gocd-build-github-pull-requests

the browser i am using chrome 

when i click a create new pluggable scm, it automatically arises like this, when i enter the url and save it, it still says the validation failed


Here i added the screenshot below for clarification

image.png



Chad Wilson

unread,
Mar 18, 2024, 9:17:46 AMMar 18
to go...@googlegroups.com
Sorry, I don't think the screenshot came through correctly - please try again?

Suthar robert

unread,
Mar 19, 2024, 12:36:57 AMMar 19
to go-cd
image.png
Sorry for That 
Here it is 

Chad Wilson

unread,
Mar 19, 2024, 1:43:05 AMMar 19
to go...@googlegroups.com
I can't replicate this problem, but it looks like something is wrong with the plugin or your browser. Try another browser (Edge, Safari, Firefox) or Chrome Incognito mode (without plugins/extensions) to see if you get the same errors.

If it works in another browser, or without extensions/plugins, you may also want to check your browser debugger javascript console for errors, as this error seems to imply that the admin user interface is not creating the plugin view correctly - this logic is done within the browser with Javascript.

Which version of the plugin did you install? e.g from http://localhost:8153/go/admin/plugins

image.png

-Chad

Suthar robert

unread,
Mar 19, 2024, 1:56:36 AMMar 19
to go-cd
In the same browser when i use localhost gocd server it working fine. The version plugin is 1.4.0, so here the problem when i launched the config gocd which is have own url in it for security purpose. It display like this, whoever visit this url and use this scm plugin it display the error. i need to resolve it 

Chad Wilson

unread,
Mar 19, 2024, 2:08:13 AMMar 19
to go...@googlegroups.com
Version 1.4.0 of the plugin has never been officially released, so I am not sure if that is stable, but I do not get those errors with that version either. Please try and be specific about the version you are using in different environments - do you mean "1.4.0-RC4" from here, or did you build/compile the plugin yourself? Are both your localhost GoCD server and the "real" server the same GoCD version 23.3.0?

I don't understand what you mean by "so here the problem when i launched the config gocd which is have own url in it for security purpose", sorry, so cannot comment on this right now.

Regardless, check the browser console for errors, and check the browser debugger "network" tab to see if requests under the "JS" and "XHR" types are being blocked or failing. Disable the browser cache and do a full reload and check again.

-Chad

Suthar robert

unread,
Mar 19, 2024, 2:14:44 AMMar 19
to go-cd
i check using the inspect, in the response of the network tab it require key and value in it. In a working environment which is local host it has the key and value in it, But in the configured url which i mean i deployed the gocd into the specific domain url in the server, in that environment it didn't have key and value present in it. Also i check the source code of the plugin and check it, in that source code plugin they have scm template html file which show extact like this error in it but they didn't mention clarification about it how to config those 

Chad Wilson

unread,
Mar 19, 2024, 2:36:12 AMMar 19
to go...@googlegroups.com
There is nothing you should need to configure that affects seeing those raw template values like {{ GOINPUTNAME['url'].$error.server }} . You should never see these - it means there is a problem in how your browser is loading the plugin view and displaying plugin responses to you. We need to find what is breaking the plugin view and fix that. When the plugin view is working correctly you should see just errors like this:

image.png
I only have another couple of suggestions
  • Make sure you don't have multiple versions of the plugin installed in the server's plugin directory. If you remove duplicate plugin versions, restart the server afterwards and see if it's different.
  • If you are already in the network tab, perhaps you can share the JSON response from /go/api/admin/plugin_info?type=scm when you click on the Admin > Pluggable SCMs tab (in the environment that is broken). There is nothing sensitive in that API response.
Something seems to be wrong with either the plugin, the way you installed it, but without looking at the browser console and my earlier questions we would just be guessing where the problem is.

-Chad

Suthar robert

unread,
Mar 19, 2024, 3:11:39 AMMar 19
to go-cd
Okay i attach the response from the json file when i try to save the plugin details and you can see the configuration is empty it didn't have the key value in it


{
  "message" : "Save failed. Validation failed.",
  "data" : {
    "id" : "idd",
    "name" : "hdds",
    "auto_update" : true,
    "origin" : {
      "type" : "gocd"
    },
    "plugin_metadata" : {
      "id" : "git.fb",
      "version" : "1"
    },
    "configuration" : [ ],
    "errors" : {
      "url" : [ "URL is a required field" ]
    }
  }
}



this is the response even when i enter the url and cick save button in it. i attach the screenshot also 


image.png

Chad Wilson

unread,
Mar 19, 2024, 3:28:39 AMMar 19
to go...@googlegroups.com
Yes, the browser is not sending the correct data - probably for the same reason I talked about. If the plugin, browser or server is not working correctly, nothing you enter will work.

Please share the response from /go/api/admin/plugin_info?type=scm as I requested below.

Message has been deleted

Chad Wilson

unread,
Mar 19, 2024, 5:29:30 AMMar 19
to go...@googlegroups.com
That looks normal to me.

I don't know - my only other suggestions to narrow it down are the same as earlier:
  • check the browser console for Javascript errors when loading these pages
  • check the browser debugger "network" tab to see if requests under the "JS" and "XHR" types are being blocked or failing (403,433/503 etc). 
  • disable the browser cache and do a full reload and check the console and network tab again.
  • try a different browser or Incognito mode (to rule out a corrupt browser cache)
Do you use a CDN, load balancer or reverse proxy (for HTTPS) in front of your "real" GoCD server which can modify requests/responses? If so, I would expect to see something wrong in the browser console or the network tab.

Perhaps someone else has some idea? Personally I cannot replicate on Chrome 122.0.6261.129, Safari 17.4 or Firefox 123.0.1 which makes me think it is something particular to your server environment or your local machine/browser.

-Chad

On Tue, Mar 19, 2024 at 4:52 PM Suthar robert <suthar...@gmail.com> wrote:
{
"_links" : {
"self" : {
},
"doc" : {
},
"find" : {
}
},
"_embedded" : {
"plugin_info" : [ {
"_links" : {
"self" : {
},
"doc" : {
},
"find" : {
}
},
"id" : "git.fb",
"status" : {
"state" : "active"
},
"plugin_file_location" : "/var/lib/go-server/plugins/external/git-fb-poller-1.4.0-RC4.jar",
"bundled_plugin" : false,
"about" : {
"name" : "Git Feature Branch plugin",
"version" : "1.4.0-RC4",
"target_go_version" : "15.1.0",
"description" : "Provides ability to do feature branch builds for Git repository",
"target_operating_systems" : [ ],
"vendor" : {
"name" : "Srinivas",
}
},
"extensions" : [ {
"type" : "scm",
"display_name" : "Git Feature Branch",
"scm_settings" : {
"configurations" : [ {
"key" : "url",
"metadata" : {
"secure" : false,
"required" : true,
"part_of_identity" : true
}
}, {
"key" : "username",
"metadata" : {
"secure" : false,
"required" : false,
"part_of_identity" : false
}
}, {
"key" : "password",
"metadata" : {
"secure" : true,
"required" : false,
"part_of_identity" : false
}
}, {
"key" : "defaultBranch",
"metadata" : {
"secure" : false,
"required" : false,
"part_of_identity" : false
}
}, {
"key" : "branchwhitelist",
"metadata" : {
"secure" : false,
"required" : false,
"part_of_identity" : true
}
}, {
"key" : "shallowClone",
"metadata" : {
"secure" : false,
"required" : false,
"part_of_identity" : false
}
}, {
"key" : "branchblacklist",
"metadata" : {
"secure" : false,
"required" : false,
"part_of_identity" : true
}
} ],
"view" : {
"template" : "<div class=\"form_item_block\">\n <label>URL:<span class=\"asterisk\">*</span></label>\n <input type=\"text\" ng-model=\"url\" ng-required=\"true\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[url].$error.server\">{{ GOINPUTNAME[url].$error.server }}</span>\n</div>\n<div class=\"form_item_block\">\n <label>Username:</label>\n <input type=\"text\" autocomplete=\"new-password\" ng-model=\"username\" ng-required=\"false\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[username].$error.server\">{{ GOINPUTNAME[username].$error.server }}</span>\n</div>\n<div class=\"form_item_block\">\n <label>Password:</label>\n <input type=\"password\" autocomplete=\"new-password\" ng-model=\"password\" ng-required=\"false\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[password].$error.server\">{{ GOINPUTNAME[password].$error.server }}</span>\n</div>\n<div class=\"form_item_block\">\n <label>Default Branch:</label>\n <input type=\"text\" ng-model=\"defaultBranch\" ng-required=\"false\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[defaultBranch].$error.server\">{{ GOINPUTNAME[defaultBranch].$error.server }}</span>\n</div>\n<div class=\"form_item_block\">\n <label>Whitelisted branches:</label>\n <input type=\"text\" ng-model=\"branchwhitelist\" ng-required=\"false\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[branchwhitelist].$error.server\">{{ GOINPUTNAME[branchwhitelist].$error.server }}</span>\n</div>\n<div class=\"form_item_block\">\n <label>Blacklisted branches:</label>\n <input type=\"text\" ng-model=\"branchblacklist\" ng-required=\"false\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[branchblacklist].$error.server\">{{ GOINPUTNAME[branchblacklist].$error.server }}</span>\n</div>\n"
}
}
} ]
}, {
"_links" : {
"self" : {
},
"doc" : {
},
"find" : {
}
},
"id" : "github.pr",
"status" : {
"state" : "active"
},
"plugin_file_location" : "/var/lib/go-server/plugins/external/github-pr-poller-1.4.0-RC4.jar",
"bundled_plugin" : false,
"about" : {
"name" : "Github Pull Requests Builder",
"version" : "1.4.0-RC4",
"target_go_version" : "15.1.0",
"description" : "Plugin that polls a GitHub repository for pull requests and triggers a build for each of them",
"target_operating_systems" : [ ],
"vendor" : {
"name" : "Ashwanth Kumar",
}
},
"extensions" : [ {
"type" : "scm",
"display_name" : "Github",
"scm_settings" : {
"configurations" : [ {
"key" : "url",
"metadata" : {
"secure" : false,
"required" : true,
"part_of_identity" : true
}
}, {
"key" : "username",
"metadata" : {
"secure" : false,
"required" : false,
"part_of_identity" : false
}
}, {
"key" : "password",
"metadata" : {
"secure" : true,
"required" : false,
"part_of_identity" : false
}
}, {
"key" : "defaultBranch",
"metadata" : {
"secure" : false,
"required" : false,
"part_of_identity" : false
}
}, {
"key" : "shallowClone",
"metadata" : {
"secure" : false,
"required" : false,
"part_of_identity" : false
}
} ],
"view" : {
"template" : "<div class=\"form_item_block\">\n <label>URL:<span class=\"asterisk\">*</span></label>\n <input type=\"text\" ng-model=\"url\" ng-required=\"true\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[url].$error.server\">{{ GOINPUTNAME[url].$error.server }}</span>\n</div>\n<div class=\"form_item_block\">\n <label>Username:</label>\n <input type=\"text\" autocomplete=\"new-password\" ng-model=\"username\" ng-required=\"false\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[username].$error.server\">{{ GOINPUTNAME[username].$error.server }}</span>\n</div>\n<div class=\"form_item_block\">\n <label>Password:</label>\n <input type=\"password\" autocomplete=\"new-password\" ng-model=\"password\" ng-required=\"false\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[password].$error.server\">{{ GOINPUTNAME[password].$error.server }}</span>\n</div>\n<div class=\"form_item_block\">\n <label>Default Branch:</label>\n <input type=\"text\" ng-model=\"defaultBranch\" ng-required=\"false\"/>\n <span class=\"form_error\" ng-show=\"GOINPUTNAME[defaultBranch].$error.server\">{{ GOINPUTNAME[defaultBranch].$error.server }}</span>\n</div>\n"
}
}
} ]
} ]
}
}%
as you requested i shared the response here

Sriram Narayanan

unread,
Mar 19, 2024, 10:21:05 AMMar 19
to go...@googlegroups.com
On Tue, 19 Mar 2024 at 5:29 PM, Chad Wilson <ch...@thoughtworks.com> wrote:
That looks normal to me.

I don't know - my only other suggestions to narrow it down are the same as earlier:
  • check the browser console for Javascript errors when loading these pages
  • check the browser debugger "network" tab to see if requests under the "JS" and "XHR" types are being blocked or failing (403,433/503 etc). 
  • disable the browser cache and do a full reload and check the console and network tab again.
  • try a different browser or Incognito mode (to rule out a corrupt browser cache)
Do you use a CDN, load balancer or reverse proxy (for HTTPS) in front of your "real" GoCD server which can modify requests/responses? If so, I would expect to see something wrong in the browser console or the network tab.

Perhaps someone else has some idea? Personally I cannot replicate on Chrome 122.0.6261.129, Safari 17.4 or Firefox 123.0.1 which makes me think it is something particular to your server environment or your local machine/browser.

I’ll try to replicate this and report.


Reply all
Reply to author
Forward
0 new messages